Hacker News new | ask | show | jobs
by kanja 4724 days ago
This is super cool - What method is used for continued client side updates? Websockets, polling?
2 comments

The readme says it works with any "persistent backend such as a REST API or socket connection".

It looks like it tries to be backend-agnostic, and do the sync work on the client side.

I'm assuming - and this could be a bad assumption - but based on the continuing updates architecture, if client a changes model a, client b will see an update on model a. How does client b get notified of the change? Does it have some kind of fallback system ala socket.io? Is this not yet part of the project?
Backbone took a REST opinion, I imagine if you want something like you describe, they (or someone) will implement something like backbone.io.

https://github.com/scttnlsn/backbone.io

Judging by the chart on the site, it looks like each client polls the original model on the server, and infers changes by diffing it against the client's current copy.
It tries to be agnostic about this and favor any particular push method. Instead, it simply provides the primitives on the client to make these things easy (e.g. merging in new data).