0
votes

Currently our system is designed in a very ad-hoc manner. There are cases where we have datastore entities designed as

NameSpace: ProjectName

Kind: <SpecificUseCaseLikeSQLTables>

Then there are cases where we have defined our entites such as

Namespace: <SomeKeyWhichUniquelyDefineAnObject>

Kind: SpecificUseCaseLikeSQLTables


Now, we are in a situation where a single call from user is taking around 10 seconds to response. I am looking into that function and it looks like we end up fetching multiple entities for one specific use case. Right now i am trying to see how many of those calls that can be fetched only once (i.e., if there is no change in those entities, those entities should get passed down to nested functions rather being fetched again). But besides that, one thing that i am thinking is that is there a way where I can issue only one query to datastore to fetch data from multiple namespaces/kinds (as described above).

In layman terms, I am asking, is there a concept of joins in Datastore? Or an alternative to it?

1
Are you fetching data by keys or by query? If you are fetching entities by key you can fetch multiple entities in parallel using the [GetMulti][1] function. [1]: pkg.go.dev/cloud.google.com/go/… - Jim Morrison

1 Answers

1
votes

Joins are not supported in GAE. You could check the following documentation(http://code.google.com/appengine/docs/java/datastore/jdo/relationships.html).

If you are looking for RDBMS style databases you can try using Cloud SQL (https://developers.google.com/cloud-sql/docs/introduction).