[sugar] Configuration Service?
cody at lodrige.com
Wed Oct 24 05:32:14 EDT 2007
I've been thinking about this for the past few weeks, so I thought I'd send out an email...
We need a way to store configuration data, but our current option (GConf) is not very friendly to systems that do not posses the resources of modern desktop. GConf is still dependent on CORBA for the IPC system, and has some features we don't need such as value caching and "schema" support.
What we (probably) need:
A "hierarchical configuration system", which are just fancy words for a file system paradigm.
This should be implemented as a "global" (probably per-user, per-session) service. I think having a simple service ("daemon") that we can use different backends with down the road is best. The obvious choice for implementation of the service is DBUS.
My current plan is to implement this with the only dependencies being dbus and glib for the daemon, and sqlite for the default datastore. (The datastore code is already complete.)
"value" is defined as : a DBUS-style primitive or container type
"string" will be null-terminated, UTF-8
"sub-tree" means a directory in the configuration data.
1) Store/Retrieve a value for a string key
2) Add/Remove a key sub-tree
3) Remove a key
4) Be notified when a key or sub-tree is changed, accessed, added, or removed (which of these is really needed?)
5) Determine whether a key or sub-tree exists, or not
6) Iterate a sub-tree's keys
7) Some mechanism for key permissions: Determine whether a key is readable or changeable , or not. And a way to change this as well.
Does anyone have anything they would like to edit on the features definition ?
I would like to know how other people feel about this before I proceed with more coding.
Maybe we will want to try and push our solution back to the "mainstream" ?
While the GNOME project has yet to yield a good solution to this, I bet its on the road map. As there is a lot of fragmenting going on in the embedded GTK/GNOME world right now. (Maemo, Access (Palm), Poky, just to name a few..)
Having "competing" implementations being developed should be taken seriously. As I think we want to stay with the rest of the Linux desktop as much as is feasible.
How do people feel about key permissions, and how would this tie into our security system ?
To be clear, I (and anyone who wanted to help of course!) would be implementing this. I'm not trying to pawn a project off on somebody else. :-P
Feel free to email me, or grab me on IRC.
Sorry for the ramble,
More information about the Sugar-devel