durusmail: durus-users: A silly question
A silly question
2005-12-15
2005-12-15
2005-12-15
2005-12-15
Re: A silly question
2005-12-15
2005-12-15
2005-12-16
2005-12-16
Re: A silly question
A silly question
Jesus Cea
2005-12-15
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The mailing list seems fairly slow :-p

David Binger wrote:
> I think it would be safe to drop it, if you don't need to worry too much
> about packing out "lost" instances.

In current Durus, packing is needed only to clean up:

* Old instances, replaced with updated ones.
* Garbage instances, unreachable from "root".

The first is already solved with BerkeleyDB "per se". Now I'm thinking
about the second one.

The obvious path is using reference counting with objects.

When an object is loaded into the cache, we know what other persistent
objects it references. My idea could be to keep that info, even when the
object is modified.

In the commit step, we simply compare the original reference info with
the new one. With that comparison we can update reference counters in
each object affected and release the garbage. So, the update can affect
several objects, but since BerkeleyDB is ACID and updates are saved in
write-ahead files, performance should be good and integrity is garanteed
(if my code is bug free, that is :-)

Any suggestion?. Any pitfall I should know?.

I have another question:

Is Durus threadsafe?. Looking at the code, I don't think so :-?

- --
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea@argo.es http://www.argo.es/~jcea/ _/_/    _/_/  _/_/    _/_/  _/_/
                                      _/_/    _/_/          _/_/_/_/_/
PGP Key Available at KeyServ   _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBQ6HLJ5lgi5GaxT1NAQLLhgP/eJpRqZJ/JS7sKIQLPKez7IeUK9Bo5Igy
zikpoQBQxQ2HuYdTC9Gg0uJy90m/IR7KQGTxq4Zuq/2QlspqX4calkiDw0DkU1/k
dsSp17xiqz4+YRSj0fHPYfOj1GxqfsWu4j4ovrNfQJfIHyPBo69sg5gPkfGtKBh4
Wjq4oKW2rAA=
=Zz/Z
-----END PGP SIGNATURE-----
reply