Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Horizon is only the "realtime db" portion of Firebase and it's only for Javascript, not Android or iOS. The mobile app realtime network connection tech is especially tricky to get right without draining a user's battery by doing things like constantly polling the backend. I have not seen anything from RethinkDB along those lines.


> by doing things like constantly polling the backend

RethinkDB doesn't require polling. It's like their #1 feature and differentiator from other non-sql databases.


What do they do?

We use websockets in our realtime platform.


The Horizon client uses websockets to connect to the Horizon server. The Horizon server uses RethinkDB's protocol[1] to connect to the database.

[1] http://rethinkdb.com/docs/writing-drivers/


Websockets cannot be as efficient as native network management code.


What does this even mean? WebSockets can be used natively. In fact the Firebase client uses WebSockets, same as Horizon.


Sorry I was confused about terms, what I was thinking of was Javascript vs native. Native code can do more than a browser sandboxed client can.


Horizon uses push architecture by default so there is no need to pool.


> is especially tricky to get right without draining a user's battery by doing things like constantly polling the backend

One simple solution is giving each state a defined name, and keeping a socket open from mobile. If the connection is restarted, each side can name their current state, and the delta can also be easily synced.

Later on, changes can be directly transmitted via the socket.

(I am working on something like that currently myself).


I presume you can still use it with any mobile App wrapped as native e.g. via React Native or Ionic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: