Object Prevalence in CL
Monday, August 23, 2004
I've been playing around with Sven Van Caekenberghe's
CL-PREVALENCE library off and on during the last couple of
months (I
previously wrote about how Sven used object prevalence in the
web site application that he created). I've found it very useful as a prototyping tool as it allows
me to store object data across prototyping sessions without using a
relational database. Instead of having to create (and subsequently
change as the application evolves) data base definitions, I just use
CL-PREVALENCE's logging mechanism to store transactions and
periodically create "snapshots" of the data.
Mark Watson (who writes
a Java/AI/Semantic Web/Politics/Lisp
weblog) seems to like prevalence frameworks for the same
reasons. Since most of his
current work is in Java, he
uses the Java prevalence framework
Prevayler. In some cases, he has used prevalence as a replacement
for an RDBMS and not just for prototyping. For certain types of applications,
that is a very attractive option.
Incidentally, Arthur Lemmens recently gave a talk on "Object
Persistence" (which can be considered a "superset" of object
prevalence) for the
Hamburg and
Cologne (Lispniks Cologne) Lisp User Groups. The
slides from his presentation are available and make interesting
reading. He covers the following topics in his talk:
- PRINT and READ
- MAKE-LOAD-FORM and LOAD
- SAVE-IMAGE
- Serializing and deserializing
- Logging changes
- Using relational databases
- Full-blown persistence in Lisp
Also, if you're interested in learning more about object prevalence, there is a slashdot discussion about object prevalence that is worth reading for the comments about the different pros/cons of the technique.

