Hi Joe,
  What are you actually trying to do?  Is there a single global LIFO
stack, or are there multiple stacks?  How are new items added to the
stack(s)?  In batches to one stack at a time, batches across stacks?
What is the addition rate?  How are items removed / processed from the
stack(s)?  Is there a requirement that the items are precisely ordered
or are some (or small) mis-orderings acceptable?


  Why do you say: " I can't use a composite index since it would
explode with my use case"?

  The auto-generated ids are not strictly increasing.  What would be
fine if you could handle your entire result set in one request?

  Using the current time may also be problematic since the machines
will have slight variations, and in some cases significant variations.


Robert






On Sat, Feb 12, 2011 at 14:38, Joseph Letness <[email protected]> wrote:
> Hi everybody, I was wondering if anybody has any good ideas for
> generating LIFO (Last In FIrst Out) key names.  I can't use a
> composite index since it would explode with my use case.
>
> Currently, I can think of two methods:
>
> Use the auto generated id (which, I believe is accumulative), query
> for keys only and reverse the list in memory.  This would be fine if I
> can guarantee that my entire result set can be handled within a single
> request.
>
> OR
>
> Create a de-accumulator Entity in the datastore and have it count down
> from some reasonably high integer and create my key name with that (a
> composite of the de-accumulation and the entity nam).  The draw back
> for this method is that I'm incurring an additional read-write every
> time a new LIFO entity is created and possible contention on the de-
> accumulator if I run it in a transaction (I haven't decided if
> consistency of the de-accumulation is imperative for my use case yet).
>
> I'm using Python.  If anybody has any better ideas it would be much
> appreciated!
>
> Thanks,
>
> --Joe
>
>
> --
> 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