Re: Multi Tier Feature Progress

From: Ashley Aitken (mrhatke..ac.com)
Date: Tue Jul 05 2005 - 09:29:06 EDT

  • Next message: laila paganelli: "SelectQuery and table that is synonym"

    Howdy Andrus (and Cayenne Developers),

    On 03/07/2005, at 11:14 AM, Andrus Adamchik wrote:

    > Check out this blog entry - another piece of not too visible but
    > rather important background work is done:
    >
    > http://objectstyle.org/confluence/display/CAY/2005/07/02/

    As you Andrus (and others) may know I'm not a "Cayenne Developer" per
    se (although I would like to be one day, if I get time, and if I make
    it up the learning curve) so I can't comment on the specifics of the
    developments so far. However, thanks for keeping us informed!

    I would, however and as I have done before, like to throw a couple of
    issues / comments into the mix with regards to multi-tier persistence
    for a particular kind of multi-tier system that I am interested in
    (which perhaps you may like keep in mind during your design and
    development).

    1. The first, relates to "extended transactions" (i.e. the case where
    objects are fetched to the client and stay their for an extended
    period). What happens if the connection to the server-side data
    context is lost? Could the client still continue using the client-
    side data context. Could the stack handle this gracefully and
    recover gracefully?

    Of course, if the server data context goes away completely, say with
    a reboot, then the snapshots will be lost for the object currently in
    the client-side data context. This means any form of optimistic
    locking will be lost, and also that it may be necessary to save all
    object data (not just the data that has changed).

    2. The second, relates to "moving objects (and graphs) from one
    Cayenne stack to another" In particular, I am thinking that if I
    have objects in the client-side data context and I want them to be
    persistent on the client, to survive a restart of the client
    application, I may need to move them to a Cayenne stack on the client.

    Is it possible to move objects (and an accompanying object-graph, or
    part thereof) from one Cayenne stack (say originating from the
    server) to another Cayenne stack (say living on the client)? I guess
    one may need to use some for of GUID, but that is ok.

    As you can probably see, these two issues are related. I would like
    to have the tiered persistence but for this persistence to survive
    restarts on the client. Perhaps there is a better way than having
    another persistence stack on the client? However, I do anticipate
    the client may store a large part of the object graph as well.

    It would be nice if Cayenne developers could keep these sorts of
    situations / use-cases in mind whilst developing the tiered
    persistence stack. I believe in the future these sorts of
    requirements will become more common, so best to have them in mind
    from the start (if not design them in from the start).

    Recently I've been investigating persistence for our planned multi-
    tier application with specific persistence requirements. I've been
    reading up on Hibernate and an OODB called DB4O - not that much
    reading on Cayenne because I am familiar with EOF and know that it
    works similarly.

    Each of these other solutions addresses some of these issues /
    comments more or less (some more than other). For example, Hibernate
    does enable "detached" objects, but "lazy activation" seems to behave
    strangely in this case. However, I return to Cayenne as it seems
    most likely to be able to provide the best solution.

    Again, just some ideas for consideration (and discussion if needed).

    Best regards,
    Ashley.

    --
    Ashley Aitken
    Perth, Western Australia
    mrhatken at mac dot com
    Skype Name: MrHatken (GMT + 8 Hours!)
    



    This archive was generated by hypermail 2.0.0 : Tue Jul 05 2005 - 09:29:12 EDT