You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Martin Thelian <ma...@lovo.cc> on 2007/10/09 13:37:58 UTC

Cayenne Cluster

Hi!

I need some detailed information regarding the capability of cayenne to
run in a cluster.
I've only found [1] describing that it's possible to use a "Cross-VM
Cache", either via JMS or javagroups. But how does this work in details?
What configuration options are available? I've only found some
properties defined in the Class DataRowStore.
Are the notification events, which exchanged between the VMs, delivered
asynchronous?
What about concurrent modification of objects located in the cache? Is
there some kind of locking implemented?

Thanks,
Martin

[1] http://cayenne.apache.org/doc20/configuring-caching-behavior.html

Re: Cayenne Cluster

Posted by Martin Thelian <ma...@lovo.cc>.
Hi!

Thank you for your detailed answer.

Andrus Adamchik schrieb:
> I can elaborate some more if you describe the usage patterns that you
> envision, and what kind of clustering features you are looking for
> (session replication? cache refresh? anything else?)
Nothing special at the moment.

At the moment we are running two jboss instances with the same
functionality and a quite simple load-balancing that is running in front
of them. The main problem we are working on is how to synchronize these
two servers to avoid concurrent modifications of user-data and to ensure
that each instance is processing up-to-date data. Unfortunately there
are several pitfalls such as separate caches at different
application-layers (the cayenne row- and object-cache at data-layer, a
business-object cache at service-layer), JMS queues between different
layers, etc.

Martin

Re: Cayenne Cluster

Posted by Andrus Adamchik <an...@objectstyle.org>.
There are two clustering options, both implemented as extension  
points to plug some outside clustering mechanism. We've never done  
any attempts to implement distributed locking, so asynchronous  
notifications are the default mode of operation. (Not sure what it  
would take to add explicit locking, but theoretically that's a  
possibility).

Option 1: (the one that you've mentioned) Snapshot synchronization.  
Each DataDomain in each JVM would broadcast the diffs of the  
committed objects. That's a universal mechanism to refresh individual  
DataObjects. It also rather brute force, and can generate lots of  
network traffic and unneeded app activity.

Option 2: (requires Cayenne 3.0) Query cache synchronization. It was  
first mentioned here - [1] and the early attempts at documenting it  
can be found here - [2]. It allows to refresh groups of objects (more  
specifically cached query results), not just individual objects. I  
don't know whether I can generalize my experience with it, but it  
worked extremely well in an environment with a CMS that updates the  
data and multiple read-only applications that serve this data on a  
high volume public site. Via a "cache group" mechanism you can tweak  
what exactly is refreshed on each commit.

I can elaborate some more if you describe the usage patterns that you  
envision, and what kind of clustering features you are looking for  
(session replication? cache refresh? anything else?)

Andrus

[1] http://objectstyle.org/cayenne/lists/cayenne-user/2006/09/0133.html
[2] http://cayenne.apache.org/doc/caching-and-fresh-data.html



On Oct 9, 2007, at 2:37 PM, Martin Thelian wrote:

> Hi!
>
> I need some detailed information regarding the capability of  
> cayenne to
> run in a cluster.
> I've only found [1] describing that it's possible to use a "Cross-VM
> Cache", either via JMS or javagroups. But how does this work in  
> details?
> What configuration options are available? I've only found some
> properties defined in the Class DataRowStore.
> Are the notification events, which exchanged between the VMs,  
> delivered
> asynchronous?
> What about concurrent modification of objects located in the cache? Is
> there some kind of locking implemented?
>
> Thanks,
> Martin
>
> [1] http://cayenne.apache.org/doc20/configuring-caching-behavior.html
>