How realtime is Firebase?

840 views
Skip to first unread message

Lior Bruder

unread,
Mar 3, 2017, 11:47:11 AM3/3/17
to Firebase Google Group
Hi All,

My company is about to build a 2D real time multiplayer game for iOS and Android.
We were wondering if we can rely on firebase for our game.

So my questions is: "How realtime is Firebase realtime database?" can the client get updated 10 times in a seconds? less? more? 

Any information of reference to this issue will be highly appreciated.

Thanks,
Lior 

Stewart Miles

unread,
Mar 3, 2017, 12:06:20 PM3/3/17
to fireba...@googlegroups.com
~100ms latency but it depends.  If you're building a turn based card game, some feedback to the other player (you can imagine the style of game I'm talking about) you could use the RT DB.  Really you need to consider what state you want to persist and what is local to a game session.  For the state you want to persist (e.g destructible environments) store in the RT DB at a lower frequency and immediate - real-time - state relayed by a server e.g on Google App Engine, Google Compute Engine or whatever other provider.

Though of course, we're always adding new features so you never know what solutions we may be able to offer in future.

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/db160083-d372-48f4-9e13-b39a4e658985%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Larkworthy

unread,
Mar 3, 2017, 12:27:29 PM3/3/17
to Firebase Google Group
So RT DB is not good with write heavy workloads, I would try to stay below 300 writes per second, which means a RT DB could support 30 concurrent players. You will need to shard to go above that.

The underlying transport is websocket, which is over TCP and has a head of line blocking issue. So those are the major constraints you need to deal with. I tried seeing how well a twitch game would work with predictive lag compensation, you can try it out and see for yourself  https://construct2example.firebaseapp.com/pages/blog/latency_part1.html

Tom


Reply all
Reply to author
Forward
0 new messages