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

docstore/gcpdatastore: Add support for Google Firestore in Datastore mode #2713

Open
szabba opened this issue Dec 11, 2019 · 3 comments
Open

Comments

@szabba
Copy link

szabba commented Dec 11, 2019

example.zip

Is your feature request related to a problem? Please describe.

The docstore API cannot be used with Google Cloud Firestore in Datastore mode.
The docstore/gcpfirestore driver is not sufficient for this -- trying to results in an error:

2019/12/11 19:51:32 could not save foo: docstore (code=FailedPrecondition): rpc error: code = FailedPrecondition desc = The Cloud Firestore API is not available for Datastore Mode projects.

See the attached example program.
It uses GCP application default credentials.
It expects a GCP project name in the GCP_PROJECT_NAME environment variable.

Describe the solution you'd like

A driver implementation for Google Cloud Firestore in Datastore mode.

Describe alternatives you've considered

Using a different backing service or cloud provider.

Additional context

The GCP Firestore documentation mentions Native Mode has a limit of 10k writes/s.
This makes it unsuitable for write-heavy workloads at certain scales.
While Docstore Mode does not have an exact figure for it's upper writes/s limit it indicates the limit isn't as low.

@krolaw
Copy link

krolaw commented Dec 13, 2019

Quoting: https://cloud.google.com/datastore/docs/firestore-or-datastore

Use Firestore in Datastore mode for new server projects.

Which is why I chose it. Since one would expect this Go package to mostly be used on servers, I think Datastore is something that would benefit many.

@antoncohen
Copy link

Firestore in Datastore mode is the correct mode for most server applications, and is a closer match to the other DBs supported by docstore. This library should use Datastore mode. Firestore in Native mode is for mobile apps and client side Javascript.

https://cloud.google.com/datastore/docs/firestore-or-datastore#choosing_a_database_mode

We recommend the following when choosing a database mode:

  • Use Firestore in Datastore mode for new server projects.

Firestore in Datastore mode allows you to use established Datastore server architectures while removing fundamental Datastore limitations. Datastore mode can automatically scale to millions of writes per second.

  • Use Firestore in Native mode for new mobile and web apps.

Firestore offers mobile and web client libraries with real-time and offline features. Native mode can automatically scale to millions of concurrent clients.

@vangent
Copy link
Contributor

vangent commented Aug 24, 2020

It looks like the APIs supported for Datastore mode vs Native mode are completely independent (https://cloud.google.com/datastore/docs/firestore-or-datastore#feature_comparison). So this is basically a request for a new docstore/gcpdatastore driver.

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

4 participants