Live data from Hacker News

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

horizon.io

41–50 of 133 posts

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

#41
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?

I would think you'd do this server-side, I've had similar issues outside of JavaScript: users play a game and create a custom client that connects to my server, they send custom packets thereby I have to make sure that they: don't access too much data at once (a user asking for 100 different things in 3 seconds is not even normal in certain scenarios) or the data they're requesting is formatted wrong (a string where a integer is expected?) the solution I guess is server-sided. This issue isn't unique only to client-side javascript, it is relevant in networking as well. So long as the back-end is designed intelligently it could all work out.

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

#42
For apps that don't necessarily have the realtime requirement, Kinto [1] is another really cool open-source backend solution that focuses on the offline-first scenario. It's built by the Firefox Sync team and used in production at Mozilla.

That said, at first glance there doesn't seem to be anything stopping anyone from building a caching layer on top of Horizon to enable offline-first functionality. Definitely going to be keeping an eye on this as well!

EDIT: It looks like they are in fact considering offline-first support already [2]!

[1] http://kinto.readthedocs.io/en/latest/overview.html

[2] https://github.com/rethinkdb/horizon/issues/58

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

#44
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.

Oh, this is exactly what I want to do with Horizon! So cool.

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

#46

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 .

Thanks!

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

#48

Earlier quoted context omitted.

Thanks for your time! Could you give me a quick comparison of Horizon and Meteor? I've used Meteor in the past (and loved it), and it looks like Horizon might be fun to learn.

There's one on the website: http://horizon.io/faq/

IMO it hand waves Meteor away without acknowledging (perhaps out of ignorance) some of it's other strengths.

I'll watch Horizon but I'm taking it all with a grain of salt. Standard new javascript framework protocol people.

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

#49
post #45

I'm intrigued but after reading a couple of pages it's not really clear to me what benefits I get or really exactly what this is.... Why should I use it over my current approach ? Why is this compelling?

Think of it as an open-source Firebase. Not only you can host your own data, you can also do complex queries because it uses RethinkDB underneath.
Post reply on HN