Re: Docs and some questions

From: Andreas Hjortsberg (andreas.hjortsber..-change.se)
Date: Mon Nov 13 2006 - 13:32:37 EST

  • Next message: Tomi NA: "cayenne in a (rich) client/server setup"

    Hello and thank you all for your replies.
    Yes, you are correct Andrus, my intentions are to use an ordinary dataContext, and the reason is that my application must be able to work offline.

    I looked through the code regarding JavaGroupBridge and it seems to me that it is a quite straight forwarard to
    get two or more applications to talk to each other over a local network, and the different datacontext will be updated etc..
    The more diffucult thing to implement will be to add some logic to commit the changes on the remote dataContexts to
    their local databases.

    In the perfect world I don't need to care about it, because the remote context will be updated, and next time someone commit the changes on their
    datacontext the local database will update on a correct manner, but if a user refresh the data before it comes comitted I
    will lose the changes to this datacontext.

    Now to my question; where should any of you add this logic? One could make sure that the client application always commits changes before he does
    anything. It does not feel like a good solution, though. Another approch would be to add another static datacontext for the application, which will commit after any event has been received through the JavaGroupBridge?

    Regards
    /Andreas

    > As Ari just mentioned, JGroups site is located here:
    >
    > http://www.jgroups.org
    >
    > Cayenne has built in support for using JGroups as a provider for
    > cache synchronization. You can configure it in the Modeler:
    >
    > * Check "Remote Change Notifications" for the DataDomain
    > * Click the "Configure" button next to it and enter the settings that
    > you need (or leave the defaults).
    >
    > And of course you can use JavaGroupsBridge for your own custom
    > messaging if you need functionality beyond just cache synchronization.
    >
    > Andrus
    >
    >
    > On Nov 11, 2006, at 9:15 AM, Andreas Hjortsberg wrote:
    > > Hello,
    > >
    > > In the api docs for
    > >
    > > JGROUPS_CONFIG_URL_PROPERTY
    > >
    > > http://incubator.apache.org/cayenne/2_0/api/cayenne/index.html
    > >
    > > there is an invalid link for an example file. I think it's Filip's
    > > son who shows up, very cute though.
    > >
    > > http://www.filip.net/javagroups/javagroups-protocol.xml
    > >
    > > Is there anyone who knows where I can find another example?
    > >
    > > I'm about to start a project where all clients will have a local
    > > swing application and database, probably derby or hsqldb.
    > > It is very important what then a client change some of his objects
    > > it is broad casted over the local subnet and the other clients will
    > > be updated and it also notifies a main server.
    > >
    > > Has anyone used cayenne and jgroups for this? Is it the path to
    > > take? I have looked around but have not found any example or
    > > comments on this. Or is the existing integration between jgroups
    > > and cayenne designed to mainly work between instances on a web
    > > application?
    > >
    > > Regards
    > > /Andreas
    > >
    > >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Nov 13 2006 - 13:33:08 EST