I periodically have a large number of requests (thousands) to my site in the 
space of a few seconds.

I need to record the order in which the requests access the site so I can do 
downstream processing. The order does not have to be exact, I only need 
resolution down to 1 second: I don't care which order two requests are in if 
they are 10 ms apart. However I do care which order they are in if they are 
1500 ms apart.  

The only problem is that I cannot figure out how to do this.

I though about creating a datastore entity that contains a timestamp for 
each request to the site. (It doesn't matter if two or more entities have 
the same timestamp.) However I understand the clocks between machines in App 
Engine are not necessarily synchronised and could vary wildly. It would be 
ok for business logic if they only varied by 1-1.5 seconds at the most but I 
don't think this can be guaranteed.

I thought about using memcache's atomic increment function instead of a 
timestamp for each new request but this could be wiped at any time so is no 
good. Even if the wipe occurs rarely, I cannot afford it to happen just 
once.

How can I solve this type of problem?

Best wishes,
Dan

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