Listeners for Firestore? #186
-
It looks like there is support for listeners with the Realtime Database, but not Firestore, correct? Just making sure I'm not overlooking something simple. I looked at the source code and most of it seems HTTP based. Would it be implemented similar to how it was for the Realtime Database? Debating on whether to take a shot at it. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
@PadreMontoya apologies it took us so long to get back to you. What are you trying to do? That might make a difference with what part of Firebase you want to use. Also yes a lot of the code is HTTP based since we are using the RestAPI for Firebase. ~ Chuck |
Beta Was this translation helpful? Give feedback.
-
It is not implemented the same way as the Realtime Database, unfortunately, as Firestore does not support dynamic updates through REST. It only supports them through gRPC, which Godot itself does not support, which makes me very sad. Thanks for the question though! Sorry it took us so long, as @BearDooks said. |
Beta Was this translation helpful? Give feedback.
-
Ok, no problem at all - thanks for getting back to me! I'm chugging
forward with the Realtime Database, though it isn't as shiny as Firestore.
:) Thanks for your work on the project - it's a lifesaver!
… |
Beta Was this translation helpful? Give feedback.
-
That brings up something I'm wondering - is Firebase practical for fast
moving games?
I'm doing a relatively simple Blackjack-style game, so I don't imagine
there will be more than 100 server-bound posts per 5 minutes per game.
(Players have 20 seconds to decide whether to "Stay" (Hit) or "Flee"
(Fold), then the server resolves the round once everyone has decided)
I have it functioning and it works, I'm just worried about being crushed by
a Firebase bill.
Storage should be trivial, but should I be concerned about traffic?
…On Wed, May 12, 2021 at 3:46 PM Kyle Szklenski ***@***.***> wrote:
It's not as shiny perhaps, but there's an awesome little thing for it that
makes it really clean, which is a Firebase Extension (that's what they're
called) that can limit the number of child nodes at a path. This can make
it so if you don't care about the game history, you can funnel moves to it,
and they'll be interpreted and discarded as new moves are sent. It's really
nice to prevent your DB from overflowing with data for fast-moving games
that require a lot of moves, or have a lot of players doing moves at once.
I'll be demonstrating this in my talk at GodotCon this year, which will be
on more generic cloud-based backend patterns for games rather than
Firebase, but should have some really useful information none-the-less. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#186 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDHBU6OUFUWH65L6VPAIJ3TNLLJHANCNFSM43PWYHGA>
.
|
Beta Was this translation helpful? Give feedback.
It is not implemented the same way as the Realtime Database, unfortunately, as Firestore does not support dynamic updates through REST. It only supports them through gRPC, which Godot itself does not support, which makes me very sad.
Thanks for the question though! Sorry it took us so long, as @BearDooks said.