-
1. Re: Reactivating SharedStoreCacheLoader
manik Jun 11, 2006 5:53 PM (in response to galder.zamarreno)"galder.zamarreno@jboss.com" wrote:
- Configuration changes will need to be backported to 1.2.x using the old
CacheLoader configuration style (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheCacheLoaders )
Is this necessary? The SingletonCacheLoader won't be available till JBC 2.x.x anyway. -
2. Re: Reactivating SharedStoreCacheLoader
manik Jun 11, 2006 5:55 PM (in response to galder.zamarreno)Just so we don't destabilise the 1.4.0 release, I'd hold back on any implementations of this until I branch 1.4.0 (probably over the next few days, once I release .CR1).
-
3. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 11, 2006 6:00 PM (in response to galder.zamarreno)"manik.surtani@jboss.com" wrote:
"galder.zamarreno@jboss.com" wrote:
- Configuration changes will need to be backported to 1.2.x using the old
CacheLoader configuration style (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheCacheLoaders )
Is this necessary? The SingletonCacheLoader won't be available till JBC 2.x.x anyway.
As the affected versions included 1.2.x, I thought we might wanna back port it . -
4. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 11, 2006 6:00 PM (in response to galder.zamarreno)"manik.surtani@jboss.com" wrote:
Just so we don't destabilise the 1.4.0 release, I'd hold back on any implementations of this until I branch 1.4.0 (probably over the next few days, once I release .CR1).
no probs, I'm just starting to have a look to it :-) -
5. Re: Reactivating SharedStoreCacheLoader
manik Jun 11, 2006 6:13 PM (in response to galder.zamarreno)-1 on backporting. People can upgrade if they need it.
-
6. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 11, 2006 6:17 PM (in response to galder.zamarreno)that's alright with me, it was just a misunderstanding
-
7. Re: Reactivating SharedStoreCacheLoader
belaban Jun 19, 2006 8:08 AM (in response to galder.zamarreno)+1 from me. I guess this needs to be done on the 1.4 branch *and* 2.0 (CVS head) ?
Also +1 on the name change to SingletonCacheLoader -
8. Re: Reactivating SharedStoreCacheLoader
manik Jun 20, 2006 9:18 AM (in response to galder.zamarreno)Just in HEAD (for 2.0.0). This is not targetted for the 1.4.0 release.
-
9. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 22, 2006 1:24 PM (in response to galder.zamarreno)I had a bit more look to this and I have this questions:
* Looking at SharedStoreCacheLoader, it seems like it's the cache loader itself that, given a org.jgroups.View and an org.jgroups.Address, decides whether that Address is the coordinator of the View. I don't think it should change now, but don't you think this operation should live in JGroups rather than in JBossCache? JGroups knows these two and I think it should be responsible of being able to determine whether an Address is the coordinator of a View:
Code in SharedStoreCacheLoader:public void viewChange(View new_view) { boolean tmp=active; if(new_view != null && local_addr != null) { Vector mbrs=new_view.getMembers(); if(mbrs != null && mbrs.size() > 0 && local_addr.equals(mbrs.firstElement())) { tmp=true; } else { tmp=false; } } if(active != tmp) { active=tmp; log.info("changed mode: active=" + active); } }
* Configuration wise, I had this two ideas, but I'm not sure which one is preferred, or if there's any other:<singleton>true</singleton> <singleton>false</singleton> (default)
<singleton pushStateWhenCoordinator="true">true</singleton> (pushStateWhenCoordinator defaults to true) <singleton pushStateWhenCoordinator="false">true</singleton>
OR:<singleton />
<singleton> <pushStateWhenCoordinator>true</pushStateWhenCoordinator> </singleton> <singleton> <pushStateWhenCoordinator>false</pushStateWhenCoordinator> </singleton>
-
10. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 22, 2006 1:25 PM (in response to galder.zamarreno)"this questions"
"this two ideas"
I think i might need some spelling lessons! -
11. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 22, 2006 1:26 PM (in response to galder.zamarreno)Configuration wise, personally, I think pushStateWhenCoordinator should be an attribute of the singleton element. Opinions?
-
12. Re: Reactivating SharedStoreCacheLoader
belaban Jun 23, 2006 7:55 AM (in response to galder.zamarreno)I think this should be done in JBossCache, you have a list of addresses, the coordinator is always the first member...
-
13. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 23, 2006 9:34 AM (in response to galder.zamarreno)I guess it'd be easier to do View.getVid().getCoordAddress()?
-
14. Re: Reactivating SharedStoreCacheLoader
galder.zamarreno Jun 25, 2006 10:01 AM (in response to galder.zamarreno)I've been a bit productive this weekend and implemented the configuration side and unit tested the SingletonCacheLoader using a DummyCacheLoader as the delegated cache loader. The original code seems to working fine :-).
Configuration wise, I've gone for the element/attribute pattern. In terms of validation, singleton should not be used neither with shared nor with evictions as it would not make sense at all. Therefore, I have added validations to check this on startup.
Now, in order to get the pushStateWhenCoordinator feature done, the only method that I can use seems to be:
TreeCache._getState(Fqn fqn, boolean fetchTransientState, boolean fetchPersistentState, long timeout, boolean force, boolean suppressErrors)
fetchTransientState would be true and fetchPesistentState false, however, I am not sure what timeout should I use. Should I used a hardcoded value or should I add to the configuration? Also, I guess force should be hardcoded to false.