Web application with no access to database

From: Borut Bolčina (borut.bolcin..mail.com)
Date: Tue Aug 08 2006 - 16:51:48 EDT

  • Next message: Aristedes Maniatis: "Programmer wanted: Sydney, Australia"

    Hello,

    me again troubling you...

    I just read the
    http://cwiki.apache.org/confluence/display/CAYDOC/Remote+Object+Persistence+Guidein
    search of the solution. If someone read my posting about "Database
    replication and caching" this is the continuation of the architectural
    question.

    Two or more web applications will collect data from users and obviously
    should be persisted in database. Those web apps will communicate with
    backend java applications (cluster) via RMI calls for some other reasons.
    Collected web data represent two Cayenne data objects (one is in the to-one
    relationship with the other). If we don't want the web apps to have direct
    access to database, this two objects should be passed to backend Cayenne
    enabled java application to persist them. As I read the thread
    http://www.objectstyle.org/cayenne/lists/cayenne-user/2005/09/0205.html I am
    not sure what would be the best approach to take for my case
    (entity1----toOne--->entity2). Should I

       - make two value objects (those would be to plain serializable beans?)
       and pass them via RMI call to backend java application to connect them and
       persist them, or
       - create DataContext, insert those to CayenneDataObjects into it,
       serialize DataContext and send it over the RMI to backend java application
       just to commitChanges on received deserialized DataContext, or
       - set up Hessian web service on backend machines to receive requests
       from frontend (web applications) to persist data, or
       - not bother with Cayenne at all on the frontend (web apps) and send
       array of user entered values to backend java application to construct
       Cayenne data objects out of the data and then persist them.

    Option two seems most appealing to me, but the last one I think is the least
    work, although not as elegant. What do you think?

    Regards,
    Borut



    This archive was generated by hypermail 2.0.0 : Tue Aug 08 2006 - 16:52:13 EDT