Can five different GAE sites all share a common da

2019-05-21 03:16发布

In addition to the 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?)

3条回答
女痞
2楼-- · 2019-05-21 03:45

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.

查看更多
Rolldiameter
3楼-- · 2019-05-21 03:47

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.

查看更多
我命由我不由天
4楼-- · 2019-05-21 04:06

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).

查看更多
登录 后发表回答