I renamed this part of the thread since it is about a different
thing. Andreas was talking about "traditional" Cayenne applications
accessing the DB, while Ari is talking about ROP. Things are
significantly different between the two. If we get deeper into
technical details here, I also suggest to move it to cayenne-dev list.
A general note on a possible design of notifications. Whether they
are used for cache syncing or locking, they shouldn't be tied to a
particular transport. Transport is already pluggable via
org.apache.cayenne.event.EventBridge mechanism. Transport (a subclass
of EventBridge) and messaging logic (what notifications to send and
how to process incoming notifications) are independent from each other.
Speaking of transports, Cayenne already supports JMS, JGroups and
XMPP out of the box (meaning all of them can be plugged into
EventManager) :
http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/
cayenne/event/JMSBridge.html
http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/
cayenne/event/JavaGroupsBridge.html
http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/
cayenne/event/XMPPBridge.html
Andrus
On Nov 11, 2006, at 8:25 PM, Aristedes Maniatis wrote:
> In our situation we have a network of clients connected to a single
> server (all Swing) using Cayenne version 3 and ROP. That part works
> well, but we currently have no mechanism to invalidate caches in a
> distributed way. We would also want to use a messaging system to
> perform pessimistic record locking on Cayenne objects.
>
> Anyhow, although we haven't done this yet, we would be very
> interested in collaborating on any work to tie jgroups into
> Cayenne. Since we use Jetty already, and there is some integration
> between jgroups and Jetty mentioned, perhaps this will be even easier.
>
> Are there others who would want to participate in this work? What
> we would want is:
>
> * mechanism in Cayenne ROP for the server to notify clients
> whenever an object was updated or created. I'd guess we'd use the
> new version 3 lifecycle callbacks we've been involved in the
> development of: http://cwiki.apache.org/CAYDOC/lifecycle-
> callbacks.html
>
> * mechanism for the clients to receive that message and invalidate
> that object in all relevant caches. (Do we need to further mark
> that object in all contexts on the client as HOLLOW?)
>
> * further hook to allow us to update the GUI should that object
> appear on screen (I guess Cayenne is not involved here).
>
> * a further step would be to add a piece of metadata to a Cayenne
> persistent object in order to record its current lock state.
> Changes to this state would need to be propagated between all
> clients in an atomic way.
>
>
> Any thoughts about whether this would meet your goals?
>
This archive was generated by hypermail 2.0.0 : Sun Nov 12 2006 - 11:27:01 EST