Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Implementation of transactions for Firestore #291

Closed
iRedFox opened this issue May 11, 2022 · 4 comments
Closed

[FEATURE REQUEST] Implementation of transactions for Firestore #291

iRedFox opened this issue May 11, 2022 · 4 comments
Labels
enhancement New feature or request Hacktoberfest

Comments

@iRedFox
Copy link

iRedFox commented May 11, 2022

Is your feature request related to a problem? Please describe.
Its hard to sync data between all players. As an example, if three players are contributing to a global field value on the database. If all them did update on the same time, there will be desyncronization.

Describe the solution you'd like
Transcations for Firestore

Describe alternatives you've considered
Realtime database

Additional context
Add any other context or screenshots about the feature request here.

@iRedFox iRedFox added the enhancement New feature or request label May 11, 2022
@WolfgangSenff WolfgangSenff changed the title [FEATURE REQUEST] Implementation of tansactions for Firestore [FEATURE REQUEST] Implementation of transactions for Firestore May 11, 2022
@hjiul
Copy link

hjiul commented Nov 22, 2022

Not sure what you mean by transactions.

But on js, firestore has snapshot options which allow you to sync collections or documents and get live modifications.

Implementing snapshots into godot firebase would be a huuuuge addition to it since its a feature most godot programmer will need.

@WolfgangSenff
Copy link
Collaborator

Unfortunately we cannot do that - snapshots in that sense require a gRPC implementation that we can't provide. Transactions are different. They are where you open a transaction, commit some changes, and submit it all in one "action". This feature is for transactions, not for snapshot syncing. This will make it so multiple updates sent at the same time won't desync your data, which is what your original complaint was. If that's not what you intended, we can either close this or leave it, since people do want transactions.

@WolfgangSenff
Copy link
Collaborator

I have figured out how to manage the above! In addition, it might bring something else that is very cool, just have to figure out how to do it in entirety. :) In any case, just updating you that soon, you'll be able to do transactions! As I'm reworking the entire Firestore part of the plugin, it might be a hot minute until I've finished it, but very happy with how it works with other things that are considered to be transactions already. Those are already in the codebase in the latest 4.x version, so feel free to check it out!

@WolfgangSenff
Copy link
Collaborator

I have implemented commits finally for Godot! While it's not exactly this, it does allow for exactly what the original post wanted! So I'm going to close this for now. See my latest release and the new Firestore Guide for more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants