Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Java Object Persistence (JSP & Java)

Thread view: 
Snyke - 31 Oct 2005 15:12 GMT
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?
Bryce - 31 Oct 2005 16:25 GMT
>Hi all.
>
[quoted text clipped - 13 lines]
>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
Snyke - 31 Oct 2005 18:15 GMT
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?
jon martin solaas - 31 Oct 2005 20:47 GMT
> 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 :-)

Signature

jon martin solaas

Snyke - 02 Nov 2005 23:57 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.