|
Re: conflict resolution for PersistentList: msg#00141web.zope.zodb
On Wed, 26 May 2004 10:49:09 +0100 Chris Withers <chris@xxxxxxxxxxxxxxxx> wrote: > Syver Enstad wrote: > > What should be the data structure of choice when just wanting to > > store some thousand objects in a flat list with no keys. I am using > > PersistentList for the time being, but the comment that it will make > > the ZODB grow very fast worries me. > > Does order matter to you? > If so, what is the order that matters? > > If not, looks at the BTrees package's OOSet class. > Or should tha tbe OOTreeSet? > > Hmmm, what's the difference between an OOSet, and IOSet and an IISet? OOSet is a set of arbitrary totally ordered objects. That makes it less than optimal for storing much of anything besides simple built-in types (strings, longs, dates, etc). IOSet and IISet are functionally equivilant. They are sets of integers. If the sets will be large then use a TreeSet. OOSet and IISet are stored in a single data block just like lists and dicts. TreeSets are divided up into bucket sets so they are more efficient to deal with, especially for updates since it usually only means storing a single bucket rather than the whole set. ZODB currently lacks a similar data type for large lists. It would be straightforward to create one, but features like conflict resolution are tricky to get right (where right is often just your application's policy anyhow). For example, what happens on concurrent append, insert, delete or pop? There is really no fundamentally right answer to those questions, you need to pick the best one for your app. -Casey _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | BTrees did it, was: conflict resolution for PersistentList: 00141, Diez B. Roggisch |
|---|---|
| Next by Date: | RE: conflict resolution for PersistentList: 00141, Tim Peters |
| Previous by Thread: | Re: conflict resolution for PersistentListi: 00141, Stefan H. Holek |
| Next by Thread: | RE: conflict resolution for PersistentList: 00141, Tim Peters |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |