Hello,
What's a good practice to create unique container keys for a heavily
loaded application? (I mean lots of writes to the same container)
Obviously having a counter on the container and incrementing and using
that for key gives write conflicts.
What do the experts use?
thanks
--
Best
On Thu, 2009-04-02 at 10:19 +0200, Adam GROSZER wrote:
Hello,
What's a good practice to create unique container keys for a heavily
loaded application? (I mean lots of writes to the same container)
Obviously having a counter on the container and incrementing and using
that for key gives
On Thursday 02 April 2009, Adam GROSZER wrote:
Yeah, uuid was my guess.
Christian was not necessarily thinking uuid. I think the common algorithm is:
x = random.randint(10**9)
while str(x) in container:
x += 1
Regards,
Stephan
--
Stephan Richter
Web Software Design, Development and
It seems like such an easy goal: autoincremental integers for a
container. Is this such a problem because of the ZODB architecture?
or lack there of? There are two database primitives that everyone
appears to want:
- autoincrementing integers for containers (tables)
- indexes (not in
On Thu, 2009-04-02 at 09:22 -0500, Alan Runyan wrote:
It seems like such an easy goal: autoincremental integers for a
container. Is this such a problem because of the ZODB architecture?
or lack there of? There are two database primitives that everyone
appears to want:
- autoincrementing
On 4/2/09 4:36 PM, Christian Theune wrote:
ZODB has autoincrement support for one type: OIDs.
The problem of autoincrement is that this needs to be handled outside
the scope of transactions.
In a distributed fashion this seems rather hard to do in comparison to
just buying into conflicts.
On Thu, 2009-04-02 at 16:41 +0200, Wichert Akkerman wrote:
On 4/2/09 4:36 PM, Christian Theune wrote:
ZODB has autoincrement support for one type: OIDs.
The problem of autoincrement is that this needs to be handled outside
the scope of transactions.
In a distributed fashion this seems
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