Re:Horizon 1.0: a realtime, open-source JavaScript back end ...
by coffeemug on Tuesday May 17, 2016 @03:55PM
(#11716818)
There is currently no "disconnect-and-set" functionality, but it's on the roadmap and will happen soon. It just didn't land into v1.
Since Horizon is backed by RethinkDB, it's transaction properties are the same as that of RethinkDB. Check out this document for the specifics -- http://rethinkdb.com/docs/consistency/.
Re:Horizon 1.0: a realtime, open-source JavaScript back end ...
by akanet on Tuesday May 17, 2016 @04:07PM
(#11716941)
Thanks for that. Can you clarify disconnect behavior in general? Do subscribed changesets resume if your internet blips?
Also, there doesn't seem to be a callback arg in Collection#store: http://horizon.io/api/collection/#store. This is worrying. How do I know if a write succeeded?
Edit: found http://horizon.io/api/collection/#subscribe - you chain subscribe to writes when you care about their success
1. Do you have something analogous to https://www.firebase.com/docs/web/api/ondisconnect? Real-time apps often have some manner of presence indicator. Firebase allows you to say "when this client disconnects, set the value of this key to $BLAH". I noticed that Horizon has http://horizon.io/api/horizon/#ondisconnected, but this is just a client-side indication of when you've disconnected.
2. What are Horizon's transaction properties? How about ordering of appends to a collection?