Using a global sequence number ensures correct ordering of records but not correct ordering of timestamps. If in a chat application the time is presented to the users with a resolution of seconds, then it may happen that the timestamps presented will sometimes have incorrect ordering (such as the newest message being presented as 15 seconds old while the second newest message is presented as being 7 seconds old). This is perhaps only a minor problem but anyway.
On Jan 12, 7:23 pm, Brett Slatkin <brett-appeng...@google.com> wrote: > > If you need a guaranteed ordering of time, there are a few ways to do > this. One simple way is to use a set of incrementing sequence numbers > in the Datastore. Every time an event happens, you transactionally > increment the sequence number and write the event record to the > Datastore. Then it doesn't matter what the timestamp is on the record, > the events will always be ordered by the absolute time that they came > in. This has some scalability issues (because you essentially have a > global counter). But if you can partition your data reasonably, you > could probably optimize throughput quite a bit. > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---