Automatic index maintenance

Chris Muller asqueaker at gmail.com
Mon Mar 3 04:19:00 UTC 2008


Hi Sebastian,

>         I'm experimenting with a proxy I used for a "kind of MagmaCollections"
>  supported by Omnibase I've made to make able Magma to maintain indexes of its
>  MagmaCollections in a transparent fashion. This is the same as freeing the
>  developers (that's us) of having to send #noteOldKeys: in their code and its
>  consequences! :)

This sounds very interesting, would you mind sharing more details
about how you accomplish your solution?

>         Right now I'm in a proof of concept stage and I see it working quite
>  nicely :) I just need to know which is the best way of efficiently make a magma
>  session to answer all the possible attributes of all the magma collection
>  indexes in a repository. This is needed to configure the proxies so they can
>  detect key changes and notify the session to note that.

It's interesting how this was just *removed* from the
RepositoryDefinition just a few versions ago.  It was a cache of all
MagmaCollections in the repository, just what you needed, but it
design improvement to remove them, since the number of
MagmaCollections you could have would be constrained by memory.

>         A trivial solution is to use a private entry in the root dictionary
>  where a Set could store the symbols. Anyone interested on this feature see any
>  problem with that?

No, the root should actually NOT be a Dictionary (and I have just
removed this bad "suggestion" from the documentation).

>         Any better suggestion?

You may wish to attach your Set of Symbol attributes to the
MagmaRepositoryDefintion.  This is the root of "domain" model that
describes a Magma repository.  Whenever an index is added to any
collection, this Set could be updated.  There shouldn't be scalability
problem since the number of different attribute selectors could not
exceed the number of Symbols in an image, which would only number in
the thousands at most.

 - Chris


>
>         cheers,
>
>  Sebastian Sastre
>  PD: an ideal solution will be to ask somehow to the server to answer all the
>  instances of MagmaCollection (no matter where they are in the odb graph) and
>  cache in the session a set of indexed attributes (also monitoring for new
>  created/deleted indexes offcourse).

It's hard to say without knowing more about how it works..

>
>
>  _______________________________________________
>  Magma mailing list
>  Magma at lists.squeakfoundation.org
>  http://lists.squeakfoundation.org/mailman/listinfo/magma
>


More information about the Magma mailing list