Diff between meteor method and meteor pub/sub

Meteor.publish is the pub part of pub-sub obviously. As data gets added or changed that is being published the server will automatically send it over to any client that has subscribed to that publication.

Meteor.call is request-response. You make a request, you get a response. Party's over. If data changes on the server that the method uses your client won't know about it until you make another call.


Meteor Publish Subscribe is a way to allow access (read and write) to clients, and to keep all clients and server updated with the latest data. Meteor Publish/Subscribe has only to do with meteor database.

Meteor methods is much more, it can be used for various uses, such as making calls to API's (HTTP calls to your REST API's), etc. (P.S. It is recommended to make these calls from server side for security reasons).

Also, when fetching data by calling Meteor Method (using Meteor.call), you can do some kind of verification or validation on server side before fetching or returning the data.

And yes, Michel Floyd's answer is another great point.

Tags:

Meteor