Hey Tom,
Yup, the solution I suggested will touch multiple entity groups.
That means the best we can do is probably eventual consistency, but it
can still be really fast.
Check out transactional tasks, if you've got low update rates or you
don't expect a great deal of contention, you could simply push an
'update' task to update your indexes.
If you expect high write rates, or a lot of contention, you should
look into batching the updates. There are many batching techniques,
depending on your needs. If you'd like something that will be quite
accurate check out 'slagg'. I've included an example that is quite
similar to what you're wanting (see examples/basic_group_indexor.py).
Sorry for the lack of detailed documentation; I'm working on that,
along with some large code improvements, but have been swamped with
other projects recently.
https://bitbucket.org/thebobert/slagg
Also, I agree with you about the indexes. I'd love to be able to
only fetch the "index key" rows too.
Robert
On Sun, Aug 14, 2011 at 03:22, Tom Fishman <[email protected]> wrote:
> Carter's method is good for slow update and I will definitely use it.
> I do need an "interactive solution" in the mean time. Robert, your method
> will be touching two entity groups, so there might be inconsistent results
> when one of the transactions fails.
> I really hope we can query/count the index without touching the entities.
> I'm sure it is technically doable.
> So, I don't think I have a robust/efficient solution now.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/BEjbfHAMI0QJ.
> 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.