[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ANN: Lua OS 0.7, with: Orthogonal Persistence
- From: Stefan Reich <stefan.reich.maker.of.eye@...>
- Date: Tue, 30 Aug 2011 15:45:01 +0200
On Mon, Aug 29, 2011 at 5:58 PM, Petite Abeille
> On Aug 29, 2011, at 4:19 PM, Stefan Reich wrote:
>> In other words, we now have what is called "orthogonal persistence".
> Tangentially related... how does that relate to something like Pluto?
> "Pluto is a persistence library for Lua"
Good question. Excellent question!
Currently, orthogonal persistence in Lua OS functions without an
actual persistence library. The trick is to just replay the exact
actions that created the original system state and thus arrive at a
copy of that state. The concept of sandboxes guarantees that no side
effects take place while replaying. Also, sandboxed code is always
deterministic. These two assertions are crucial to make the system
Does anyone remember Prevayler ("Prevayler is not a database")? This
is the same thing - just way easier and more robust because the
sandboxes do all the work.
This approach works well, but it has the disadvantage of potentially
taking a lot of time if the session was long and much computation was
So eventually we'll want to add to this a checkpoint mechanism that
actually persists the system state's contents to disk.
Pluto could be good for this. I tried to use it for this purpose, but
I ran into a little problem.
Pluto refuses to persist C functions - but it doesn't tell me which
function was referenced (and where). So it's very hard to track the
Either someone could improve Pluto's error messages (if that's
possible, not sure if the information is even available).
Or I find a way to solve this differently. I have some ideas.