[rucksack-devel] How do you use rucksack?

Christophe Rhodes csr21 at cantab.net
Mon Mar 12 16:40:14 UTC 2007


Hi,

I began to investigate building a simple application over the weekend,
along the lines of an addressbook, and I thought I'd give rucksack a
try for the persistent storage facility.  However, I quickly ran up
against the problem of wanting to delete objects from indices.

For instance, one way of managing the information might be something
along the lines of
  (defclass person ()
    ((surname :index <some kind of index>)
     (other-names)
     (address))
    (:metaclass persistent-class)
    (:index t))
but I rapidly discovered, as I built toy commands for adding,
visualising and editing entries, that I couldn't remove anything.  I
understand the rationale given in the ECLM talk -- you get dangling
pointers if you let users delete stuff -- but then I simply don't
understand how you're meant to use rucksack.

Anything which is indexed is a root for the garbage collector, so it
would appear that I can't have both indexing over some property of a
class and also have instances of that class ever be reclaimed by the
garbage collector.  Is that right?  If so, how would you suggest that
something like an addressbook be implemented using rucksack for
storage.  (If you do, that is; maybe rucksack just isn't designed for
that, but if it isn't I'd be interested in knowing in what
circumstances it is used.)  I can imagine using, say, a persistent
array for my root set, but as I say, to get collection of my instances
I must not index anything...

Thanks,

Christophe



More information about the rucksack-devel mailing list