Java Object Persistence (JSP & Java)

S

Snyke

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?
 
B

Bryce

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.
 
S

Snyke

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?
 
J

jon martin solaas

Snyke said:
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 :)
 
S

Snyke

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top