[Schevo-devel] versioning
Matthew Scott
mscott at goldenspud.com
Tue May 17 16:58:48 EDT 2005
Cc-ing to the Schevo Development list about this topic; hope you don't
mind :)
Lab Rat wrote:
> I'm curious if you guys have thought any about object versioning in
> the context of keeping old versions around. I've been mentally
> tinkering with a web agent and have realized that the storage of web
> pages and input notes etc should retain full history. (specifically I
> want some kind of search support for the whole history)
We've thought about this a little bit, although I can't recall the
context in which it came up. I think it was storage of raw XML data.
One idea that we want to implement that perhaps would fulfill this type
of requirement would be a versioned field. In essence, the field would
still only have one value, but would push the current value onto a
history stack when set with a new value. The history stack could be
unbounded, or it could be limited to a set number of items.
For strings, an implementation of this idea could also conceivably store
diffs in the history to save space, and lazily apply diffs when a
historical value is requested.
The problem of storing references to other entity instances that might
later be deleted would be easy enough to resolve by dereferencing for
storage in history, then re-referencing (if possible) upon recall.
I'm thinking that the API for this would be that all field types should
be capable of storing and retrieving history if that was turned on for
the field. If history isn't turned on, then the history stack will
still be there, it will just always be empty.
Additional thoughts/considerations, anyone?
--
Matthew R. Scott
More information about the Schevo-devel
mailing list