The Elektra Project
Elektra is a project to unify Linux/Unix configurations. It does that providing an hierarchical namespace to store configuration keys and their values, an API to access/modify them, and some command line tools.
The API was written in pure C because Elektra was designed to be usefull even for the most basic system programs, which are all made in C. Also, being C, bindings to other languages can appear, as we already have for Python, Ruby, etc.
The API follows an Object Oriented design, and there are only 3 classes as shown by the figure:
Elektra Classes
Some general things you can do with each class are:
- Retrieve and commit Keys and KeySets, recursively or not
- Retrieve and commit individual Keys value, by absolute name or relative to parent
- Monitor and notify changes in Keys and KeySets
- Create and delete regular, folder or symbolic link Keys
- Get and Set key properties like name, root and base name, value, type, permissions, changed time, description, etc
- Compare all properties with other keys
- Test if changed, if is a
user/
or system/
key, etc - Flag it and test if key has a flag
- Export Keys to an XML representation
- Linked list of Key objects
- Insert and append entire KeySets or Keys
- Work with its internal cursor
- Compare entire KeySets
- Export KeySets to an XML representation
There are 2 trees of keys: system
and user
It is provided to store system-wide configuration keys, that is, configurations that daemons and system services will use.
Used to store user-specific configurations, like the personal settings of a user to certains programs
When using Elektra to store your application's configuration and state, please keep in mind the following rules:
- You are not allowed to create keys right under
system
or user
. - You are not allowed to create folder keys right under
system
or user
. They are reserved for very essential OS subsystems. - The keys for your application, called say MyApp, should be created under
system/sw/MyApp
and/or user/sw/MyApp
. - It is suggested to make your application look for default keys under
system/sw/MyApp/current
and/or user/sw/MyApp/current
. This way, from a sysadmin perspective, it will be possible to copy the system/sw/MyApp/current
tree to something like system/sw/MyApp/old
, and keep system clean and organized.
Generated on Tue Aug 31 08:40:42 2004 for Elektra Project by
1.3.6