[ZODB-Dev] Storing ordered elements

Jim Fulton jim at zope.com
Tue Nov 2 12:48:22 EDT 2010


On Tue, Nov 2, 2010 at 12:45 PM, Pedro Ferreira
<jose.pedro.ferreira at cern.ch> wrote:
> Hello all,
>
> I need to store a sequence of records inside a BTree (or any other
> structure that supports ranges), ordered by time of execution. My first
> approach was to simply use an IOBTree where values are sets (as most
> probably there will be some entries with the same timestamp, as the
> resolution will be limited). However, I would like the values inside the
> sets themselves to be ordered. So, I thought of using CompositeQueues
> (zc.queue) as values, instead of sets. However, I made some tests and
> its seems that CompositeQueues are more prone to conflicts than OOSets.
> I would like to avoid conflicts as much as possible, as this structure
> will be accessed very frequently from different ZEO clients.
> Can anybody think of a better solution for this?

OOSets are ordered.

Jim

-- 
Jim Fulton


More information about the ZODB-Dev mailing list