chris
chris

Reputation: 1811

Sharing memory-based data in Google App Engine

I'm loosely considering using Google App Engine for some Java server hosting, however I've come across what seems to be a bit of a problem whilst reading some of the docs. Most servers that I've ever written, and certainly the one I have in mind, require some form of memory-based storage that persists between sessions, however GAE seems to provide no mechanism for this.

What I actually need is a high performance (ie. memory-based) store that is accessible to, and consistent for, all client requests. In this case it is to provide a specialized locking and synchronization mechanism that sits in front of the datastore.

It seems to me that there is a big gap in the functionality here. Or maybe I am missing something?

Any ideas or suggestions?

Upvotes: 2

Views: 1244

Answers (1)

Dave W. Smith
Dave W. Smith

Reputation: 24966

Static data (data you upload along with your app) is visible, read-only, to all instances.

To share data between instances, use the datastore. Where low-latency is important, cache in memcache. Those are the basic options. Reading out of the datastore is pretty fast, it's only writes you'll need to concern yourself with, and those can be mitigated by making sure that any entity properties that you don't need to query against are unindexed.

Another option, if it fits your budget, is to run your own cache in an always-on backend server.

Upvotes: 3

Related Questions