[ZODB-Dev] create unique container keys

Jim Fulton jim at zope.com
Thu Apr 2 12:13:22 EDT 2009


On Apr 2, 2009, at 10:22 AM, Alan Runyan wrote:

> It seems like such an easy goal: autoincremental integers for a
> container.

That isn't the goal here.

>  Is this such a problem because of the ZODB architecture?

It's such a problem because it isn't one problem (differing use cases)  
and because of scalability.


>
> or lack there of?  There are two database primitives that everyone
> appears to want:
>
>  - autoincrementing integers for containers (tables)

People want to generate keys. The keys they want can vary depending on  
requirements.

ZODB already provides a mechanism for autogenerating unique ids. The  
storage API uses this for generating object ids.  It's been proposed  
to add a general facility that could be used by applications.  
Generating ids sequentially across threads, even if you avoid id  
conflicts, is unattractive because you'll tend to provoke conflicts  
when BTrees split.

Jim

--
Jim Fulton
Zope Corporation




More information about the ZODB-Dev mailing list