2
votes

I am building a mobile app with Google Cloud as back-end. It stores information about restaurants including their menu. I would need to search based on the menu items and geo location.

I am fairly confused about which Google Cloud solutions to use. Initially I have planned to use Google App Engine with Cloud Datastore for storing data, but later found out, it doesn't support geolocation search, and even if I use the App Engine search api, I won't get 'like' text search. About using cloud SQL, I am worried about its price. I am also thinking about using Google Compute Engine and installing required MongoDB or SQL in it and use some custom search libraries.

So my question is which of the below should be an feasible and economical solution for storing large amount of data and searching using text and geo-location

  • GAE with Cloud Datastore
  • GAE with Cloud SQL
  • GCE with MongoDB or SQL installed

Any other feasible solutions are also welcome

1
I think your first decision should be: Is my data relational in nature? If it is, I personally like postgres with postgis for geospatial querying. This solution is less out of the box for the Google cloud platform though. For document based systems MongoDB has a lot more features than the datastore, you can do natural text search and geospatial search out of the box. GCE can be expensive, you can look at a small GKE node instead but it depends on your traffic, you might have to look at your scaling options yourself.Dries De Rydt

1 Answers

4
votes

Google has a page to give high-level guidance on what storage option to choose on GCP, called Choosing a storage option.

Specifically for Cloud Datastore:

Description: A scalable, fully-managed NoSQL document database for your web and mobile applications.

Good for:

  • Semi-structured application data
  • Hierarchical data
  • Durable key-value

Common Workloads:

  • User profiles
  • Product catalogs
  • Game state

Specifically for Cloud SQL:

Description: A fully-managed MySQL database service that is built on the strength and reliability of Google’s infrastructure.

Good for:

  • Web-frameworks
  • Structured data
  • OLTP workloads

Common Workloads:

  • Websites, blogs, and content management systems (CMS)
  • Business Intelligence (BI) applications
  • ERP, CRM, and eCommerce applications

As you can see, your use case could border either option. Restaurants + Menus is very similar to product catalogs.

Cloud Datastore would require less ops work/thoughts on your side. For example, you don't need to think about what type of VM instance and memory size it should use. However, to do analytics on data rather than just serving the menus, you'd probably want to do daily dumps into BigQuery.

Cloud SQL will require a little more thought at the beginning, and at small sizes will be a little more expensive than Cloud Datastore. It does give you more flexibility on the analytics side in that it doesn't really need you to dump into BigQuery.

Running a different database on GCE is certainly an option if you want more control. The trade-off here will be in requiring much more active ops work on your behalf, such as installing, patching, tuning, etc.