Book Image

Google Cloud Platform Cookbook

By : Legorie Rajan PS
Book Image

Google Cloud Platform Cookbook

By: Legorie Rajan PS

Overview of this book

Google Cloud Platform is a cloud computing platform that offers products and services to host applications using state-of-the art infrastructure and technology. You can build and host applications and websites, store data, and analyze data on Google's scalable infrastructure. This book follows a recipe-based approach, giving you hands-on experience to make the most of Google Cloud services. This book starts with practical recipes that explain how to utilize Google Cloud's common services. Then, you'll see how to make full use of Google Cloud components such as networking, security, management, and developer tools. Next, we'll deep dive into implementing core Google Cloud services into your organization, with practical recipes on App Engine, Compute Engine, Cloud Functions, virtual networks, and Cloud Storage. Later, we'll provide recipes on implementing authentication and security, Cloud APIs, command-line management, deployment management, and the Cloud SDK. Finally, we'll cover administration and troubleshooting tasks on applications with Compute services and we'll show how to monitor your organization's efficiency with best practices. By the end of this book, you'll have an overall understanding and hands-on implementation of Google Cloud services in your organization with ease.
Table of Contents (14 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

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...