Open Source Horizon Claims Edge over Google's Firebase Mobile Back-End
- By David Ramel
- May 23, 2016
Horizon was developed by the team behind the RethinkDB database, upon which it runs.
"Think of it as an open-source Firebase," says a comment on Hacker News. "Not only you can host your own data, you can also do complex queries because it uses RethinkDB underneath."
"This is key," said the reader. "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't built out for you. Horizon seems ideal -- it gives you the ease of use of a turnkey system starting out, with the flexibility to customize back-end logic/validation later when you need to. That, plus the fact that it's put together by the awesome RethinkDB team, makes it very interesting to me!"
The Horizon team even addressed the Firebase comparison in a FAQ, under the title, "How is Horizon different from Firebase?":
- Horizon is open source. You can run it on your laptop, deploy it to the cloud, or deploy it to any infrastructure you want.
- Horizon will allow you to build complex enterprise apps, not just basic applications with limited functionality. Since Horizon stores data in RethinkDB, once your app grows beyond the basic Horizon API, you can start adding back-end code of arbitrary complexity that has complete access to a fully featured database.
- Since Horizon is built on RethinkDB, we'll be able to expose services that are much more sophisticated than simple document sync (e.g. real-time analytics, streams on joined tables, etc.)
For the record, here's what we reported last week about Google's upgrade of and increased emphasis on Firebase during its I/O developer conference:
"Google also announced that it will be adding features to its Firebase back-end-as-a-service product, which it acquired in 2014. The company plans to integrate Firebase fully with its existing products and services, and says that many previously paid-for features, such as Cloud Messaging, will be free going forward. The new Firebase is a single SDK that provides analytics, remote config, crash reporting, test lab, notifications, dynamic links, invites, AdWords and AdMobs. One notable new feature, Crash Reporting, provides reports to help diagnose and fix problems that show up in Android or iOS apps. The feature is based on Firebase Analytics, which allows developers to see information about how and where an app is being used."
The Horizon team, meanwhile, believes its product has advantages stemming from its dependency on RethinkDB, described as "the first open-source, scalable JSON database built from the ground up for the real-time Web. It inverts the traditional database architecture by exposing an exciting new access model -- instead of polling for changes, the developer can tell RethinkDB to continuously push updated query results to applications in real-time. RethinkDB's real-time push architecture dramatically reduces the time and effort necessary to build scalable real-time apps."
The Horizon documentation states: "Horizon reduces the amount of friction that developers face when they build and scale Web applications. It eliminates repetitive boilerplate and tedious steps like hand-writing CRUD endpoints, authentication and session management. We set out to flatten the space between the persistence layer and the front-end client, freeing the developer to focus on application logic instead of continually reinventing the wheel."
However, even though mobile development with Horizon may eventually have a bigger upside than Web development, mobile development with React Native isn't quite ready for prime time yet. A Horizon forum discussion details how developers are trying to get it to work.
Horizon is made up from three components, according to a blog post announcing the product:
- Horizon server: a back-end server built with Node.js and RethinkDB that supports data persistence, real-time streams, input validation, user authentication and permissions.
- Horizon CLI: a command-line tool that can generate project templates, start up a local Horizon development server, and help you deploy your Horizon application to the cloud.
"The Horizon server is a complete back-end that developers can use to power their applications," the post said. "It's great for rapid prototyping: simply run the Horizon server from the command-line and develop your front-end user experience with the Horizon client library. Front-end developers can use Horizon to create full applications without writing any back-end code."
In addition to characterizing Horizon as superior to Firebase in some aspects, some industry pundits positioned it as a replacement for the Parse back-end service that was killed by creator Facebook -- leaving many developers in a lurch -- and subsequently resurrected as an open source project of its own.
The Horizon team said interested developers can sign up to be among the first to use a private beta of Horizon Cloud, a purpose-built cloud infrastructure to host and manage Horizon apps, planned to launch by year's end.
For right now, the team said: "Developers can learn how to download and install the Horizon framework by visiting the Horizon.io landing page. Via a promotion with Digital Ocean, developers can run their Horizon apps for very little, or choose to host their apps anywhere they like. RethinkDB provides commercial services, including development, production and training support, with managed services coming soon with the launch of Horizon Cloud."
David Ramel is an editor and writer for Converge360.