[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC for Ozone



* Falko Braeutigam <falko@smb-tec.com> [010524 12:10]:
> You don't need to handle collections separatly. They are Java objects as well.
> YOu can find all proxies (external references) from an database object (which in
> fact is a graph of simple Java objects) using reflection and nothing else.
> 
> IMO the problem is not to find all external references from a database object.
> The problem is that this information is stored right _inside_ the objects
> itself, which means that you would have to activate the entire database in
> memory, when you want to build the entire graph in order to search for
> unreachlabe parts of the graph.
> So IMO the GC has to work iteratively. mark&sweep _is_ iteratively AFAIK, right?

Yes, mark&sweep can be implemented iteravly, it might also help to
implment a generational GC to break up the work into smaller bits
(statistics about age of objects/frequency of deletion from live
databases would help here). Also if we keep the "color" of each OID
external we can avoid having to load/activate each object, however
this implies adding code to every DB Object to color itself upon a
write or read (depending on model used) operation. However I assume
that this is no as big a performance problem as it is for traditional
memory GC systems since writes are quiet slow as it is and a byte more
shouldn't matter.

I'm reading up on the Reflection API now since I've never worked with
it up it looks like the Class.getCLasses() and .getFields() mehtods
are just what I was looking for to find child objects.

>
> 
> > 
> > P.S> If anyone happens to know if there are publications on this
> > matter I would be glad to here of them since most GC stuff I have read
> > pertained to memory only systems where IO is fairly cheap compared to
> > our case.
> 
> Well, field of real research - makes it real interesting ;)
> 
That's why I want to work on it :) Alwyas nice to travel unkown territory.

On a diffrent note, I am developing a controller servlet atm which
uses Ozone as its back-end and I was wondering if ExternalDatabse is
thread safe, ie, can I use a single instance of ExternalDatabase or
should I generate a new one for each request I process (since they
could be processed in parallel)?


Olaf
-- 
  ()~()   Olaf Mersmann - Student of Applied Physics 
 (-___-)  eMail: olafm@slaveone.tako.de 
 =='-'==  web: http://kimberly.dnsalias.net/ome 

PGP signature