Can you expand a little on this? I may be daft, but I am unsure about
a simple entity update. My confusion due to the .../hr/overview.html
link example involving an ancestor.

Is there a put() limit of 1/sec if my code simply does a
get_by_key_name (or get_by_id), updates a non-indexed field, and
put()s the updated record. E.g.:

rec = sampleEntity.get_by_key_name(keyValue)
rec.counter += 1
rec.put()

alternatively:
rect = sampleEntity.get_by_id(idValue)
...etc...

In this case, I am not that concerned about consistency, jut about the
high availability of the HR app helping to ensure my put() gets
handled. Will this also be a HR transactional process and therefor be
subject to the 1/sec limit?

TIA,
stevep

On Feb 25, 12:20 pm, "Ikai Lan (Google)" <[email protected]> wrote:
> If you get by key and set by key, there will be no consistency issues. HR
> gets by key are always performed in a transaction. Within a transaction, we
> read the journaled write entry from a majority of data centers to determine
> which data is the most recent version. Your scenario will not exhibit
> consistency issues if you do things by key. If you do a query on property
> values, you will need to set a query ancestor to have the same consistency
> guarantee.
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine
>
> On Fri, Feb 25, 2011 at 11:43 AM, Denis Volokhovskiy <
>
>
>
> [email protected]> wrote:
> > Hello,
>
> > High Replication DS solves the issue of latency
> > between requested get/put/delete operation and its actual completion,
>
> > but it still has limitations on how many put requests
> > you can do per second - currently only 1 guaranteed write per second
> > per entity group.
>
> > (here at the bottom :
> >http://code.google.com/appengine/docs/python/datastore/hr/overview.html)
>
> > any entity may be considered as single-item entity group, so this
> > applied to
> > series of puts to the same entity.
>
> > As I understand from your example, particular user are supposed to
> > write into the same entity instance
> > several times - so this may be potentially 'Contention Error'
> > I have encountered such situation on frequently updated entity groups
>
> > May be you may consider several shards for Email entity?
> > Then , you may examine update times and sum chunks in proper order
> > (provided you have some field mtime =
> > db.DateTimeProperty(auto_now=True))
>
> > Or even better - collect some intermediate results in memcache
> > instance
> > and,say, every 1 or 2 seconds do actual write into datastore?
>
> > Best regards,
> > Den
>
> > On Feb 25, 11:43 am, de Witte <[email protected]> wrote:
> > > Hello,
>
> > > We are developing the following datastore for a big application.
>
> > > One table with 10.000.000 records.
>
> > > The application has at any given time 40.000 active users.
> > > These users make frequently adjustments to these records.
> > > In rare cases, more than one user writes to a single record.
>
> > > What happens if a specific user does four requests in a row to adjust a
> > > single record.
>
> > > For example:
>
> > > Entity Email with property content;
>
> > > Request 1: get Email, add 'hello' to content, put Email.
> > > Request 2: get Email, add ',how' to content, put Email.
> > > Request 3: get Email, add ' are y' to content, put Email.
> > > Request 4: get Email, add ' doing' to content, put Email.
>
> > > How can I ensure that the content property has the value 'hello, how are
> > y
> > > doing' after the fourth request?
>
> > > The entity group Email, has no parent.
>
> > > Is this scenario strongly consistent?
>
> > --
> > 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.

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

Reply via email to