[elephant-devel] Test
Robert L. Read
read at robertlread.net
Tue Mar 7 20:00:07 UTC 2006
This proposed solution is just what I was imagining (only better
described.)
Certainly, whether we use it or not, 0.6.0 should start attaching a
version
to a store.
On Tue, 2006-03-07 at 14:12 -0500, Ian Eslick wrote:
> Probably we need to add a way to store simple database metadata (list
> structure as a registry with strings, symbols and numbers) that contains
> version and other information. Upon opening we can look up version
> specific upgrade code if the elephant version is higher than the
> database version and upgrade upon open, prompting the user for a target
> spec if upgrade-by-copy or in-place. The easiest way to do this is to
> reserve some keywords in the root by using a reserved value such as
> 'elephant::*elephant-metadata*.
>
> In fact I recommend we agree on a standard for this and ensure that
> 0.6.0 contains this metadata so we can at least recognize 0.6.0+ db's
> when they are opened. I apologizing if I'm repeating earlier
> discussions. I've been effectively offline for the past week and a half.
>
> Proposal:
>
> (add-to-root 'elephant::*elephant-metadata*
> '((version 0 6 0) ;; format (version major minor sub1 ... subN)
> (spec :bdb "foo") ;; format (spec <spec as list>)
> (lisp . :sbcl))) ;; format (lisp . <lisp-type>)
>
> In fact we might do the following as well:
> 1) assert an error when add-to-root is used by the user to write
> elephant::*elephant-metadata*
> 2) create a simple interface around add-to-root which provides metadata
> access
>
> (defmethod get-metadata (tag &optional (sc *store-controller*))
> (let ((entry (assoc tag (get-from-root *elephant-metadata*)))
> (when entry
> (cdr entry))))
>
> (defmethod set-metadata (tag value &optional (sc *store-controller*))
> (unless (reserved-metadata-tags tag)
> ...))
>
> This way we make sure the user cannot shoot themselves in the foot by
> overwriting reserved
> metadata tags or the reserved root keyword. Migration should handle the
> reserved keyword
> specially by not migrating reserved tags but migrating any user-defined
> tags.
>
> This might be overkill as users may only need access to
> system-maintained metadata rather
> than yet another namespace for storing data as the root should function
> equally well...
>
> Thoughts?
> Ian
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20060307/a19d0f15/attachment-0001.html>
More information about the elephant-devel
mailing list