ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pitts" <Daniel.Pi...@cnet.com>
Subject RE: Flushing of oscache in a cluster ?
Date Thu, 21 Sep 2006 17:48:24 GMT
We ran into a similar problem (same situation)
Although, we happened to have an RMI connection between the tool and front-end, so we used
that to send "flush" commands.
I wouldn't recommend that though, trying to keep the two synchronized was a pain.
Actually, I don't know much about iBATIS's caching models. Maybe someone can tell us.  Is
there an easy/efficient way to make iBATIS recognize updates made by a separate process, and
recache the new results?
My thoughts on it are that any JVM which caches through ibatis should be the only process
to update the data. But, this seems too strict for real-world applications.


From: erlend.bjorge@aftenposten.no [mailto:erlend.bjorge@aftenposten.no] 
Sent: Thursday, September 21, 2006 8:08 AM
To: user-java@ibatis.apache.org
Subject: Flushing of oscache in a cluster ?

Hi there!


Does anyone have experience with this ?


As far as I have understood it, if you have one application split into two wep apps (1. out
to web - 2. admin), 

using Ibatis DataMapper with caching using oscache, they both have their own cache and if
you have


    <cacheModel id="company-cache" type="OSCACHE">

        <flushInterval hours="1"/>

        <flushOnExecute statement="updateCompany"/>



they don't flush each other cache when updateCompany is run (in this case flush the web cache
when a update in admin occur). 


So far so good (?) and here comes oscache clustering  mechanism into the picture ?


Have anyone been able to flush each other cache when you have two web apps like we have ?
What did you do ? :-)




Since the networks guys here don't like multicasting, I have been looking at JavaGroupsBroadcastingListener
with a 

GossipServer or GossipRouter. Anyone experience with that togheter with Ibatis ?




My oscache.properties:





First of all when I run the GossipServer, at once it found the first client, it's shout down.
Is that normal, trick to make it run further ? :-)


Then I tried the GossipRouter and the consol tells me that it finds the two apps/machines
it supposed to do. I'm running the GossipRouter on port 5555 on machine which

also is one of the test clients. The other test machine is 




Consol on the GossipRouter:


GossipRouter is starting...

GossipRouter started at Thu Sep 21 15:57:14 CEST 2006

Listening on port 5555 bound on address                  (Does this sound
good ?)


DEBUG ...org.jgroups.stack.GossipRouter (Line: 313) - router accepted connection from Socket[addr=/,port=4463,localport=5555]

DEBUG ...org.jgroups.stack.GossipRouter (Line: 524) - gossip is REGISTER_REQ group=OSCacheBus,


DEBUG ...org.jgroups.stack.GossipRouter (Line: 313) - router accepted connection from Socket[addr=/,port=1310,localport=5555]

DEBUG ...org.jgroups.stack.GossipRouter (Line: 524) - gossip is REGISTER_REQ group=OSCacheBus,


DEBUG ...org.jgroups.stack.GossipRouter (Line: 618) - running sweep

DEBUG ...org.jgroups.stack.GossipRouter (Line: 618) - running sweep




So far it's look good in my eyes, then I try to test to flush the cache in one app, I was
expecting the cache in the other app also get flushed. NOT !!!! :-)


I don't get any info in the GossipRouter consol, saying, got a flush command or something,
should I ? The cache get flushed on the machine that send

the flush of course, but does anyone have any clues of what I can do to make the flush clustering
mechanism  to work ? should I use JMS ? 


Links to OSCACHE clusterings documentation:



How to not using multicasting:





You have any useful links ?




So does anyone have any clues on what I should look at, do  ????? :-)



Thanks a lot !!!!



Best regards,

Erlend Bjørge

View raw message