Is it "guaranteed" that a Meteor method will be executed on server-side?


My scenario is a mobile application which typically has an unreliable network connection. What will happen if a fails to contact the server? Will there be infinite tries, or does Meteor “give up” after a while?

An additional question regarding usability in this context: Assuming that Meteor gives up after n tries and calls the provided callback with an error. How do you typically deal with this situation if you have implemented latency compensation and the user has been re-routed to other pages in the meantime? Do you implement a kind of “in-app notification system” to inform the user about the failed server response? How do you deal with situations where the user closes the application before the Method has been successfully sent?

My scenario is a page where the user may attach tags to model objects. If the user adds tags that are new to the application, they should be reviewed by a moderator. So I will call a Meteor.method() to trigger this approval process, but if it cannot be assured that the message will be delivered, the user might wait “forever” for this.


No, its not.

Look into Simulation mode:

Short Answer: Methods (unless they are in a server block) run on both the Client and Server, with the Client “simulating” the response and waiting for the Server to respond.

You’re going to want to use the Asynchronous function and be ready to capture any errors/timeouts.


Why not just wrap your inside another method that first checks connectivity status? Meteor.RPC().