4 ms·
Hey Slava. Interesting stuff - two questions: 1. Do you have something analogous to https://www.firebase.com/docs/web/api/ondisconnect https://www.firebase.com
by akanet 10y ago
Hey Slava. Interesting stuff - two questions:
1. Do you have something analogous to https://www.firebase.com/docs/web/api/ondisconnect 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 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?
- coffeemug 10y agoThere 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/ http://rethinkdb.com/docs/consistency/.
- akanet 10y agoThanks 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 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 http://horizon.io/api/collection/#subscribe - you chain subscribe to writes when you care about their success