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

Re: Object query language?



--On Monday, March 20, 2000 1:46 PM +0100 Falko Braeutigam 
<falko@softwarebuero.de> wrote:

>> I was expecting the ODMG collections to be disk based and hence of
>> arbitrary size.
>
> This is definitely a goal of the ozone collections but this is not
> defined by ODMG. In fact, it seems that no other ODMG vendor has real
> scalable (disk based) ODMG collections.

Interesting - I didn't know.

> The work of creating the 'cache' object needs to be done ones, where the
> proxies effects each method call!

Yes, but objects are only inserted into the hashtable once.  That is the 
only time hashCode() is called.  When you want to get() an object you're 
going to have to make a new key object - this is going to be as expensive 
as the proxy call.

> However, if the database object is used as a key its hashCode() value
> must not change. So you may also compute the hashCode() once and use this
> non-database object as key.

Not quite.  hashCode() values must not change within a VM instance.  They 
are allowed to change between VM instances.  This is why the hashtable has 
to re-add all the keys individually during deserialization.  Currently the 
hashCode() method of my key relies upon the hashCode() methods of some 
other objects.  Those other hashCodes may change when those objects are 
re-loaded causing my hashCode to change.

> I can add some code to a maybe generated hashCode() method of the proxies
> that checks if the objects is just serialized and return the default
> hashCode in that case. Sounds extremly hackish but should work.

I specifically do not want the default hashCode() - I overrode it for a 
reason.  Using the default hashCode() would stop the hashtable from 
indexing what I want it to index.

I will take a closer look at the Ozone proxy serialization code when I get 
back to CMU.  I think I can re-write it to work correctly in this case.

later,

\x/ill          :-}