// ex
this.props.horizon.order('datetime', 'descending').limit(8).watch()Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
21–30 of 133 posts
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#22Slava, 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()
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#23How does this differ from Meteor?
For convenience, this is the section taken from it that addresses this exact question! (I imagine other people may be thinking this)
How is Horizon different from Meteor?
Horizon has philosophical and technical differences with Meteor that will result in vastly different developer experiences.
Horizon is a small layer on top of RethinkDB with a narrow, purpose-built API designed to make it very easy to get started building realtime apps without backend code. Horizon isn’t prescriptive – you can use any front-end framework without any magic/customizations, and once your app outgrows the Horizon API you can use any backend technology (e.g. Node.js, Python, Ruby) and any backend framework (e.g. Rails, Express, Koa, etc.)
By contrast, Meteor is a much more prescriptive framework. Horizon is a reasonably small component that has a very clean separation with the database and the frontend, while Meteor is a much more monolithic experience.
Another major difference is architectural – Meteor uses a LiveQuery component built by tailing MongoDB’s oplog. This approach is fundamentally limited – it’s impossible to do many operations efficiently, and even the basic functionality is extremely difficult to scale.
Horizon is built on RethinkDB, so the LiveQuery functionality is in the database. This allows for much more sophisticated streaming operations, and scalability is dramatically simpler because the database has all the necessary information to allow for a scalable feeds implementation.
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#24Hey 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.
Hi Slava! What do you guys think about the approach taken here, and what are the major differences in approach theat you took with Horizon? https://github.com/mikemintz/react-rethinkdb I've had really good luck with that whitelisting approach, so I'm wondering what the biggest wins would be from potentially switching to Horizon.
On the other hand, Horizon exposes a simple API/protocol that's easy to learn and easy to secure. If you need more functionality, you can import Horizon as a Node.js module and start writing backend code that accesses RethinkDB directly. The learning curve is much easier, it provides an upgrade path for sophisticated apps, and feels like a more robust product.
(I don't mean to disparage `react-rethinkdb`, I think the project is awesome, it's just a philosophical difference in approach)
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#25Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#26Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#27Slava, 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()
So while the user can change JavaScript as they please, that's ok; if they try to do something they're not supposed to do, the server will just reject the query.
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#28Slava, 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?
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#29How does access control work? For example, if I have a database containing a table "users", and a table "files", and the files table contains a column "owner" (pointing to the users table), then how do I prevent the client-side database engine from accessing the files which do not belong to the user that is currently logged in?
Re: Horizon 1.0: a realtime, open-source JavaScript back end from RethinkDB
#30Does 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.