Can five different GAE sites all share a common datastore?
Asked Answered
O

3

2

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

Orenorenburg answered 21/3, 2010 at 21:15 Comment(0)
T
2

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

Toddle answered 22/3, 2010 at 6:14 Comment(0)
T
1

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.

Thebaid answered 21/3, 2010 at 21:25 Comment(1)
You can make all datastores web-accessible using the remote_api. This is what the backup/restore scripts use that Google includes in the SDK.Toddle
G
1

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.

Gildus answered 22/3, 2010 at 2:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.