Re: ROP Question

From: Aristedes Maniatis (ar..sh.com.au)
Date: Tue Dec 04 2007 - 17:26:45 EST

  • Next message: Andrus Adamchik: "Re: ROP Question"

    On 05/12/2007, at 7:46 AM, Adrian Wiesmann wrote:

    > So here is my problem. While I would like to keep the embedded
    > database
    > for single user scenarios, I would also like to use ROP for multi user
    > environments.
    >
    > Can I implement both and switch from one to the other mechanism with a
    > simple (to be implemented) configuration switch? From what I read in
    > the
    > documentation Hessian uses a new ObjectContext? That is probably the
    > easy
    > part. But what about client and server code in the client? Can I mix
    > this?
    > Or is there some simple trick?

    We have exactly the same scenario with many of the same choices:
    Derby, ROP, etc. We used Jetty for the servlet container and that
    worked really well. We have Derby embedded in the server application.
    But we've never written a single merged client/server app.

    There is quite a lot which is different at the moment between client
    and server in Cayenne. The entities do not subclass the same Cayenne
    entities (PersistentObject/CayenneDataObject), so you'll find it very
    hard to write a single set of code which works interchangeably as a
    single application and also as client/server, unless internally you
    continue to use Cayenne ROP/Hessian. You can't easily write code which
    works both on Cayenne client and also on the server. Apart from the
    class hierarchy some other things are different: no nested contexts on
    the client, different behaviour of lifecycle events, etc.

    I guess you could connect the client to the server at 127.0.0.1 and
    make it work like that, even if the client and server are compiled
    together into a single application. It would be interesting to see
    which parts you might be able to strip out. I could imagine ways you
    might be able to remove Jetty from the picture and hook the client and
    server bits directly together.

    Ari

    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A



    This archive was generated by hypermail 2.0.0 : Tue Dec 04 2007 - 17:27:27 EST