Storage metadata in Google Cloud Datastore
Google Datastore is a highly scalable, NoSQL document database similar to Amazon's DynamoDB and MongoDB. Individual data objects in the Datastore are called entities. An entity has one or more properties and a category of objects is called a kind. Each object is uniquely identified by a key. In this recipe, we would simulate a storage drive environment. Employees of a company are given the ability to upload files to Google Storage. The metadata is stored in Cloud Datastore to avoid overhead to the Storage API and for efficiency. The file uploaded to the Storage follows this file format:
<5-digit hash>/<[year][month][day][hour][minute][second]>/<Employee ID>/<file name>
After the data is uploaded to Storage, the metadata collected should enable us to query:
- List all objects uploaded by an employee
- List all objects in a time range
So, we'll design the metadata in the following format:
Kind | Drive |
Entity | Data objects inserted for example... |