The PrevDb Project

SourceForge.net Logo


What is PrevDb?

PrevDb is an open-source Java framework for building high-performance systems with persistent objects. It reads all the objects in the persistent store into memory at startup, and after that only accesses the store to save updates. This makes it suitable for "million-object systems" - one million being a ballpark estimate of the number of objects that will fit into the memory of a typical server with 1Gb of RAM.

PrevDb is inspired by the excellent Prevayler project, but it does not reject relational databases outright. PrevDb is designed to work most effectively with a relational database, but it could also work with other storage methods, such as a simple file-based data store.

The persistent objects need to implement a Persistent interface, and collaborate with the framework by notifying it of new objects and updates to existing ones. Various classes and methods are provided to make these requirements easy to comply with.

The persistent store could be implemented in a number of ways. The first version provides a relational database implementation. A future enhancement will be able to save each transaction to a file which is then used to update the database asynchronously. This will allow very high peak transaction rates - effectively as fast as the computer can make successive single disk writes, which should be in excess of 100 transactions per second on most hardware.

What are the benefits?

The main advantage is very fast performance for systems with small to medium amounts of data.

But as well as high performance, PrevDb provides:

  • A simple programming model for the persistent objects
  • Simple but flexible mapping to relational database tables
  • A complete record of every transaction applied to the system that can be used for debugging or as an audit trail

What are the alternatives?

Before deciding to use PrevDb, you might wish to compare it with the following open source alternatives:

  • Prevayler - if you want to hold all your objects in memory, and do not want to use a relational database
  • Hibernate - if you want a traditional object-relational mapping framework, or your database is too large to load into memory

What do I need to use it?

PrevDb is written in Java, and requires a reasonable level of Java knowledge to use effectively, as with any other component or library. Current documentation is sparse, but there are comprehensive unit tests that provide examples of how to use the framework.

Documentation

The documentation is available on-line:

Background

PrevDb has been created by Paul Boocock

PrevDb is an open source product, available for any developer to use as they wish, under an Apache-style licence.

Downloads

The current release is available at the PrevDb project downloads page.

More information and getting involved

If you would like any more information, or if you would like to contribute to the future development of PrevDb, please contact Paul Boocock


Last updated: 6 July 2004 webmaster@prevdb.sourceforge.net