Live data from Hacker News

Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

horizon.io

31–40 of 133 posts

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#31

I'm wondering how this works (or if it does) with GraphQL subscriptions. https://github.com/rethinkdb/rethinkdb/issues/3711

There's currently no GraphQL support in Horizon, but it's on the roadmap. See https://github.com/rethinkdb/horizon/issues/125.

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#32
post #30

(Former Meteor core dev here) This is cool! Does Horizon also solve "optimistic updates"? If so I'd love to learn more details. For comparison, Meteor keeps a local datastore that updates immediately when data is mutated and then reconciled with the real database.

The current version of Horizon doesn't do optimistic updates, but it's on the roadmap. Check out https://github.com/rethinkdb/horizon/issues/23. This is relatively easy because RethinkDB itself has support for notifying the client via a feed when a particular update has landed (i.e. the RethinkDB client can correlate the write with a feed message). It just didn't make it into v1, but will happen soon.

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#33
so .. can one write a spreadsheet app that is able to show results reactively in the front-end and will still reflect that same logic in some kind of backend api ?

Kind of being able to have the same logic in my spreadsheet as well as my api ?

This could be huge!

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#35
post #18

I think it's amazing that it's working with real RxJS streams for changes now - given how Redux store now returns an observable thing, Cycle is Rx based and Angular 2.0 uses a lot of Rx. This guarantees that things will interop nicely with eachother and we'll be able to use Rx all around.

You might want to check out lovli.js (https://github.com/flipace/lovli.js) -- a Horizon+Redux integration. It's really cool and demonstrates how well Horizon can interop with modern web technologies.

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#37

Hey 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.

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?

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#39
post #37

Hey 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.

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.

Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB

#40
post #22

Slava, Horizon looks cool, and I'm a huge fanboy of RethinkDB. However, in the demo video you write queries client side. How do you protect against users modifying front-end JavaScript and thus the queries? // ex this.props.horizon.order('datetime', 'descending').limit(8).watch()

This is the question I always get stuck on with these "front-end only" frameworks. How do you prevent DoS attacks or scrapers downloading your whole database? What is the information security model?

Out of the box Meteor does publish the to the browser. But I believe if you remove the insecure package you then control what is published to the browser e.g. usually only a subset of the db.
Post reply on HN