We are using Backbone.js to build client-side UI that manipulates models shared by multiple users. It is fairly straight-forward to setup Backbone.js to fetch data from server, and sync changes to server. However, what is the best practice for updating a model that has changed from the server?
1) Is it that we have to regularly sync with the server to update the model? If so, is there an existing way in Backbone.js to do this automatically?
Or,
2) Is there a Javascript library and RoR gem that work well with Backbone.js, that uses the whole reverse HTTP pattern to have server updates clients about changes other users have made?
Thanks.
Also, the PusherApp is popular to send updates from server to client. Found this game, which is a pretty fun way to visualize what’s happening — it’s using Backbone.js. Also: socket.io has some mindshare.
Credit and more game fun: http://logicalfriday.com/2011/09/19/ace-invaders/