6 ms·
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
by coffeemug 10y ago
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.
- arcticfox 10y agoHi 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 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.
- coffeemug 10y agoMike's `react-rethinkdb` project is really cool, but it's based on exposing the entire ReQL language to the browser. We thought this approach wouldn't work well as an industrial-strength product -- ReQL is designed to be accessed from the backend, and exposing a full query language to the browser introduces a number of challenges. Security is really hard, learning curve is steep, there are DoS challenges, the protocol is too complex to write platform-specific extensions, etc. 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)
- ChristianBundy 10y agoThanks 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.
- cjbprime 10y agoThere's one on the website: http://horizon.io/faq/ http://horizon.io/faq/
- ben_jones 10y agoIMO 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.
- SomeCallMeTim 10y agoThe FAQ repeats some things I've heard about Meteor -- specifically that its architecture doesn't scale. But Meteor isn't completely prescriptive. There are several pieces that can be swapped out: You can use Angular, React, or Blaze on the client, for instance. From what I've read, it doesn't look like Horizon is a complete framework, just a database client/server component that can be used with any framework.
- ben_jones 10y agoWe have a short-burst, write-heavy, mostly cpu-bound, work-load, which according to the various financially incentivized critics would completely knee-cap us for our use of Meteor. Except we: 1) optimized our database operations 2) relegated cpu-bound work to micro-services that could process work from a queue at their own pace 3) Leveraged the ecosystem to writer smarter and more concise code Know your enemy and know yourself and you need not fear the result of a thousand battles (Sun Tzu). Meteor is an amazingly productive ecosystem for writing real-time applications. No it will not solve every problem you throw at it. Just to be clear I'm not hating on Horizon. I definitely will try it in the future.
- SomeCallMeTim 10y agoOK, glad to hear that it does work for you. Sounds like you have a robust architecture. I don't actually know what is supposed to "not scale" about Meteor. I've just read it multiple times. But because of the nature of Meteor (Really easy for anyone to set up! Anyone can create a real time app in ten minutes or less!), it probably attracts a lot of junior developers. It therefore should have occurred to me to translate "It doesn't scale!" to "I don't know how to scale it and my app is slow!!!". :)
- lux 10y agoCongrats on the release! I've only hada little time to play with it so far as a beta user, but was super impressed and can't wait to use it on a real project soon. Cheers!
- amelius 10y agoAre 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?
- coffeemug 10y agoTake a look at this comment: https://news.ycombinator.com/item?id=11716145 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.
- deleted 10y ago[deleted]
- amelius 10y agoOkay 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.
- coffeemug 10y agoEase of use. 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.
- usaphp 10y ago> I've been up for about twenty-four hours, but I'll be around to answer any questions for the rest of the day Make sure you don't regret about your answers later :) Answering questions on HN after being 24 hours awake is generally not a good idea :)
- akanet 10y agoHey 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
- tejasv 10y agoOnce you guys made it big, you should rename yourselves to RethoughtDB :)
- jlu 10y agoDoes it handle conflict resolution, ike when two people modified the same field at almost the same time?
- danielmewes 10y agoEdit: While Horizon assigns versions internally, it looks like they are not currently used for catching concurrent client-side modifications by different users. (I previously wrote that they would cause the "losing" write to fail if it was based on an outdated version of the data, but that doesn't seem to be the case yet.) I opened an issue against our docs to add information on this, as I'm a bit fuzzy on the detailed behavior myself: https://github.com/rethinkdb/horizon-docs/issues/50 https://github.com/rethinkdb/horizon-docs/issues/50
- android521 10y agoHi, Slava, I was a web developer and now I am a mobile developer. Nobody is developing web applications anymore (at least in developing countries). We are all mobile first. How does android or ios developers take advantage of Horizon ? Can you give a few examples? How does horizon make mobile (native) developers life easier ? web development is slowing down and mobile development is on the rise. Mobile developers don't want to deal with backend development. But it seems like web development is your main focus and mobile is a second thought. Please make it the focus of your work. Meteor is useless to us because it is optimized for web client. I hope Horizon won't fall for this trap. Your bigger audience and potential users are android or IOS developers. Please optimize for them and provide lots of examples to show them how their life can be easier. Thanks.
- pablasso 10y agoI'm from a developing country too and that is such an exaggeration. Maybe your career has been focused on mobile, but no way there's overall more native development than web.
- izolate 10y agoSo what does your dumb mobile client connect to? If it's any good, probably a web backend.
- shadow68 10y agoWeb developer here. Some of the most complicated application are being built for web vs mobile. Within the enterprise web applications, I fail to see how mobile is anywhere near web's presence especially for data intensive apps.
- jaxondu 10y agoIn the FAQ page http://horizon.io/faq/ http://horizon.io/faq/ Can I use Horizon on mobile devices? Horizon ships with a JavaScript client library that can be used for building web and mobile apps with frameworks like React, Angular, or React Native. We’re also working on specific platform client libraries that support the Horizon protocol. Client libraries for iOS and Android are coming soon.
- frostymarvelous 10y agoVery fitting handle. Im really stoked for this and thanks a lot for your hard work.