Difference: PrevaylerNotes (1 vs. 5)

Revision 519 Jul 2006 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="JavaNotes"
Prevayler http://www.prevayler.org/ is an interesting tool that allows you to manage a tree of Java objects persistently. It's basically a combination of Java serialization and the Command pattern. All changes to the "database" must be in the form of Command objects that can be serialized and then called to perform their changes.
Line: 33 to 33
  Transactions are applied to the database one at a time (see PrevaylerImpl.subscriber().receive()).
Added:
>
>

Misc

http://java.sun.com/developer/technicalArticles/ALT/serialization/ - since Prevayler rests on Java serialization it's a good idea to learn as much as you can about it.

Revision 408 Feb 2005 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="JavaNotes"
Prevayler http://www.prevayler.org/ is an interesting tool that allows you to manage a tree of Java objects persistently. It's basically a combination of Java serialization and the Command pattern. All changes to the "database" must be in the form of Command objects that can be serialized and then called to perform their changes.
Changed:
<
<
Prevayler is controvertial because of their hype-filled site, and their claims about how much faster they are than a relational database. In the end, it turns out that prevayler is designed for working with small datasets that can fit in memory. It's not as scalable as a relational database, nor is it as "open" since people can't hook up to it and send arbitrary SQL commands. It's nice solution for cases where an RDBMS is overkill for working with a small data set.
>
>
Prevayler is controversial because of their hype-filled site, and their claims about how much faster they are than a relational database. In the end, it turns out that prevayler is designed for working with small datasets that can fit in memory. It's not as scalable as a relational database, nor is it as "open" since people can't hook up to it and send arbitrary SQL commands. It's nice solution for cases where an RDBMS is overkill for working with a small data set.
  Prevayler's javadoc blows. Why don't open source hackers document their code?
Line: 10 to 10
  Prevayler (see PrevaylerImpl constructor) first tries to recover the dataset from a snapshot (see the snapshot manager) and then recovers transactions from the journal. It does this by adding itself (an inner class) as a subscriber to the publisher. The publisher calls the journal which reads and replays any transactions that are in the journal since the checkpoint.
Added:
>
>

Transaction

Single-node case

  • User calls Prevayler.execute().
    • PrevaylerImpl wraps the transaction in a Capsule then calls CentralPublisher.publish().
      • publish() locks out subscribers
      • checks that the transaction is OK using the censor.
      • appends the transaction to the journal
      • notifies all subscribers, i.e. calls receive(TransactionTimestamp) on each one.
 

Snapshots

Revision 306 Dec 2004 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="JavaNotes"
Prevayler http://www.prevayler.org/ is an interesting tool that allows you to manage a tree of Java objects persistently. It's basically a combination of Java serialization and the Command pattern. All changes to the "database" must be in the form of Command objects that can be serialized and then called to perform their changes.
Line: 19 to 19
  Lots of them.
Changed:
<
<
The process of "subscribing" a TransactionListener brings it up to date with the transaction journal. During that time transactions are blocked and vice versa (see CentralPublisher.publish()).
>
>
The process of "subscribing" a TransactionListener brings it up to date with the transaction journal. During that time transactions are blocked and vice versa (see CentralPublisher.publish()).
 
Changed:
<
<
Transactions are applied to the database one at a time (see PrevaylerImpl.subscriber().receive()).
>
>
Transactions are applied to the database one at a time (see PrevaylerImpl.subscriber().receive()).
 

Revision 220 Jul 2004 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="JavaNotes"
Prevayler http://www.prevayler.org/ is an interesting tool that allows you to manage a tree of Java objects persistently. It's basically a combination of Java serialization and the Command pattern. All changes to the "database" must be in the form of Command objects that can be serialized and then called to perform their changes.
Added:
>
>
Prevayler is controvertial because of their hype-filled site, and their claims about how much faster they are than a relational database. In the end, it turns out that prevayler is designed for working with small datasets that can fit in memory. It's not as scalable as a relational database, nor is it as "open" since people can't hook up to it and send arbitrary SQL commands. It's nice solution for cases where an RDBMS is overkill for working with a small data set.
 
Added:
>
>
Prevayler's javadoc blows. Why don't open source hackers document their code?

Startup

Prevayler (see PrevaylerImpl constructor) first tries to recover the dataset from a snapshot (see the snapshot manager) and then recovers transactions from the journal. It does this by adding itself (an inner class) as a subscriber to the publisher. The publisher calls the journal which reads and replays any transactions that are in the journal since the checkpoint.

Snapshots

You need to manually tell prevayler to snapshot itself by calling Prevayler.takeSnapshot().

Critical Regions

Lots of them.

The process of "subscribing" a TransactionListener brings it up to date with the transaction journal. During that time transactions are blocked and vice versa (see CentralPublisher.publish()).

Transactions are applied to the database one at a time (see PrevaylerImpl.subscriber().receive()).

 

Revision 102 Jul 2004 - TobyCabot

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="JavaNotes"
Prevayler http://www.prevayler.org/ is an interesting tool that allows you to manage a tree of Java objects persistently. It's basically a combination of Java serialization and the Command pattern. All changes to the "database" must be in the form of Command objects that can be serialized and then called to perform their changes.
View topic | History: r5 < r4 < r3 < r2 | More topic actions...
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback