Using Cloud Datastore API in app engine

113 views
Skip to first unread message

Kinesh Patel

unread,
Mar 17, 2014, 2:28:46 PM3/17/14
to google-a...@googlegroups.com

We have a need to share a datastore across multiple app engine apps. (e.g. we would like to use Flask for our public API, but django for our internal Saas Product  with different scaling needs as just one example). 

Has anyone used the Cloud Datastore API to do something like this? Will I get the same performance (network latency, etc.) that I do normally in my app engine app, or does the HTTP layer route requests differently and introduce overhead?

Is there some other way to share a single datastore across multiple app engine apps? Does the modules functionality provide a separate 'main' entrypoint to allow for different python web frameworks?


Barry Hunter

unread,
Mar 17, 2014, 2:46:43 PM3/17/14
to google-appengine
On 17 March 2014 18:28, Kinesh Patel <kin...@sevenrooms.co> wrote:

We have a need to share a datastore across multiple app engine apps. (e.g. we would like to use Flask for our public API, but django for our internal Saas Product  with different scaling needs as just one example). 

That sounds like a perfect use case for modules. 

 

Has anyone used the Cloud Datastore API to do something like this?

bare in mind that API actully uses a AppEngine app to perform the proxying. Possibly in a hidden module or version. 


 
Will I get the same performance (network latency, etc.) that I do normally in my app engine app, or does the HTTP layer route requests differently and introduce overhead?

Would expect some latency yes. urlfetch to www.googleapis.com > proxies back to a appengine instance > to real datastore. 

 

Is there some other way to share a single datastore across multiple app engine apps? Does the modules functionality provide a separate 'main' entrypoint to allow for different python web frameworks?

Each module is accessible on its own subdomain. Or can override that and access multiple via the default domain. 

 

Jay

unread,
Mar 19, 2014, 9:25:22 AM3/19/14
to google-a...@googlegroups.com
Hello. You can absolutely use modules to achieve what you want, you don't have to use different apps to run multiple web frameworks or change scaling needs. 
See the modules documentation for the info on changing scaling config per module.
In app.yaml you can just split your api calls to be handled by one wsgi handler and everything else to be handled by another, or a third, etc. You do need something in the url of course to be able to differentiate.
Reply all
Reply to author
Forward
0 new messages