On Sat, Aug 20, 2011 at 9:50 PM, Jeff Schnitzer <[email protected]> wrote: > > Second: The key is being able to get a strongly consistent sum of the > sharded counters.
You only really need to know whether widgets are in stock or out of stock. While widgets are in stock, record the customers intent to purchase by placing the order in a pull-queue. Bulk process the queue in batches of 1000 requests, deducting 1000 from a total-widgets counter. Flip the out of stock bit when you run out. All orders received get an entity in the datastore marked with success, or failure for the stragglers which entered the queue before the out of stock bit could be flipped. Ajax form submission on the front end, receive a ticket immediately, poll the ticket until success or failure. -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
