Re: [appengine-java] elegant way of implementing sequence generator

2010-04-06 Thread Ikai L (Google)
Memcache data is never persisted to disk, so in the event of a Memcache server restart, you will lose all the data in Memcache. In addition, Memcache evicts items based on an LRU cache: if you don't use data for a while and space is needed, the item will be removed from your cache to allow for

Re: [appengine-java] elegant way of implementing sequence generator

2010-04-03 Thread aswath satrasala
Hello Ikai, I am interested in Sequences, sequence starting from a initial value and increments. Can you little bit elaborate here on what is the risk with volatile here when using memcache. Regards -Aswath On Sat, Mar 6, 2010 at 1:05 AM, Ikai L (Google) ika...@google.com wrote: Have you

Re: [appengine-java] elegant way of implementing sequence generator

2010-03-05 Thread Ikai L (Google)
Have you looked into Memcache's INCR? http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#increment(java.lang.Object, long) This'll do it atomically, but you run the risk of it being volatile, so you'll have to account for that in your client

[appengine-java] elegant way of implementing sequence generator

2010-03-02 Thread legendlink
hi, i wanted to have a sequence generator that increments by x value everytime it generates a value. if i would create the sequence generator by using the datastore, it is likely that data contention would occurr if there is high access times. i have looked into the sample code of max ross in the