title: Is it possible to force strong consistency of the GAE datastore?
body: <p>Is it possible to  force strong consistency of the GAE datastore?</p>
  
  <p>I have this code:</p>
  
  <pre><code>#!/usr/bin/env python
  Import OS, says
  import wsgiref.handlers
  import webapp2
  from google.appengine.ext import db
  from google.appengine.ext.webapp.util import run_wsgi_app
  from google.appengine.ext.webapp import template
  
  class guestbook(db.Model):
    message = db.StringProperty(required=True)
    when = db.DateTimeProperty(auto_now_add=True)
    who = db.StringProperty()
  
  class ShowGuestbookPage(webapp2.RequestHandler):
    def get(self):
      # Read from the Datastore
      shouts = db.GqlQuery('SELECT * FROM guestbook ORDER BY when DESC')
      values = {'shouts': shouts}
      self.response.out.write(template.render('main.html', values))
  
  class MakeGuestbookEntry(webapp2.RequestHandler):
    def post(self):
      shout = guestbook(message=self.request.get('message'), who=self.request.get('who'))
      # Write into the datastore
      shout.put()
      self.redirect('/')
  
  app = webapp2.WSGIApplication([('/', ShowGuestbookPage),
                                 ('/make_entry', MakeGuestbookEntry),
                                 debug=True)
  
  def main():
    run_wsgi_app(app)
  
  if __name__ == "__main__":
    main()
  </code></pre>
  
  <p>What is the most easy way to strong consistency?</p>
  
  <p>I do not understand how to translate the explanations [1] from Google into the source code.</p>
  
  <p>[1] <a href="https://developers.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency" rel="nofollow">https://developers.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency</a></p>
  
  <p>Thanks for any help.</p>