Index writes are technically asynchronous, since the RPC actually returns
before the index is written. However, the index is written so quickly that
this has never been an issue. For all intents and purposes, it's
instantaneous.

This will, however, incur additional CPU costs. Daniel, you should
investigate setting indexed=False on many of these properties.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Sun, Feb 20, 2011 at 9:16 AM, stevep <prosse...@gmail.com> wrote:

> I believe that by not explicitly setting indexing to False, you're
> getting an implicit index on every item (apart from non-idexables like
> Texts). If these item values change a lot, your put() may be quite
> expensive and slower than expected. You might also end up wondering
> why you've got so much storage related to indices. Even without values
> that change, your index structure is still very likely to greatly
> affect your put() performance. Are you sure this is what you want/
> need?
>
> My limited experience has me now striving to push index updates into
> task queues whenever feasible to keep the on-line handler put() as
> fast as possible. This often results in a separate index-only db class
> linked to the original record via its id value. Doesn't solve every
> problem, but will certainly be much faster (again that statement is
> based on my limited experience). I'm starting to get used to this
> setup, and find it a fairly decent workaround to avoiding potential
> DeadlineExceeded issues in the on-line handler.
>
> Hope this helps,
> stevep
>
> On Feb 19, 11:32 am, Daniel <danielkra...@gmail.com> wrote:
> > I have a model that holds a bunch of game data:
> >
> > class MyGame(db.Expando):
> >
> >     sender=db.StringProperty()
> >     senderScore=db.IntegerProperty(default=0)
> >     senderChatWaiting=db.BooleanProperty(default=False)
> >     senderResigned=db.BooleanProperty(default=False)
> >     senderHideGame=db.BooleanProperty(default=False)
> >
> >     recipient=db.StringProperty()
> >     recipientAccepted=db.BooleanProperty(default=False)
> >     recipientScore=db.IntegerProperty(default=0)
> >     recipientChatWaiting=db.BooleanProperty(default=False)
> >     recipientResigned=db.BooleanProperty(default=False)
> >     recipientHideGame=db.BooleanProperty(default=False)
> >
> >     bucket=db.TextProperty()
> >     board=db.TextProperty()
> >     currentPlayer=db.IntegerProperty(default=0)
> >     whosTurn=db.StringProperty()
> >     whosWaiting=db.StringProperty()
> >     moveID=db.IntegerProperty(default=1)
> >
> >     lastPlayed=db.StringProperty()
> >     lastPointsRecieved=db.IntegerProperty(default=0)
> >
> >     chatLog=db.StringListProperty()
> >
> >     created=db.DateTimeProperty(auto_now_add=True)
> >     lastUpdate=db.DateTimeProperty(auto_now_add=True)
> >     gameFinished=db.BooleanProperty(default=False)
> >     gameResigned=db.BooleanProperty(default=False)
> >
> > I have a single method that updates all of these values for a particular
> > existing game record and does a single .put() at the end to save it.  Is
> it
> > possible that only some of the items are updated and not others.. a
> partial
> > put()?  I was assuming that a put() would either succeed or fail, but not
> > partially succeed.
> >
> > I'm trying to track down a bug in my app and curious if it's possible I
> have
> > a partial write.. if not the bug is probably elsewhere in my server code
> or
> > client.
> >
> > Thanks
> > Daniel
>
> --
> 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.
>
>

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