1
votes

I need to store json objects on the google cloud platform. I have considered a number of options:

  1. Store them in a bucket as a text (.json) file.
  2. Store them as text in datastore using json.dumps(obj).
  3. Unpack it into a hierarchy of objects in datastore.

Option 1: Rejected because it has no organising principles other than the filename and cannot be searched across.

Option 2: Is easy to implement, but you cannot search using dql.

Option 3: Got it to work after a lot of wrangling with the key and parent key structures. While it is searchable, the resulting objects have been split up and held together by the parent key relationships. It is really ugly!

Is there any way to store and search across a deeply structured json object on the google cloud platform - other than to set up mongodb in a compute instance?

1
Have you tried using embedded entities to create nested structures? - TheAddonDepot
Side note: your option 1 is GCS, not the datastore - different beasts. - Dan Cornilescu

1 Answers

0
votes

I don't know what your exact searching needs are, but the datastore API allows for querying that is decently good, provided you give the datastore the correct indexes. Plus it's very easy to go take the entities in the datastore and pull them back out as .json files.