[google-appengine] Ensure strong consistency using 'contrived' keys

2012-01-17 Thread Klaas Pieter Annema
I see the following pattern in the documentation to ensure strong consistency: user_key = db.Key.from_path('User', 'ryan') # Put two entities db.put([TestModel(parent=user_key), TestModel(parent=user_key)]) # Global query doesn't see the data. self.assertEqual(0, TestModel.all().count(3)) #

Re: [google-appengine] Ensure strong consistency using 'contrived' keys

2012-01-17 Thread Jeff Schnitzer
There's nothing wrong with using a parent key that doesn't correlate to a real entity. However, be aware that your write throughput for that entity group will be limited to approximately one transaction per second. I use this technique when synchronizing bulk data from a third-party. I have a

Re: [google-appengine] Ensure strong consistency using 'contrived' keys

2012-01-17 Thread Klaas Pieter Annema
Ok, I just wanted to make sure that I wouldn't run into trouble later. Thanks, - Klaas Pieter On Tuesday 17 January 2012 at 18:15, Jeff Schnitzer wrote: There's nothing wrong with using a parent key that doesn't correlate to a real entity. However, be aware that your write throughput for