You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Micah Whitacre <mk...@gmail.com> on 2008/09/19 21:29:50 UTC

Forcing a cluster synch

Hey All,
  I have a situation where I have a round robin service (IBM HTTP
Server), sitting atop the 3 JVMs (IBM Websphere Application Servers),
and in each of those JVMs I have a RepositoryImpl connected to a
shared database.  The repositories are clustered so that changes are
propagated to the other JVMs.  Business logic calls are made into the
round robin service and those calls are translated into various JCR
calls.  The problem I have is that there are situations where changes
made in one JVM haven't be applied to the other JVMs based on the
cluster synchronization times.  Is there a way to force a cluster
synchronization so that a JVM will ensure it is up to date?  Or
perhaps a way to flush the cache?  Any reccommendations on ways to
solve this problem?

Thanks in advance for your help,
Micah Whitacre

Re: Forcing a cluster synch

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Fri, Sep 19, 2008 at 10:25 PM, Micah Whitacre <mk...@gmail.com> wrote:
> I think I might have found the answer to my own question with
> RepositoryImpl.getClusterNode().sync().   However the getClusterNode()
> api is only in the 1.5 SNAPSHOT and I'd prefer a solution that would
> work in both the 1.4.x code stream since the release date of 1.5 is
> unknown.  I also value anyone's opinions on whether this is the right
> approach to solving this problem.  Thoughts?

In general anything that reaches down to jackrabbit-core classes is
not recommended.

Would lowering the synchronization interval work for you? You can set
the syncDelay="nnn" attribute on the <Cluster/> configuration element
to the number of milliseconds between each subsequent synchronization.

Otherwise I think the best way to solve your issue is to add explicit
cluster synchronization as a new feature in Jackrabbit. We could do
this by exposing the sync() method in an extension interface
jackrabbit-api.

Alternatively, it would be nice to come up with some way for
Jackrabbit cluster nodes to actively push (notifications of) changes
to each other instead of or in addition to each pulling them at
configured intervals. Something to discuss at dev@...

BR,

Jukka Zitting

Re: Forcing a cluster synch

Posted by Micah Whitacre <mk...@gmail.com>.
I think I might have found the answer to my own question with
RepositoryImpl.getClusterNode().sync().   However the getClusterNode()
api is only in the 1.5 SNAPSHOT and I'd prefer a solution that would
work in both the 1.4.x code stream since the release date of 1.5 is
unknown.  I also value anyone's opinions on whether this is the right
approach to solving this problem.  Thoughts?

Thanks,
Micah

On Fri, Sep 19, 2008 at 2:29 PM, Micah Whitacre <mk...@gmail.com> wrote:
> Hey All,
>  I have a situation where I have a round robin service (IBM HTTP
> Server), sitting atop the 3 JVMs (IBM Websphere Application Servers),
> and in each of those JVMs I have a RepositoryImpl connected to a
> shared database.  The repositories are clustered so that changes are
> propagated to the other JVMs.  Business logic calls are made into the
> round robin service and those calls are translated into various JCR
> calls.  The problem I have is that there are situations where changes
> made in one JVM haven't be applied to the other JVMs based on the
> cluster synchronization times.  Is there a way to force a cluster
> synchronization so that a JVM will ensure it is up to date?  Or
> perhaps a way to flush the cache?  Any reccommendations on ways to
> solve this problem?
>
> Thanks in advance for your help,
> Micah Whitacre
>