Data, encapsulation etc.

Date:

We’re right now trying out Prevayler as a persistence layer for our products. It is basically the coolest think I’ve seen since I became an OO-afficionado. I did start out with Smalltalk, and it sort of set the tone for what I believe in.

I need to check out if Jon has mentioned this on his blog. Nope, he hasn’t so I’ll be first then.

Here we go: What Prevayler basically does is store your object graph in memory, recording every transaction as a serialized Command. Every 24 hrs a snapshot of the full object graph is written to disk and the log is cleared. Crash recovery is performed by taking the latest snapshot and redo all the commands that is deserialized from the log.

This basically means complete transparency, wow-whiz-bang performance, database independance and a call to your local RAM-dealer for more memory. It is also very reliable, the full package is something like ten classes, meaning very few dark corners for bugs to hide. We’ve tried it in development and yes, it rocks. I could dance the funky AOP-chicken here and tell you how fast it was done since we only removed the OJB interceptor and added a Prevayler interceptor, but I won’t. Seriously, sure, that rocks too, but haven’t we sort of agreed on that by now?

So what’s the backside? Schema evolution. I’ll save that for a separate post.