简体   繁体   中英

Google Cloud Bigtable Python Client API

Google Bigtable Python Client Library is still in Alpha, which means future changes might not be backward compatible and no SLA.

Does anyone know when will the library have production support?

To give more context,

  1. I am debating Bigtable vs. Datastore. And I am more familiar with C++ and Python.
  2. The service to build is - User can write posts and add tags. User can search or filter posts for a particular user or tag. Bigtable seems to be an excellent choice (user id as row key and tags as column families). But the python client library is a concern.

Thanks for answering in advance.

Google provides Choosing a Storage Option guide which describes all the storage and database options on Google Cloud Platform so that it's easier to choose one for your project.

For your use case, Google Cloud Datastore is a better choice of database—and I say this as the product manager for Google Cloud Bigtable.

You're looking for a database to build a user-facing service with ability to search for tags.

  • Cloud Datastore provides multi-zone or multi-region, synchronously-replicated database with built-in indexing .
  • Cloud Bigtable is a single-zone storage system, with only a single index: the row key, without secondary indexes, so you'd have to built it yourself.

Regarding your proposed approach: Bigtable, with a single index, makes it easy to find a specific rows or sets of rows, at low latency. So if your row key is a user or a post id, it's quick to find those. However, the query of "find all posts with this tag" if tags are stored in columns is time-expensive because it involves a full scan of the database to see which rows have that specific tag stored in the column (column families and column family qualifiers are not indexed).

Thus, you should use Cloud Datastore to build this application.

Good luck with your project!

Note that the python client library for Cloud Bigtable is now officially released [1]. Cloud Bigtable can be used for usecases like this if you would only need to search or filter for tags within a particular User, but as Solomon mentioned above, searching or filtering by tags across all users would be inefficient in Cloud Bigtable.

[1] https://googleapis.dev/python/bigtable/latest/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM