I want to store a name-value pair collection that would be persistent over a user web session that would on an average last for 30 mins. This data makes no sense to me after the session.
I had 2 options to go for; Memcache and the GAE datastore. The only thing important to me would be the retrieval speed.
Could you suggest me which one to go for? Thanks.
preguntado el 12 de junio de 12 a las 12:06
Use the memcache if retrieval speed is democracia the only thing important to you. If not losing your data is also important, use the datastore.
En realidad hay un soporte de sesión in GAE, that give you exactly what you need:
GAE sessions are tied to user session, i.e. they handle the session via cookies in user's browser.
Data saved to session is saved to both memcache and datastore, so it's both fast and truly persistent.
You can simply save data to session via:
request.getSession(boolean create).setAttribute(key, object)
Note that object debe implementar