开发者

Can five different GAE sites all share a common datastore?

开发者 https://www.devze.com 2022-12-23 12:07 出处:网络
In addition to th开发者_如何学JAVAe datastore for your specific site, can you also share one datastore between all your websites?(Like connecting to a different MySQL database from your main MySQL dat

In addition to th开发者_如何学JAVAe datastore for your specific site, can you also share one datastore between all your websites? (Like connecting to a different MySQL database from your main MySQL database?)


Not really.

Two workarounds:

  1. Use five "versions" of the same app instead of five different apps. They would share the same data store. The sites they power need not look alike at all (except sharing the domain).

  2. Make the data store web-accessible by enabling the remote_api. It is up to you to configure the security for this, and performance is not likely to be great. Also, at the moment, the client-side remote_api is only available for Python (the server-side works on Java, too, though).


Short answer: no, your application has one and only one datastore, and it is completely segregated from every other application's datastore.

Longer answer: if you had an external datastore of some variety that was web-accessible, you could access it using urlfetch, but there is no way to access more than one AppEngine datastore using the datastore API.


RESTful services between the apps could be expensive and an alternative could be to use one multitenancy app for many client domains or namespaces to partition your data.

0

精彩评论

暂无评论...
验证码 换一张
取 消