> os.getpid isn't available

Thanks.

> nor unique across processes.

Huh?  During the life of a process A on a machine B, no other process
on B will have the same process id as A.

Two different processes on a given machine may have the same id if
their lifetimes are disjoint and two processes on different machines
may have the same process id at the same time, but the latter is just
why some sort of machine identifier is important.


On Nov 22, 5:43 pm, yejun <[EMAIL PROTECTED]> wrote:
> UUID should be ok, which use system urandom as seed by default.
> os.getpid isn't available nor unique across processes.
>
> On Nov 22, 8:07 pm, "David Symonds" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sun, Nov 23, 2008 at 8:50 AM, Andy Freeman <[EMAIL PROTECTED]> wrote:
> > >> > Suppose that I want to atomically create an entity group with two
> > >> > nodes, one the parent of the other.
> > >> But *why* exactly do you want to do this?
>
> > > Because I want "a set of one or more entities that can be manipulated
> > > in a single transaction. Entity group relationships tell App Engine to
> > > store several entities in the same part of the distributed network. A
> > > transaction sets up datastore operations for an entity group, and all
> > > of the operations are applied as a group, or not at all if the
> > > transaction fails."
>
> > Yes, I understand transactions and entity groups. Why do you need to
> > create an entity group *atomically*?
>
> > > The fact that GAE uses many machines and concurrently is why the full
> > > hostname, IP, or MAC address or some other machine identifier is
> > > useful in creating a unique identifier on GAE.  (If my application
> > > always ran on the same machine, the process id and time would be
> > > sufficient.)
>
> > If you create a new entity, it will automatically be assigned a unique
> > key at the datastore level. What's wrong with just using that?
>
> > Dave.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to