Hi Albert,

Thanks for the suggestion.  I think I can live without uniqueness as
long as timestamps don't go backwards.  But I think my problem still
exists with a sharded counter.  Having a counter is certainly better
than using datetime.utcnow() and lets me assign an order to all events
that have been generated, but that's not really the problem.  The
tricky part is deciding, on the client end, which events to request
based on the events you've received.  When the client asks for "all
events after time T" it gets some "last" event with a new timestamp
S.  But I don't think you can trust this S because there might be some
other event in some corner of GAE with an earlier timestamp that
hasn't yet been observed by the server that answered the client's
request.

I guess the root of the problem is that I know that transactions on
entity groups give me the ACID properties but when it comes to
operations outside of transactions I have no idea what the consistency
model is.  Has this been described somewhere?

Thanks,
-n8

On Jul 13, 7:06 pm, Albert <albertpa...@gmail.com> wrote:
> Hi!
>
> This is a quick suggestion.
>
> How about using a global counter (just like your title suggests). You
> can use a sharded global counter to facilitate your counting.
>
> And use that counter as a "timestamp" / bookmark.
>
> On every "event", you read from the global counter, use that value as
> your "timestamp", and then increment the global counter.
>
> I'm not sure of it's implications, though. I'm not also sure if it
> actually guarantees uniqueness of "timestamps" when two events happen
> almost at the same time.
>
> Perhaps you can get an idea from this.
>
> Enjoy!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to