Earlier quoted context omitted.
Are the transactions optimistic? How does the logic that concurrently applies/rolls-back these transactions over multiple clients work? I'm very interested in this, do you have some internal documentation on it?
Take a look at this comment: https://news.ycombinator.com/item?id=11716145 . TL;DR: currently not optimistic but will be soon; it's fairly simple to do because RethinkDB core has built in support for it. Once the feature lands we'll talk about the implementation in detail.
Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
61–70 of 133 posts
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#62Hey guys, Slava @ Rethink here. The team is really excited to launch Horizon -- it's based on a lot of feedback from users of very different backgrounds, and we think it will make web development dramatically easier. I've been up for about twenty-four hours, but I'll be around to answer any questions for the rest of the day.
Hey Slava. Interesting stuff - two questions: 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 yo…
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 from RethinkDB
#63Earlier quoted context omitted.
Are the transactions optimistic? How does the logic that concurrently applies/rolls-back these transactions over multiple clients work? I'm very interested in this, do you have some internal documentation on it?
Take a look at this comment: https://news.ycombinator.com/item?id=11716145 . TL;DR: currently not optimistic but will be soon; it's fairly simple to do because RethinkDB core has built in support for it. Once the feature lands we'll talk about the implementation in detail.
But without optimistic transactions, what sets Horizon apart from just running the transaction-code on the server? If I understand it correctly, the latency will be the same in both cases, i.e., one network round-trip.
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#64The Horizon blog could really use a feed that I can subscribe too. I would love to head about all of your future news.
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#65The Horizon blog could really use a feed that I can subscribe too. I would love to head about all of your future news.
Good idea! We forgot to push a RSS feed. Here it is: http://horizon.io/feed.xml
It would be even awesomer if you could include the articles in the feed so I don't have to leave my cozy RSS reader :)
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#66> Horizon is distributed as a standalone server for browser-based JavaScript apps. When you're ready to write custom backend code, you can load the Horizon modules directly in Node.js This is key. Firebase seems great for quick prototypes, but I never built against it because it was unclear (to me at least) how to deal with cases where you want to leave the sandbox and add custom backend functionality that they haven…
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#67Earlier quoted context omitted.
Hey Slava. Interesting stuff - two questions: 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 yo…
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/ .
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
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#68Earlier quoted context omitted.
Good idea! We forgot to push a RSS feed. Here it is: http://horizon.io/feed.xml
Thanks! I'm now subscribed :) It would be even awesomer if you could include the articles in the feed so I don't have to leave my cozy RSS reader :)
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#69Earlier quoted context omitted.
Take a look at this comment: https://news.ycombinator.com/item?id=11716145 . TL;DR: currently not optimistic but will be soon; it's fairly simple to do because RethinkDB core has built in support for it. Once the feature lands we'll talk about the implementation in detail.
Okay I can wait :) But without optimistic transactions, what sets Horizon apart from just running the transaction-code on the server? If I understand it correctly, the latency will be the same in both cases, i.e., one network round-trip.
Lack of optimistic updates is a temporary state, though. The vision for Horizon definitely includes this functionality, and we'll make sure it lands ASAP.
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#70What's the gzipped size of the client lib?