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

Investigate using firestore multi databases for data segregation #442

Open
hongalex opened this issue Apr 3, 2024 · 1 comment
Open

Comments

@hongalex
Copy link
Collaborator

hongalex commented Apr 3, 2024

With the introduction of Firestore multiple databases, we want to investigate the feasibility of introducing the capability of using multiple databases in Open Saves.

@hongalex
Copy link
Collaborator Author

hongalex commented Apr 3, 2024

Firestore multi-db requires creating named database instances. A new datastore client would be required to connect to each instance. Currently open saves only connects to a datastore via a single client. It would require some design changes to support connecting to individual databases. Such changes would include: finding a way to denote which database a Store / Record should live in, and a list of stores to make the connections.

In addition, there's a problem of scaling. Each datastore client instance created results in some level of network overhead, as each maintains it's own connection by default. This can be mitigated by sharing a connection pool across clients, but this can clash with the goals of true multi-tenancy.

Lastly, there's a question of how to isolate existing records into multiple databases. Approaching this directly would require some level of downtime to migrate records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant