[Google Wave APIs] Re: Global Values Reset after minutes of Idle time

2009-12-13 Thread cmdskp
If you're using Java, you could try loading a synchronized static global object from an AppEngine database in a global static block. This will trigger only when the servlet is first loaded by any server and so you get both the speed of simple variables for requests without having to call the

Re: [Google Wave APIs] Re: Global Values Reset after minutes of Idle time

2009-12-13 Thread pamela (Google Employee)
Right, exactly. When you're writing the data, you store it in the datastore and memcache. When you're retrieving the data, you query memcache first, and if it's not there, you query the datastore and re-set the memcache with the value. See: http://code.google.com/appengine/docs/java/memcache/ For

Re: [Google Wave APIs] Re: Global Values Reset after minutes of Idle time

2009-12-13 Thread pamela (Google Employee)
You would likely want to filter on the ID, and then do a get. See examples here: http://code.google.com/appengine/docs/python/datastore/queryclass.html http://code.google.com/appengine/docs/python/datastore/queryclass.htmlSee also the Python Memcache API instructions here:

[Google Wave APIs] Re: Global Values Reset after minutes of Idle time

2009-12-11 Thread eng.ma2m...@gmail.com
Thanks Pamela, It is a great option indeed but I found it quite slow. I compared it with the old global variables version and this one is slower. Is thee another way to do it? does normal storing to separate classes work in this case or it is similar to global variables (got reset after