[Zope3-dev] Re: Making a separate project for zope.bforest

2006-05-06 Thread Martin Aspeli

On Sat, 06 May 2006 21:14:57 +0100, Gary Poster [EMAIL PROTECTED] wrote:

Hey all.  Seems like no-one but ZC has used zope.bforest, and it  
probably fits better in the a million itsy-bitsy projects story now  
that we have it (and an accompanying automated test story).  Anyone  
object if I move it out of the trunk?


A b-forest? That's like so many b-trees you can't see it for them?

Martin



--
You can just adapt yourself out of it... // Archipelago sprint 26/04/2006

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Making a separate project for zope.bforest

2006-05-06 Thread Gary Poster


On May 6, 2006, at 6:13 PM, Martin Aspeli wrote:


On Sat, 06 May 2006 21:14:57 +0100, Gary Poster [EMAIL PROTECTED] wrote:

Hey all.  Seems like no-one but ZC has used zope.bforest, and it  
probably fits better in the a million itsy-bitsy projects story  
now that we have it (and an accompanying automated test story).   
Anyone object if I move it out of the trunk?


A b-forest? That's like so many b-trees you can't see it for them?


:-)

Yes, it's a simple, reasonably-well-tested building block that  
aggregates multiple btrees into a single dict-like interface.  You  
can decide whether you want to see the trees, or the forest.


We've used it for two very different purposes:

- the guts for simple rotating caches (here, the forest is the  
engine for the public API, and the trees are just used internally  
as the buckets that can be cleared and rotated);


- the guts for an object that should be seen both as an aggregated  
container for all jobs, and as an object with two discrete child  
containers for active jobs and for completed jobs, respectively.


I think many of us have written similar code (especially the cache  
with rotating buckets).  It's simple code.  It's a generic task,  
though, so why not start with a shared, tested engine?


But anyway, it's only in the core because we didn't have the mini- 
package story when we packaged it: it's never been in a release, AFAIK.


Gary
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com