[Openais] object database code

Patrick Caulfield pcaulfie at redhat.com
Mon Jan 30 02:34:22 PST 2006


Steven Dake wrote:
> 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...

Can you make the handles into (void *) rather than (int) please ? then I can
hide pointers to structs in them.
-- 

patrick



More information about the Openais mailing list