You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Richarz, Klaus (Computer Service)" <Kl...@otto.de> on 2004/06/02 10:17:34 UTC

[cache] What objects are cached in ojb ?

Hallo *,

we are using the OSCache along with JGroups to implement a distributed cache for our OJB based application.
The question we cannot answer is, how OJB uses the cache implementation, especially what objects are cached.

1. Does OJB cache the 1-object along with it's n-side object in a 1:n relationship ? And are those n-objects cached on their own a second time ? We have a complex data-structure, and when we serialize an object, we get up to 6mb of data per object (including the related n-objects). This is way too much for synchronizing, since we have hundreds of such objects, which are only about 20 kb per object, without their related objects.

2. is this the same in m:n relationships ?

3. What about dynamic proxies, that are already materialized ?

4. What about list proxies ?

Thanks in advance,
Klaus Richarz

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: [cache] What objects are cached in ojb ?

Posted by Armin Waibel <ar...@apache.org>.
Hi Klaus,

Richarz, Klaus (Computer Service) wrote:
> Hallo *,
> 
> we are using the OSCache along with JGroups to implement a distributed cache for our OJB based application.
> The question we cannot answer is, how OJB uses the cache implementation, especially what objects are cached.
> 
> 1. Does OJB cache the 1-object along with it's n-side object in a 1:n relationship ?
> And are those n-objects cached on their own a second time ? We have a complex data-structure, and when we serialize an object, we get up to 6mb of data per object (including the related n-objects). This is way too much for synchronizing, since we have hundreds of such objects, which are only about 20 kb per object, without their related objects.
> 

current cache implementations are simple and cache all passed objects. 
All referenced objects will be passed to cache and the main object with 
all references too. This doesn't matter in a single JVM cache, because 
objects passed by reference. But in distributed caches with serialized 
objects it will duplicate objects.

I'm currently started work on a real two-level cache and a new 
ObjectCache only based on "flat objects" (object fields without 
referenced objects). Additionally new properties to minimize cache 
operations will be introduced.

> 2. is this the same in m:n relationships ?
> 

yes. I think so

> 3. What about dynamic proxies, that are already materialized ?
> 

proxies will not be cached, but if they are materialize the real object 
will be passed to cache.

> 4. What about list proxies ?

when the collection objects are materialize they will be passed to cache

regards,
Armin

> 
> Thanks in advance,
> Klaus Richarz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org