Persisting IdentityDictionary

Elliot Finley efinley.lists at gmail.com
Tue Apr 19 02:29:07 UTC 2011


Chris or whoever may be able to answer,

I'm in the process of evaluating Aida/Web.  Part of the evaluation is
obviously the different persistence strategies.  Its default strategy
is to use the image and just take a snapshot every hour.  That works
for some people but I really don't feel comfortable with that strategy
for many reasons I won't go into.

I would really like to use Magma to persist my object graph.  At first
glance it looks simple, just use Magma like normal and persist the
graph.  But upon closer inspection, it turns out that one of the
features that makes Aida/Web so appealing and so easy to use also
makes it difficult (I think, I hope I'm wrong) to persist with
anything other than the image or Gemstone.

Aida/Web keeps two dictionaries:

URL -> Object (Dictionary)
Object -> URL (IdentityDictionary)

If these aren't persisted in an external database, then they'll keep a
reference to every object used in the web application in your image,
thus negating the benefits of using an external database in the first
place.  The Dictionary is easy.  The IdentityDictionary is using the
Object's identityHash as the key and I don't see any easy way to make
that work.

So the question boils down to - Is there a way to persist an
IdentityHash with Magma?  If not, are there any workarounds that you
can think of?

Any help would be appreciated.

Thanks,
Elliot


More information about the Magma mailing list