MG,
Have you considered using Key.getId() method to implement global atomic counter in your application? GAE build in functionality for automatically unique IDs Key.getId() method will return unique long value. Also Keys are indexed, so if your application has to search within counters - indexed search will be efficient. On Wed, Dec 29, 2010 at 5:09 PM, Ikai Lan (Google) <[email protected]<ikai.l%[email protected]> > wrote: > Sweet. Remember that Memcache's INCR operation IS atomic. > > Waiting to see your solution ... as well as what you are using it for =). > > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > Blogger: http://googleappengine.blogspot.com > Reddit: http://www.reddit.com/r/appengine > Twitter: http://twitter.com/app_engine > > > > On Wed, Dec 29, 2010 at 12:38 PM, MG <[email protected]> wrote: > >> Ikai, you are right - I don't need a counter, a sequence of unique and >> growing numbers will do. And I think I can make a scalable numeric >> sequence by combining a sharded counter with a memcache counter (and >> an occasional transaction). I'll post my solution when it's done. >> >> MG >> >> On Dec 29, 1:48 pm, "Ikai Lan (Google)" >> <[email protected]<ikai.l%[email protected]> >> > >> wrote: >> > What are you building? With distributed systems, it can be tricky to do >> some >> > things. A single, scalable, atomic counter is an implementation for a >> > solution, not a solution to a problem. There may be an alternate >> > implementation that'll make your life easier but solve the problem at >> hand. >> > >> > -- >> > Ikai Lan >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine for Java" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<google-appengine-java%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine-java?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
