[Openais] object database code

Steven Dake scd at broked.org
Mon Jan 30 00:01:59 PST 2006


I wrote this attached object in-memory database today for the
configuration system.  It seems to work pretty well, is compact, and
should work for the configuration systems for groups.conf and
openais.conf.  Patrick comments about its functionality for redhat's xml
parser appreciated..

Objects may be created as children of other objects.  Objects
identifiers may be duplicated.  There can be keys in any object which
are unique within each object and contain a value.

There is data type validation functionality (yet unwritten) which will
validate the data for an object name or key name creation of an object
or a key.  If the object name is invalid for parent object it won't be
created and an error will be returned.  If the key name is invalid or
the data for the key is invalid, an error will be returned.

This should make the config parser code very simple.  Anything with a {
is a new object, anything with a } returns to the parent object for
object operations, anything with an = is a key/value pair.  Then the
parser can detect errors or missing key/values in the configuration in
the exec_init_fn or also using the validator functionality.

We can make this as an lcrso so it may be replaced if bugs pop up or we
need new functions in the interface.  We can pass this interface to the
exec_init_fn and default configuration file parser (and Patrick's
configuration file parser in his lcrso).

Comments welcome...

-steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: obj.tar.gz
Type: application/x-compressed-tar
Size: 4017 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20060130/ee1854e2/obj.tar-0001.bin


More information about the Openais mailing list