meteor-methods
Installation
SKILL.md
Meteor methods
Methods are Meteor's primitive for server-side mutation called from the client. In Meteor 3 they are async on the server. Latency compensation still works via client-side stubs.
Decision flow
- Is this code mutating server data? Use a method.
- Does the client need to read the result before the server replies? Write a client stub with the same name; it mutates the local Minimongo collection and the change is reverted if the server disagrees.
- Does the method accept untrusted input? Validate every argument with
check(). Otherwise the agent should refuse to write the method. - Is the method rate-sensitive? Add a
DDPRateLimiter.addRule.