-
1. Re: JBossCache as a message oriented middleware?
brian.stansberry Dec 4, 2006 4:50 PM (in response to glozikz)Can you divide your data between different caches? I.e. if on servers 1 and 2, there are processes running that are interested in data structures A, B, and C, then you deploy CacheA, CacheB and CacheC. On servers 3 and 4, the running process are interested in B, C and D, so CacheB, CacheC and CacheD are deployed.
Another possibility is to use the activateRegion() API. There you have just one cache, but it has regions /A, /B, /C and /D. On servers 1 and 2, region /D isn't activated, and thus the cache ignores replication traffic for /D. On servers 3 and 4, /A isn't activated.
The multiple-cache approach has the advantage that no JGroups channel on servers 1 and 2 even sees replication messages for D. With the region-based approach, the channel sees the messages and passes them all the way up to JBoss Cache, where they are then ignored. -
2. Re: JBossCache as a message oriented middleware?
belaban Dec 5, 2006 3:16 AM (in response to glozikz)The cache was designed for 90% reads and 10% writes scenarios. If you use it the other way round, I do *not* recommend using JBossCache. If you want a notification bus, then rather use something like JMS or JGroups directly.
If you only have 1 writer in the cluster though, your idea might work -
3. Re: JBossCache as a message oriented middleware?
glozikz Dec 5, 2006 4:02 PM (in response to glozikz)Thanks a lot for both comments, very useful. There are going to be many writers and many readers in our application, so maybe better for us to go for a MoM.
Regards,
Zoltan