When to use Datastore

Here is a list of scenarios where you probably shouldn't choose Datastore as your storage option:

  • Don't use Datastore if you need very strong transaction support. If you are doing hardcore OLTP, you should use something like Cloud Spanner.
  • If you want basic ACID support, Datastore is probably enough for you.
  • Datastore works best when data is hierarchical and highly structured. If you have data which is non-hierarchical or unstructured, Bigtable is probably a better NoSQL technology.
  • Do not use Datastore for analytics, OLAP, or Business Intelligence applications. BigQuery is a lot better because it has complex queries that are optimized for numerical calculations rather than documents.
  • Datastore requires key values and a host of indices. If you are storing immutable blobs such as movies, which might be greater than 10 MB in size, Cloud Storage would be a better choice. The extremely heavily indexed nature of Datastore implies that you should not use it if your application is going to carry out a lot of writes and updates on your key columns.
  • If you really want strong consistency guarantees, then of course you ought to use an RDBMS such as Cloud Spanner or Cloud SQL.

Turning to those situations where Datastore shines, the basic use case we discuss is, of course, the scaling of read performance. When you have hierarchical documents with key/value data, then obviously the document store is what you would want. There is also full indexing and its implications to consider when picking Cloud Datastore.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset