Yes, keys are unique, but they are strings, and quite long (20+
characters, from what I've seen). I do need unique and "growing"
numeric counter.

On Dec 28, 11:20 pm, nischalshetty <[email protected]> wrote:
> Have a look at the Datastore "Key" thingy. The keys generated are
> unique across the system IMO. Not sure though but that's what I
> remember reading somewhere.
>
> -N
>
> On Dec 29, 7:43 am, MG <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hello!
>
> > I need to create a global atomic counter (64-bit) in my AppEngine/J
> > app. Like
>
> > long count = MyCounter.increment()
>
> > that will 100% guarantee that count will never ever be the same for
> > two different requests, and that I will be able to increment it
> > several million times/day initially, and much more if/when traffic
> > increases. I do not really care if it skips a number or two
> > occasionally: I can live with it returning a value larger than the
> > actual number of calls, but I do need absolute uniqueness and
> > reasonably linear growth (i.e. is two consecutive calls from a client
> > should result in ascending counter values).
>
> > Is this possible to do with Google AppEngine? Sharded counters can
> > ensure consistent counting, but not unique counts; memcache counters
> > can ensure unique increments, but they are perishable and thus
> > difficult (impossible?) to properly synchronize with persistent
> > storage. Using one entity to read-update in a transaction will not
> > scale...
>
> > Thanks,
> > MG

-- 
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.

Reply via email to