You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Brian McCallister <mc...@forthillcompany.com> on 2004/10/06 17:40:21 UTC

[vote] Make TwoLevelCache the Default in 1.1

We should make the new TwoLevelCache (thank you Armin!) the default in 
1.1 (heck, I'd like to in 1.0.2, but that is too big a change for 
bugfix).

I think this is a no brainer, but is a significant change as most 
people just use whatever the default is.

-Brian



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


Re: [vote] Make TwoLevelCache the Default in 1.1

Posted by Martin Kalén <mk...@apache.org>.
Brian McCallister wrote:

> We should make the new TwoLevelCache (thank you Armin!) the default in 
> 1.1 (heck, I'd like to in 1.0.2, but that is too big a change for bugfix).

+1 for making it default in 1.1 - I think it has more logical semantics than the current 
default.


  Martin


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


Re: [vote] Make TwoLevelCache the Default in 1.1

Posted by Armin Waibel <ar...@apache.org>.
Brian McCallister wrote:

> Basically a PerBroker cache which defaults to a DefaultObjectCache (with 
> stripped relations) on miss. That is a little simplified, but Armin can 
> describe it better than I can.
>

I can describe it better in German than you, but English... ;-)

During a PB-tx all used objects are buffered by the first level cache 
(LocalCache.java) on commit the buffered objects are pushed to the 
second level (as Brian said above, a "normal" ObjectCache 
implementation). On abort all buffered objects will be discarded.

The first level cache is not shared (single threaded) and bind to a PB 
instance (LocalCache.java), the second level cache is shared across a 
PersistenceConfiguration PC (some times shared across different PC via 
object invalidation, e.g. different metadata model work on same DB) and 
was part of the PC instance (CacheManager.java)

Between the first and second level the CacheStrategy.java implementation 
prepare/change/modify the objects for the second level. With a 
CacheStrategyDefaultImpl property now it is possible to enable the first 
version of a "real" two-level cache. CacheStrategy make "copies" of the 
passed objects from the first level cache and push these "new" objects 
to the second level (the used ObjectCache implementation). This way the 
second level always in sync with the DB.

On lookup the CacheStrategy lookup the "copy" from second level cache 
and rebuild the cached object. This object was passed to the first level 
cache ...

Hope this help, all requests in German or Swiss dialect ;-)

Armin





> With Default right now there are some nasties as it keeps relations 
> which you may be expecting to be unloaded, particularly when you factor 
> in serialization and locking.
> 
> -Brian
> 
> On Oct 6, 2004, at 11:44 AM, Jakob Braeuchi wrote:
> 
>> hi brian,
>>
>> excuse my ignorance, but what exactly is the TwoLevelCache ?
>>
>> jakob
>>
>> Brian McCallister schrieb:
>>
>>> We should make the new TwoLevelCache (thank you Armin!) the default 
>>> in 1.1 (heck, I'd like to in 1.0.2, but that is too big a change for 
>>> bugfix).
>>> I think this is a no brainer, but is a significant change as most 
>>> people just use whatever the default is.
>>> -Brian
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

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


Re: [vote] Make TwoLevelCache the Default in 1.1

Posted by Brian McCallister <mc...@forthillcompany.com>.
Basically a PerBroker cache which defaults to a DefaultObjectCache 
(with stripped relations) on miss. That is a little simplified, but 
Armin can describe it better than I can.

With Default right now there are some nasties as it keeps relations 
which you may be expecting to be unloaded, particularly when you factor 
in serialization and locking.

-Brian

On Oct 6, 2004, at 11:44 AM, Jakob Braeuchi wrote:

> hi brian,
>
> excuse my ignorance, but what exactly is the TwoLevelCache ?
>
> jakob
>
> Brian McCallister schrieb:
>
>> We should make the new TwoLevelCache (thank you Armin!) the default 
>> in 1.1 (heck, I'd like to in 1.0.2, but that is too big a change for 
>> bugfix).
>> I think this is a no brainer, but is a significant change as most 
>> people just use whatever the default is.
>> -Brian
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>



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


Re: [vote] Make TwoLevelCache the Default in 1.1

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi brian,

excuse my ignorance, but what exactly is the TwoLevelCache ?

jakob

Brian McCallister schrieb:

> We should make the new TwoLevelCache (thank you Armin!) the default in 
> 1.1 (heck, I'd like to in 1.0.2, but that is too big a change for bugfix).
> 
> I think this is a no brainer, but is a significant change as most people 
> just use whatever the default is.
> 
> -Brian
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 

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


Re: [vote] Make TwoLevelCache the Default in 1.1

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
I could go either way.  I think that 1.0.2 doesn't have to be about bug
fixes, see example of how many new features Spring throws in with their
updates, however I think I agree that since this is major functionality
which may adversely affect people's applications, we should make it
official for 1.1.

That said, I think that in 1.0.2 is should be clearly noted that this
feature exists and that we need help getting it more tested in the wild,
with a little direction on how to switch to it, and what to look for.

+1

R

You Said Something Like: Brian McCallisterYou Were Done Here.
> We should make the new TwoLevelCache (thank you Armin!) the default in
> 1.1 (heck, I'd like to in 1.0.2, but that is too big a change for
> bugfix).
>
> I think this is a no brainer, but is a significant change as most
> people just use whatever the default is.
>
> -Brian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>



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