Java Object Persistence (JSP & Java)

Discussion in 'Java' started by Snyke, Oct 31, 2005.

  1. Snyke

    Snyke Guest

    Hi all.

    I'm currently working on a simulation with a web frontend. The
    simulation is based on 3 components:
    - A Webfrontend
    - A persister (which is the object of my quetsio :)
    - A WorkHorse

    The Workhorse is doing the actual simulation while the web frontend is
    used to interact with the Simulation (queueing and dequeueing new
    events to the simulation stack).
    Now my question is what the best choice for the persister would be.
    I found http://www.prevayler.org/wiki.jsp which looks nice but I don't
    know if it's the best choice. Is there a library that transparently
    saves and loads whole Object dependencies from an SQL Database, or is
    an Object Cloud better?
    What is your experience with this/other libraries?
     
    Snyke, Oct 31, 2005
    #1
    1. Advertising

  2. Snyke

    Bryce Guest

    On 31 Oct 2005 06:12:49 -0800, "Snyke" <>
    wrote:

    >Hi all.
    >
    >I'm currently working on a simulation with a web frontend. The
    >simulation is based on 3 components:
    > - A Webfrontend
    > - A persister (which is the object of my quetsio :)
    > - A WorkHorse
    >
    >The Workhorse is doing the actual simulation while the web frontend is
    >used to interact with the Simulation (queueing and dequeueing new
    >events to the simulation stack).
    >Now my question is what the best choice for the persister would be.
    >I found http://www.prevayler.org/wiki.jsp which looks nice but I don't
    >know if it's the best choice. Is there a library that transparently
    >saves and loads whole Object dependencies from an SQL Database, or is
    >an Object Cloud better?
    >What is your experience with this/other libraries?


    Prevayler holds your objects in memory (correct me if I"m wrong).

    If you need a SQL Database (Prevayler doesn't do SQL AFAIK), then I'd
    look at Hibernate.

    --
    now with more cowbell
     
    Bryce, Oct 31, 2005
    #2
    1. Advertising

  3. Snyke

    Snyke Guest

    Yes, that's right prevayler holds everything in memeory, makes periodic
    dumps to the disk and writes the changes (Transactions) to the disk
    since the last snapshot.
    I'd like to know what the advantages of keeping it in one way or
    another are.
    SQL surely has the advantage that it may share its information also
    with non-Java applications, while having a huge overhead due to
    serialization and deserialization.
    Prevayler has the advantage of keeping everything connected and working
    (Object References just work, no need to check if we need to load
    everything from the Database), while having the downside that it may
    not share its data with non-Java Applications.
    Also Clustering may be hard to implement in Prevayler while JDBC
    already has clustering capabilities.

    What do you think?
     
    Snyke, Oct 31, 2005
    #3
  4. Snyke wrote:

    > SQL surely has the advantage that it may share its information also
    > with non-Java applications, while having a huge overhead due to
    > serialization and deserialization.


    I think you got it backwards, Prevayler uses serialization (see
    http://c2.com/doc/SerializationThroughput/), and jdbc/SQL not, at least not
    in the sense that you have to implement java.io.Serializable in your
    objects. But if it performs the job you need it to do 9000 times faster
    than Oracle, by all means, go for it :)

    --
    jon martin solaas
     
    jon martin solaas, Oct 31, 2005
    #4
  5. Snyke

    Snyke Guest

    Yeah sorry,
    I've used the wrong term. If I'd use a relational database, I'd have to
    "flatten" the data (therefore replace every reference with a
    foreignkey, and giving each object an ID), therefore I would have a
    huge overhead to load/save complex object structures from/to the
    Database. That's basically what I meant :)

    Thanks for your correction,
    Snyke
     
    Snyke, Nov 2, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Yanoff
    Replies:
    0
    Views:
    523
    Scott Yanoff
    Aug 11, 2003
  2. javaguy44
    Replies:
    10
    Views:
    991
    Michael Berg
    May 18, 2004
  3. milkyway
    Replies:
    2
    Views:
    1,644
    milkyway
    Dec 16, 2004
  4. Replies:
    0
    Views:
    4,439
  5. Kenneth P. Turvey

    Java Persistence API and persistence.xml

    Kenneth P. Turvey, Mar 15, 2008, in forum: Java
    Replies:
    2
    Views:
    17,397
    Kenneth P. Turvey
    Mar 16, 2008
Loading...

Share This Page