Saturday, November 30, 2002


On Prevayler.

It works well for the simple case...single app running in a VM. It gets more difficult when you extend out into a distributed environment. I constructed something similar to Prevayler for interconnecting peers. Essentially each peer would attempt to keep its data model in sync with all the others. I used a time-ordering protocol to do this -- commands to change the data set were broadcast to each connected peer, which would reorder the the command set so each peer would have the same set of commands, in the same order.

Things get dicey when you want to synchronize -- where, exactly, do you do that? You need to have voting mechanisms to resolve conflicts amongst the connected peers in the group. Vote for snapshot point, vote to claim the earliest mutable command, etc...

When you're reordering commands you need to do a lot of undoing and redoing. If you want to insert a command somewhere in the past, you need to undo enough to get back to that point, insert the command, then redo as appropriate. There are definitely more optimal ways to do this; I just haven't really explored them yet.

In summary: Prevayler good -- but now do the distributed case!
12:00:33 PM