LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

Elektrified X.org released

From:  Avi Alkalay <avibrazil-AT-gmail.com>
To:  Development discussions related to Fedora Core <fedora-devel-list-AT-redhat.com>, xdg-list <xdg-list-AT-freedesktop.org>, Discuss issues related to the xorg tree <xorg-AT-freedesktop.org>, Elektra <registry-list-AT-lists.sourceforge.net>, "Timothy D. Witham" <wookie-AT-osdl.org>
Subject:  Elektrified X.org released (was: X configuration paradigm, and a proposal)
Date:  Tue, 30 Nov 2004 10:25:09 -0300
Archive-link:  Article, Thread

For people that still don't know the Elektra Project
(http://elektra.sourceforge.net), it provides an alternative back-end
for text configuration files. So instead, for example, the
human-readable-only xorg.conf file, we'll have a hierarchy of
key/value pairs easily and precisely accessible by X.org and also any
other programs through an API or command, and human beings too.
Same concept as GConf, but designed for system-wide use.

We've been working on X.org source code to do exactly what we just
described above. And it is ready for use, tested even with very
complex X.org configurations. A patched X server will convert your
xorg.conf file automatically, even the most complex ones, including
non-documented parameters.

It is available at 
http://sourceforge.net/project/showfiles.php?group_id=117521
http://sourceforge.net/project/showfiles.php?group_id=117...

You'll find there the patch against X.org source, the patch against
Fedora Core 3 RPM spec file (to see how to build it), and the README
file, which is pasted in this e-mail bellow.

We'll write patches for other software, and everybody is invited to
join this integration effort.

Thank you,
Avi Alkalay
Elektra Project <http://elektra.sf.net>>

----------------------README-------------------------
ELEKTRIFIED X.ORG: PRECISE AND PROGRAMATICALY EASY X CONFIGURATION

   Your X server has to work with your installed video card, monitor, find
   your font server and dirs, modules, extensions, drivers, plugins.
   You have to tell him how to integrate it all through its xorg.conf file.
   If you need to change something, you start a text editor and use your
   human brain and eyes to find the correct line, understand it, have the
   skills to change it, and change it in order to work.
   
   This is good for advanced technical guys, but very bad for people that
   don't have this skills, and in fact, don't really want to. He just
   wants to change the screen resolution to make that projector work with his
   laptop, and go ahead with his sales presentation. This is just an example.
   
   The point is: it is very difficult to make simple programs or scripts
   that make simple changes to X configuration. Another example is a monitor
   vendor that wants to support X, and for this he'd like to provide easy
   installation of his product, without having to ask his user to read
   documentation about horizontal Sync, and vertical refresh rates. For him
   again is difficult to write some simple software that preciselly changes X
   configuration to work correctly with his product.
   
   The xorg.conf file (as most Unix configuration files) was designed for
   human beings.
   
   The Elektra Project (http://elektra.sourceforge.net) introduces a new way
   to handle configurations through a clean API (or command line
   tool) that accesses atomic configuration data, into a standarized
   hierarchycal tree of key-value pairs. It is similar to GConf, but
   designed for system-wide use, which also implies it does not have
   dependencies.
   
   And this is what this patch is about: to make the X server look for its
   configurations into a machine-ready tree of key-value pairs, instead of
   the human-ready xorg.conf.
  
   So where you had to look for "Device radeon" into a "Section Device",
   with the key/value tree, X and other programs can look for it
   preciselly at
   
      system/sw/xorg/current/Devices/Videocard0/Driver = radeon

   
   Where you once had to "vi" your "Section Monitor", now X and other
   programs can do it accessing the keys:
   
      system/sw/xorg/current/Monitors/Monitor0/HorizSync = 31.5 - 48.5
      system/sw/xorg/current/Monitors/Monitor0/VertRefresh = 40.0 - 70.0
      system/sw/xorg/current/Monitors/Monitor0/ModelName = IBM T40 LCD Panel
      system/sw/xorg/current/Monitors/Monitor0/VendorName = IBM
      system/sw/xorg/current/Monitors/Monitor0/Options/dpms
  
   
   Where once the salesman above had to "vi" the Screen Section to change
   the resolution, color depth, etc, a program can help him accessing:
   
      system/sw/xorg/current/Screens/Screen0/Displays/00/Depth=24
      system/sw/xorg/current/Screens/Screen0/Displays/00/Modes=1024x768

   
   And so on....
   
   We believe an elektrified X server can leverage more plug-and-play
   configurations, providing configuration power to HW vendors in a
   very simple way, and making users experience less painfull.
   
   

   
      

BEHAVIOR OF AN ELEKTRIFIED X SERVER

   A patched X server will look for its configuration keys under the
   namespace:
   
      system/sw/xorg/current   first, then if not found it tries
      system/sw/xorg
      
   If not found, it will default to some xorg.conf file, parse it, and store
   in its internal structures, then convert and commit it to a set of
   keys under system/sw/xorg/current, and reload these keys.
   
   So you get automatic one-time conversion from xorg.conf to the
   hierarchycal configuration key/value pairs 
   
   Very complex examples of xorg.conf files were tested for conversion. Even
   undocumented configuration parameters (because the original source was
   used as the reference).
   
   The Elektrifyied X server also works for the Red Hat Graphical Boot,
   where you still don't have mounted partitions, network, etc.

   
      


ELEKTRIFING X.ORG

   You'll need the elektra-devel package installed in order to build X with
   Elektra support.

     1. Download and unpack X.org source code from
     2. Download the xorg-x11-6.8.1-elektra.patch file from

http://sourceforge.net/project/showfiles.php?group_id=117...
     3. Apply it:
         ~/src/xc$ cd ..
         ~/src$ patch -p0 < xorg-x11-6.8.1-elektra.patch
         ~/src$ cd xc
         ~/src/xc$ # ...configure your build in host.def
     4. Enable the patch:
         ~/src/xc$ echo "#define UseElektra" >> config/cf/host.def
     5. Build X.Org

   You'll find the new X server as file xc/programs/Xserver/Xorg .
   
   The patch will add the following files:

      xc/programs/Xserver/hw/xfree86/parser/
        elektgration business logic)
        xorg-example.conf (a very complex conf file to test conversion)
        xelektrify.c (cmd to convert xorg.conf->keys and vice-versa)
        README.Elektra (this file)
   
   And it will instrument 
   xc/programs/Xserver/hw/xfree86/common/xf86Config.c::xf86HandleConfigFile()
   to trigger the one-time conversion, and key fetching logic.
   
   And instrument the Imakefiles for correct builds:
   
      xc/programs/Xserver/hw/xfree86/parser/Imakefile
      xc/programs/Xserver/hw/xfree86/common/Imakefile
      xc/programs/Xserver/Imakefile
      
   If "#define UseElektra" is not present in host.def, the patch is
   completelly disabled, and you'll get a binary-identicall built as before
   applying the patch. All patched code are surrounded by #ifdefs.

   
   
      

ELEKTRA MEETS X.ORG SOURCE CODE
or how we wrote the patch....

   X.org has an xorg.conf parser that takes this steps to handle
   configuration:
   
      1. Lexically parse the xorg.conf file
      2. Put each Section info in an equivalent struct
      3. Encapsulate all structs together and pass them to a validator
      4. Use structs to define X behavior

   This process is triggered by the xf86HandleConfigFile() method from
   
      xc/programs/Xserver/hw/xfree86/common/xf86Config.c
   
   Each xorg.conf Section has an equivalent structure defined in

      xc/programs/Xserver/hw/xfree86/parser/xf86Parser.h
      
   and the lexycall analyzer code to parse each Section is under
   
      xc/programs/Xserver/hw/xfree86/parser/
   
   A fully parsed file has its equivalent structures encapsulated in a
   parent XF86Config struct. We have:
   
      struct XF86ConfModuleRec for the "Section Modules"
      struct XF86ConfMonitorRec for the "Section Monitor"
      struct XF86ConfDeviceRec for the "Section Device"
      etc...
      
   These structs are a pure computer representation of the text in each
   Section, so the methods under "parser/" convert text to structs, and
   the structs to text. This is how original X.org source handles xorg.conf.
   
   The Elektrification add methods that act in steps 1 and 2 above. And also
   include methods to convert each struct to a KeySet. Both old (xorg.conf)
   and new (Elektra) ways to get configuration information can live together
   and they are actually used to automatically convert xorg.conf to keys. So
   at the first time you'll run your elektrified X server, it will:

      1. Not find configuration keys (because it is the first time)
      2. Parse xorg.conf into structs
      3. Convert structs to Keys
      4. Commit the keys to key database
      5. Reload configurations from the key database

   See the behavior in the previous section.
      
   After assembling the XF86Config C structure, X will decode all its info
   into more practicall parameters for its further operation.
   
   As a side note, with a key/value pair configuration hierarchy paradigm,
   the XF86Config assembling code (the parser) could be avoided, making X
   look for its configurations in a programatically easier, yet
   human-readable, configuration organization.
   We worked at the parser level to keep compatibility and to not go too
   deep in X.org source code.

   
http://elektra.sourceforge.net
The Elektra Project
Avi Alkalay
November 2004


(Log in to post comments)

Elektrified X.org released

Posted Nov 30, 2004 16:45 UTC (Tue) by marduk (subscriber, #3831) [Link]

This all looks interesting, but how is it really different from gconf. The description says it's different in that it's used at a system-wide level, but can't gconf be used for system-wide configurations as well?

Elektrified X.org released

Posted Nov 30, 2004 16:56 UTC (Tue) by evgeny (subscriber, #774) [Link]

> can't gconf be used for system-wide configurations as well?

Only if Gnome is run from /etc/inittab ;-)

Elektrified X.org released

Posted Nov 30, 2004 17:17 UTC (Tue) by philips (guest, #937) [Link]

Good point.

I wouldn't claim that X config is easy. But I beleive that it is much easier to parse by human beings, than what is proposed.

Anyway, it still comes down to question "what to put where".

Apache Config editors are available in abundance - why the same approach can be taken for X?
People already developed xmlgrep - so that extracting information from structured storage is easy.
Modification of this configuration must be complicated - as to fence off people who do not understand what they do.

And what is more. I'm strictly opposed to "system-wide" stuff. One thing is death of Gnome due to damaged config. Another thing is "system-wide" death of system due to damaged config. Different apps have different configs and different priorities for configs. For example, you do not want to mess with /etc/inittab - and you definitely do not want users to be able to manipulate it easily. One size never fits all.

Elektrified X.org released

Posted Nov 30, 2004 18:51 UTC (Tue) by emkey (guest, #144) [Link]

I remember when Windows went from hundreds of poorly documented .ini files to one even more poorly documented registry tree. I didn't view it as progress then and my first instinct is to not view this effort as progress either.

Change in heart for M$

Posted Nov 30, 2004 19:44 UTC (Tue) by jimwelch (guest, #178) [Link]

I just took an "official" class in Windows CE (groan) and M$ is now pushing people to go BACK to ini files and away from the registry (security reasons)!!

Elektrified X.org released

Posted Nov 30, 2004 20:11 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

That's the point of using a filesystem-based database[*]. The file system is solid and won't be easily corrupted. If a process starts trashing it won't easily corrupt the database (filesystem) itself. That is much unlike XML, where one missing '>' could get rid of a whole subtree.

Elektra also does not need its own daemon. The kernel already does the job.

[*] Think of Hans Reiser's ideas.

Elektrified X.org released

Posted Nov 30, 2004 20:47 UTC (Tue) by evgeny (subscriber, #774) [Link]

> The file system is solid and won't be easily corrupted. If a process starts
> trashing it won't easily corrupt the database (filesystem) itself. That is
> much unlike XML, where one missing '>' could get rid of a whole subtree.

A single corrupted byte in the filesystem block layer could be as dangerous. It's the fsck maturity that eliminates these problems in almost 100% of cases. Similarly, a smart XML parser can be built that can recover from such errors.

> Think of Hans Reiser's ideas.

Yeah, if reisrfs-4 (or -5?) existed years ago AND under all Unices, that could make a difference.

Elektrified X.org released

Posted Nov 30, 2004 22:42 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

The filesystem is stable. It has to be. Otherwise your configuration gets corrupted whatever you do.

However why replicate so many features that the file system already give you in a database? Or in 2500 implementations of 50 different configuration formats.

Elektrified X.org released

Posted Dec 1, 2004 10:03 UTC (Wed) by evgeny (subscriber, #774) [Link]

> The filesystem is stable. It has to be.

I see no reason why a DB should inherently be less stable.

> However why replicate so many features that the file system already give you in a database?

Because FS will never provide me with all the advanced features one expects from a decent configuration system - not without stacking dozens of extra daemons/utilities/... on top of it, at least.

> Or in 2500 implementations of 50 different configuration formats.

Of course. I said it in the beginning, that I like the _idea_ itself - to replace the whole current zoo of config approaches with a single API. It's the _implementation_ that seems to me a dead end.

Elektrified X.org released

Posted Dec 1, 2004 16:23 UTC (Wed) by tzafrir (subscriber, #11501) [Link]

How do you create different permissions on different part of the database without a priviliged daemon (or something uglier, such as a SUID root binary) ?

This is an important requirement: user applications need not run as root to read configuration. But there should be a place for the secret data.

But please name one thing a database provides that a filesystem doesn't. What database exactly (daemon? file-based? which one?)

Elektrified X.org released

Posted Dec 1, 2004 21:37 UTC (Wed) by evgeny (subscriber, #774) [Link]

> How do you create different permissions on different part of the database
> without a priviliged daemon (or something uglier, such as a SUID root binary) ?

Depends on the implementation. For a DB _service_ (a daemon running) it's solved like for any other similar problem (and there is no need for it to run under a privileged account - e.g. slapd on my server runs as an unprivileged user 'ldap', yet system-wide authentication works fine). For a simple file-based DB like SQLite it can be solved by splitting the whole data into a few files (1 - writable by root, readable by everyone; 2 - r/w by root ony, plus, similarly, two files per user account).

> But please name one thing a database provides that a filesystem doesn't.

Expressions (aka views). E.g. SELECT * FROM user WHERE user.id > 400 - to have a list of "real" users - used, for example, to send an announce email. Etc. Other things are replication, atomicity, true locking, notifications, rollbacks, versioning, transparent remote access, scalability (in _both_ directions). You get all these for free with a decent RDBMS, and NONE of them with an existing filesystem.

Elektrified X.org released

Posted Dec 2, 2004 22:55 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

> > But please name one thing a database provides that a
> > filesystem doesn't.
>
> Expressions (aka views). E.g. SELECT * FROM user WHERE
> user.id > 400 - to have a list of "real" users - used,
> for example, to send an announce email. Etc.

OTOH, the strict typing of the data will get back at you when you try something like:

grep -rl /home/joe /etc/

> Other things are replication,

Try rsync

> atomicity, true locking,

What about filesystem-level locking?

> notifications,

Change notification for a directory is available.

> rollbacks, versioning,

Put arch/subversion in there (cvs probably won't do as it does not support renames)

> transparent remote access,

Add a remote-access daemon. Quite simple to implement. You have to figure out the authentication method first. Currently practically no existing daemon intgrates well enough with the system.

> scalability (in _both_ directions).

Filesystem access is quite scalable

Elektrified X.org released

Posted Dec 3, 2004 19:42 UTC (Fri) by evgeny (subscriber, #774) [Link]

> OTOH, the strict typing of the data will get back at you when you try something like:
>
> grep -rl /home/joe /etc/

Sorry, I didn't get what you meant.

> Try rsync [etc etc etc]

I don't want. For the same reason that nobody in sane mind will pipe 'telnet 80 | html2txt | less' to browse the Web. Possible - yes. Great when nothing else is available - yes. But call this THE ultimate browser?!

Elektrified X.org released

Posted Nov 30, 2004 22:58 UTC (Tue) by iabervon (subscriber, #722) [Link]

I'd actually claim that X.org configuration is easy. X.org is fine without a config file, unless your monitor is old, in which case you have to include info on your monitor's capabilities. If you want to use a few different resolutions, you have to tell it which ones you want. Other than that, there's not much that needs to be specified, at least in my limited experience.

Differences between Elektra and GConf

Posted Nov 30, 2004 17:08 UTC (Tue) by bkw1a (subscriber, #4101) [Link]

Here's an excerpt from the docs:

Compared to Gnome's GConf, Elektra is not a daemon, and is much lighter. GConf uses XML documents as backends, stored in user's home directory. XML based software are memory eaters. GConf seems not to be preoccupied with access permissions, making it a good solution only for personal use in desktop (high level) systems. Also it is heavily Gnome dependent as we can see from the libraries it uses:

$ ldd /usr/bin/gconfd-1
libgconf-1.so.1 => /usr/lib/libgconf-1.so.1 (0x4375b000)
liboaf.so.0 => /usr/lib/liboaf.so.0 (0x4373f000)
libORBitCosNaming.so.0 => /usr/lib/libORBitCosNaming.so.0 (0x00cfd000)
libORBit.so.0 => /usr/lib/libORBit.so.0 (0x00ca9000)
libIIOP.so.0 => /usr/lib/libIIOP.so.0 (0x43735000)
libORBitutil.so.0 => /usr/lib/libORBitutil.so.0 (0x00ce9000)
libm.so.6 => /lib/tls/libm.so.6 (0x00b50000)
libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x00d58000)
libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x00d31000)
libdl.so.2 => /lib/libdl.so.2 (0x00b74000)
libc.so.6 => /lib/tls/libc.so.6 (0x00a15000)
libpopt.so.0 => /usr/lib/libpopt.so.0 (0x001ff000)
libwrap.so.0 => /usr/lib/libwrap.so.0 (0x4387c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x009fd000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4f727000)

This is useless for an early boot stage program (/usr/lib may be still unmounted), and for a very small OS installation that won't require desktop features, like a router, small firewall, or any other appliance. On the other hand, the Elektra database access library is very slim with a minimum of dependencies:

$ ldd /lib/libkdb.so
libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x009fd000)

Elektrified X.org released

Posted Nov 30, 2004 17:13 UTC (Tue) by evgeny (subscriber, #774) [Link]

I'm all for the ideas of this project, EXCEPT the choice of the backend DB. I expressed my views quite a time ago (http://freshmeat.net/projects/elektra/#comment-31642), but that remained largely unanswered.

Elektrified X.org released

Posted Nov 30, 2004 17:52 UTC (Tue) by khim (subscriber, #9252) [Link]

What's wrong with fs approach ? Any decent filesystem (i.e.: not ext2/ext3) can handle 1'000'000 files per directory and 10'000 directories with ease and without big space loss. XFS, JFS, Reiser4 - take your pick.

Elektrified X.org released

Posted Nov 30, 2004 19:08 UTC (Tue) by elanthis (subscriber, #6227) [Link]

Because real-life users *do* use ext2/ext3, and any system that's intended to be an actual part of common Linux systems needs to take that into consideration.

The "your FS sucks, use the experimental/unstable one I prefer" approach doesn't work. Especially not when you can just fix the system to not *need* a "better filesystem." For example, just store multiple keys in one file. Not that difficult at all. Insanely simple, even.

Multiple files also making transactions IMPOSSIBLE (literally) because there is no way to perform an atomic action touching multiple files. Its as simple as that - with multiple files, the entire database is unsafe, because it can get corrupted and out of sync. Real life applications will have multiple keys that need to be in one of several states, such that certain combinations don't make sense. Without transactions and *guaranteed* atomic commits it would be possible for these states to occur in certain circumstances, resulting in broken applications.

Elektra also lacks change notification (so you still need to restart/signal daemons) and several other important features. As is, the *ONLY* thing it offers is a common API. And given the huge number of existing apps and scripts that will break by switching to Elektra, that common API just isn't worth it. Elektra also lacks features that other apps *need* like change notification or schemas, making it unusable.

The entire Elektra design can be improved upon. In fact, there are better designs already in existance. One (sorry, I forget the name - Config4GNU or something like that) uses multiple backends. So, if you set a key in the X.org namespace, it would load a backend that reads and writes the existing X.org configuration file. The advantage here is that already existing and already in-use configuration utilities continue to work while new applications can use the universal API. New applications would just use the default config backend, which would be some database or file heirarchy or whatever. Because of the backends, the system can inject a daemon that, for example, singles key changes over D-BUS allowing applications to be notified when the user changes something. By using a pluggable backend, the launching of this daemon can be delayed until after the initial system bootup, allowing the config system to be used during early-early boot with reduced features, and then become fully operational once enough of the system is up and running.

Elektra is a nice thought experimental, but it is far from the ideal implementation. It might evolve into a complete solution over time, or it might give way to Config4GNU or some other system.

File systems

Posted Nov 30, 2004 20:00 UTC (Tue) by tarvin (subscriber, #4412) [Link]

It's my impression that both ext2 and ext3 are getting rather good at handling directories with many files.

Elektrified X.org released

Posted Nov 30, 2004 20:18 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

regarding atomic operations:

you can get nearly-atomic operations by creating a temporary file/directory copy and then mv(1) it to the right place. This does does unlink(2) and rename(2).

Anything more requires a specilized daemon,

Elektrified X.org released

Posted Nov 30, 2004 22:33 UTC (Tue) by Ross (subscriber, #4065) [Link]

That is atomic. The problem is if you are changing multiple files.

My question is why are you doing that?

But if you insist, you can do atomic operations with multiple files as long
as you don't have to have the same directory name for the old and new
version. Yes, it requires hard links or copying entire directories but
really, if a "solution" requires such ugly things then I'm quite happy to
live without it.

Elektrified X.org released

Posted Dec 1, 2004 8:33 UTC (Wed) by Wol (guest, #4433) [Link]

And why is changing multiple files any different to changing multiple places in one large file? The database I work with stores each "table" in a separate file, and yet it's quite happy with transactions and commits across multiple files.

And (certainly from the nix viewpoint) isn't the file system seen as just one large file? So, from that vantage point, updating multiple files IS just one change to one large file :-)

Cheers,
Wol

Elektrified X.org released

Posted Dec 1, 2004 16:27 UTC (Wed) by tzafrir (subscriber, #11501) [Link]

This is achived by having all accesses to those files going through a database daemon. That daemon should guarantee that locks/transactions etc. are maintained. It also caches currently-used values.

In the filesystem level the kernel does basically the same things.

Elektrified X.org released

Posted Nov 30, 2004 19:10 UTC (Tue) by busterb (subscriber, #560) [Link]

To expand on this, the best backend is one that supports tracking revisions and rollbacks. Perhaps a CVS/Subversion backend, since they both can store data in relatively plain files? We already use Subversion for tracking changes to /etc, so this would be a natural extension.

Elektrified X.org released

Posted Nov 30, 2004 20:29 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

You can easily maintain everything using version control (you'd probably want something that supports renames).

All you need is to make sure that there is always an up-to-date copy of the configuration file in the right place.

Elektrified X.org released

Posted Nov 30, 2004 21:12 UTC (Tue) by LogicG8 (guest, #11076) [Link]

> the best backend is one that supports tracking revisions and rollbacks.

I really have to disagree. Revision control systems are complicated
complications suck. Remember that /usr might not be mounted yet.

$ ldd /usr/bin/svn | wc -l
29

And that doesn't even count the dependencies of svn's dependencies... I
would like to be able to use this system for all the configuration files
in the system from init on up. If you want revision control this can be had
without introducing complications to booting and overhead embedded systems
won't put up with. The trick is to make the configuration directory a
working directory of subversion repository. Edit a file; commit changes; be
done with it. No need to have a revision control system to boot. This even
makes it easy to store the revision history on a another computer.

My reasons for actually liking this system:

1) Ability to hand edit config files. If I'm working over ssh (and I do
quite a bit) I want to be able change configurations.

2) Independence of data. If you've ever had a chunk of the registry
corrupted on Windows(tm) you understand the importance of this.

3) I can easily copy/save specific configuration data. With database
systems this tends to be awkward.

4) I can have comments.

5) This can be combined with MACs (mandatory access controls) or ACLs
(access control lists) for free.

6) This one is only speculation on my part but corruption can only happen
with misbehaving programs. If a program respects flock() two programs won't
step on each other. This can be a "if you don't know what you are doing
thing don't do it." Most users will only use a GUI or kdb so this probably
won't even come up. Even if corruption occurs (power outage, brain damaged
program, PIBCAK, whatever) see reason 2.

7) No new paradigms to learn. I know how get around in a filesystem.
I can use find.

8) Easy program interaction. I'll be thrown out of the *nix geek club for
sure for saying this but I *like* GUI configuration programs. I like things
to be easy.

9) More shared code. One less thing to worry about.

Elektrified X.org released

Posted Dec 1, 2004 0:30 UTC (Wed) by emkey (guest, #144) [Link]

>"8) Easy program interaction. I'll be thrown out of the *nix geek club for
sure for saying this but I *like* GUI configuration programs. I like things
to be easy."

As do most of us. The problem being GUI's don't for the most part scale worth a dang. In general GUI's are fine, but they should always be considered secondary to some sort of CLI interface. The problem is many vendors get it backwards, or worse yet don't implament any sort of CLI.

Elektrified X.org released

Posted Nov 30, 2004 20:09 UTC (Tue) by evgeny (subscriber, #774) [Link]

Well, ext2/ext3 is a filesystem of choice for a very significant (probably still major) part of Linux users. Further, apache/bind/.... will NEVER officially use anything that's available for Linux only (and other Unices don't necessarily have all that advanced filesystems).

But more importantly, a dumb fs-based config is just that: a dumb one. Whereas a decent configuration system should provide for logical expressions, remote management, replication, versioning, transactions/rollbacks etc. All this is practically impossible with a filesystem-based config tree; and all this is posssible with RDBMS.

Elektrified X.org released

Posted Nov 30, 2004 22:45 UTC (Tue) by khim (subscriber, #9252) [Link]

But more importantly, a dumb fs-based config is just that: a dumb one. Whereas a decent configuration system should provide for logical expressions, remote management, replication, versioning, transactions/rollbacks etc. All this is practically impossible with a filesystem-based config tree; and all this is posssible with RDBMS.

If your filesystem is dumb - it's not possible. If your filesystem is smart - it can be done. True - it should be supplied as addon over simple system but all-in-one solutions are never good.

Elektrified X.org released

Posted Dec 1, 2004 10:31 UTC (Wed) by evgeny (subscriber, #774) [Link]

> If your filesystem is dumb - it's not possible. If your filesystem is smart - it can be done.

So we can return to this discussion when every man and his dog have such smart filesystems - including embeded devices etc.

Elektrified X.org released

Posted Dec 2, 2004 10:08 UTC (Thu) by szh (guest, #23558) [Link]

Don't forget to also return to the fact, that not every man and his dog
want replication, versioning, transactions/rollbacks etc.
And many of those who need, can do this with filesystems + there own
scripts. Just regular cron /etc [or parts of /etc] [incremental] backups
satisfy many men and dogs.
So the new system will give drawbacks only for those men and dogs.

Elektrified X.org released

Posted Dec 2, 2004 10:28 UTC (Thu) by evgeny (subscriber, #774) [Link]

> Don't forget to also return to the fact, that not every man and his dog
> want replication, versioning, transactions/rollbacks etc.
> And many of those who need, can do this with filesystems + there own
> scripts.

Continuing this nice logics, there is no need for a unified configuration system altogether - just as everyone has been adjusting dozens of different configs during the last twenty years of mainstream Unix usage, so we can do it further on. Right?

Elektrified X.org released

Posted Dec 1, 2004 0:45 UTC (Wed) by tzafrir (subscriber, #11501) [Link]

remote management etc. is beyond the scope of Elektra. Electra is not aware of the semantics of the configuration. It just provides a simple method of accessing configuration.

Adding remote management, versioning on top of that is proably possible.

The main non-standard feature required for Elektra to work propely is symlinks. And even without it most things will work. Other than that all you need is basic file-system interface.

Elektrified X.org released

Posted Dec 1, 2004 10:47 UTC (Wed) by evgeny (subscriber, #774) [Link]

> remote management etc. is beyond the scope of Elektra. [...] It just provides a simple method of accessing configuration.

Exactly. It, essentially, implements the day-before-yesterday functionality (INI configs) yet requires facilities not present in all current filesystems.

> Adding remote management, versioning on top of that is proably possible.

Well, the keywords here are "on top" and "probably". ;-) With the same expected level of success as adding security on top of DOS was. It just strikes me that a project with such an ambitious goal as converting _all_ the Unix configuration mess to a single API didn't bother thinking of even yesterday's requirements to system configuration!

Elektrified X.org released

Posted Dec 2, 2004 23:07 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

> Exactly. It, essentially, implements the
> day-before-yesterday functionality (INI configs)

No, it is not INI config. With INI config you have only thre-level deep tree of configuration (file, section, key). Electra does not have this silly limitation.

> yet requires facilities not present in all current filesystems.

The *required* facilities are avilable everywhere. On some systems it will be less efficient. But even ext3 now has support for a more scalable directory access . Try tune2fs -O dir_index

> Well, the keywords here are "on top" and
> "probably". ;-) With the same expected level
> of success as adding security on top of DOS was.

Rebuilding everything from scratch has even less expected chance of adding security.

> It just strikes me that a project with such
> an ambitious goal as converting _all_ the Unix
> configuration mess to a single API didn't bother
> thinking of even yesterday's requirements to
> system configuration!

Into a system that is easy to use by eveything and can be used anywhere.
How can you configure the network using this daemon if the networked daemon needs the network configuration just to get going?

Elektrified X.org released

Posted Dec 3, 2004 19:49 UTC (Fri) by evgeny (subscriber, #774) [Link]

> How can you configure the network using this daemon if the networked daemon needs the network configuration just to get going?

In exactly the same way I can run a LDAP server holding the user DB under a given account. Also, think e.g. of gcc bootstrapping, running of fsck on / before anything is mounted etc. We have a lot of similar chicken-or-egg problems.

Elektrified X.org released

Posted Nov 30, 2004 17:58 UTC (Tue) by Ross (subscriber, #4065) [Link]

The day I can't edit config files with vi is the day I stop using Linux.
If you want your config files in a database go ahead, but I'm certainly not
going to stand for it on my systems.

Elektrified X.org released

Posted Nov 30, 2004 18:00 UTC (Tue) by jwb (subscriber, #15467) [Link]

An RDBMS is the worst possible backend for this. Primarily, the data is not relational! That should be a dead giveaway. But furthermore you would not be able to store postgresql's configuration in postgresql, for obvious reasons, and even if you could, you're elevating postgresql to the status of required package, like ld, sh, and init. That's not a good idea. And if you study the history of incompatible RDBMS formats, even between minor revisions of the same product, you should be well and truly disuaded from using one for basic configuration information.

Elektrified X.org released

Posted Nov 30, 2004 20:32 UTC (Tue) by evgeny (subscriber, #774) [Link]

> Primarily, the data is not relational!

Why? Do you mean it's tree-like? But it's well known how to map 1:1 a tree structure (or graph in general) to relational tables.

> But furthermore you would not be able to store postgresql's configuration in postgresql

Postgresql can use PAM for authentication. On the other hand, there is a pgsql-based PAM plugin. See the point? Like PAM has a plain-files fallback backend, so could the config system have.

> and even if you could, you're elevating postgresql to the status of required package

Again, this is wrong for a plugin-backend-based system. A SOHO config would use e.g. SQLite which needs neither config of its own, nor a daemon running.

Having said this, I don't insist on RDBMS. It could be e.g. an XML DB. The problem though, there is neither reilable implementation nor widely accepted XML query language... My point is that fs-based config is a dead end.

Elektrified X.org released

Posted Nov 30, 2004 23:02 UTC (Tue) by khim (subscriber, #9252) [Link]

Why? Do you mean it's tree-like? But it's well known how to map 1:1 a tree structure (or graph in general) to relational tables.

Possible - yes. Convenient - no. Tree-like information should live in tree and we already have one - filesystem tree.

Again, this is wrong for a plugin-backend-based system. A SOHO config would use e.g. SQLite which needs neither config of its own, nor a daemon running.

Can I use vi over ssh to edit my config then ? No ? Then it's not contender.

Having said this, I don't insist on RDBMS. It could be e.g. an XML DB. The problem though, there is neither reilable implementation nor widely accepted XML query language...

And even if there is you are still with the same problem: you do not have access control.

My point is that fs-based config is a dead end.

I'm struggling to see your point. And can not. With fs tree we are having right from the start two important features:
1. Ability to edit config files with text editor.
2. Ability to fine-tune access rights to every part of system.

You can add remote management, replication, versioning, transactions/rollbacks if you wish - you only need good enough filesystem.

If your argument is translated to simple terms it's this: our silesystems are broken and lack a lot of needed features - but we should not fix them. Instead we should build some compilcated system over raw chunk of disk (== file used by RDBS or XML DB). My question is: why ? Why not fix filesystems instead ? Transactions and replications are nice to have for other things. Simple system upgrade is painfull without them! You can not replace Apache with new version before all mosules are upgraded but if you'll upgrade modules first then old apache can not be used anymore. True - window of oppurtunity is not so big, but it still exist. I fail to see why configuration of my system deserve more reliability then my system itself!

Elektrified X.org released

Posted Dec 1, 2004 8:53 UTC (Wed) by Wol (guest, #4433) [Link]

"Tree-like information should live in a tree". I couldn't agree more!

And I'm going to get shafted for this by the relational crew, but relational theory is CRUD! Look at C&D's first rule - "data is stored as rows and columns". What real-world data comes as rows and columns? NONE of it as far as I can see. Pretty much all of C&D's rules have as much mathematical basis in fact as Euclid's rule that "parallel lines never meet".

And that rule of Euclid, by being wrong, held back geometry for 2000 years. Real world data does NOT come in neat two-dimensionsal packages. Therefore real world data does NOT belong in relational databases.

That's not to say relational theory doesn't have its uses - it is very useful. But by trying to force everything into its own (faulty) mould, it does the rest of the world a major dis-service.

Cheers,
Wol

Elektrified X.org released

Posted Dec 1, 2004 11:33 UTC (Wed) by evgeny (subscriber, #774) [Link]

> And that rule of Euclid, by being wrong, held back geometry for 2000 years.

Poor Newton. He could discover the general relativity, if not that stupid greek. Was it an attempt at troll?

> Real world data does NOT come in neat two-dimensionsal packages. Therefore real world data does NOT belong in relational databases.

Do some text-book reading before posting, please.

Elektrified X.org released

Posted Dec 1, 2004 11:18 UTC (Wed) by evgeny (subscriber, #774) [Link]

> Tree-like information should live in tree and we already have one - filesystem tree.

Configurations are NOT trees. They're graphs (the symlinks used by Electra is a poor-man solution to this). Plus, they're _dynamic_ ones.

> Can I use vi over ssh to edit my config then ? No ? Then it's not contender.

Gosh. Why not `ed' then? There is a userfs plugin that allows to navigate/edit a postgres DB like a directory, if you insist on that. I also assume that you code exclusively in assembler and use `telnet 80 lwn.net' to read my reply.

> And even if there is you are still with the same problem: you do not have access control.

RDBMS have no access control?!

> You can add remote management, replication, versioning, transactions/rollbacks if you wish - you only need good enough filesystem.

U-hu. Just a tiny obstacle.

> Why not fix filesystems instead ?

Well, go fix them. IMHO, filesystem developers have more urgent tasks than tailoring their filesystems to an ambitios configuration project. So we can wait years and years - and still have a dumb (no logical expressions etc) configuration mechanism.

Elektrified X.org released

Posted Nov 30, 2004 17:28 UTC (Tue) by alex (subscriber, #1355) [Link]

I'm not convinced by this approach. I think human readable config files are a great idea for one reason. Comments!

For example my exim.conf file is well commented with the changes I have made over time to handle more complex mail setups. It give a lot of context to why you changed a value from one thing to another which is useful when you want to tweak stuff 6 months down the road.

It would be nice if there was a more standardised way of doing config files so each app didn't have its own perculiarites. But until then I want to keep my configs human readable!

It *is* human readable!

Posted Nov 30, 2004 17:47 UTC (Tue) by dank (subscriber, #1865) [Link]

Did you bother to read the doc? The file format is totally
human-readable. It even supports comments.

It *is* human readable!

Posted Nov 30, 2004 18:46 UTC (Tue) by alex (subscriber, #1355) [Link]

I get that, however thats not the impression I got from the Press Release. I'm all for a decent config method however my exim example is still an valid one. The mapping to key/value pairs (with individual comments) is not the most useful for context. Compare:
# This director handles forwarding using traditional .forward files.
# It also allows mail filtering when a forward file starts with the
# string "# Exim filter": to disable filtering, uncomment the "filter"
# option. The check_ancestor option means that if the forward file
# generates an address that is an ancestor of the current one, the
# current one gets passed on instead. This covers the case where A is
# aliased to B and B has a .forward file pointing to A.

# For standard debian setup of one group per user, it is acceptable---normal
# even---for .forward to be group writable. If you have everyone in one
# group, you should comment out the "modemask" line. Without it, the exim
# default of 022 will apply, which is probably what you want.

userforward:
  driver = forwardfile
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply
  no_verify
  check_ancestor
  file = .forward
  modemask = 002
  filter
to

/userforward/driver = forwardfile          # the driver is a forward file
/userforward/file_transport = address_file # the file transport is an address file
/userforward/pipe_transport = address_pipe # the pipe transport is an address pipe
..
..
Do you see my point? Don't misunderstand me. I think Elektra is a valuable contribution to FOSS configuration and doing things like the X.org patch set is a good way to introduce the system to the world. However I don't think we will see an end to the monlithic configure file either.

Re: It *is* human readable!

Posted Nov 30, 2004 20:40 UTC (Tue) by sdalley (subscriber, #18550) [Link]

Full marks for a beautifully commented exim.conf ...

However, surely the same result could be obtained by putting .Comment file(s) judiciously in appropriate directories. A viewer tool would be capable of merging everything to do with exim (or any other program) back into a view that looks like a single file with comments. A sufficiently smart one could even edit that view and save the keys/values back in one hit.

viewer tool

Posted Nov 30, 2004 22:07 UTC (Tue) by alex (subscriber, #1355) [Link]

"A viewer tool" vi is my viewer tool. I'm probably sounding horribly snobbish about plain text files, but they require nothing more than an editor. If the tool isn't as easy to use as that then it will be all the harder to get acceptance. But thats just an engineering challange to be over come. Feel free, its all about solutions competing on merit ;-)

viewer tool

Posted Nov 30, 2004 22:28 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

Look around http://namesys.com/v4/v4.html#etc_passwd for an example of making this vi-able.

In the mean time Elektra has a tool to edit a subtree as an XML file.

viewer tool

Posted Nov 30, 2004 22:47 UTC (Tue) by JamesErik (subscriber, #17417) [Link]

Part of the point is that this paradigm doesn't even *require* a viewer tool. One could do 90% of what one needed with just 'ls' and 'cat' plus have the added benefit of fine-grained fs-based security.

viewer tool

Posted Dec 1, 2004 8:21 UTC (Wed) by Duncan (guest, #6647) [Link]

Well.. make that ls, cat, echo, and shell redirection, to cover both the
read and write sides of the coin.

Duncan

Elektrified X.org released

Posted Nov 30, 2004 18:23 UTC (Tue) by bk (guest, #25617) [Link]

In the project's own words, this is an effort to "leverage" technologies to assist "ISVs" in deploying products. This is a roundabout way of trying to make Linux/Unix more accessible to the proprietary software market.

I have absolutely zero interest in making my systems: a) less Unix like, b) more complex to administer, and c) less free.

Elektrified X.org released

Posted Nov 30, 2004 18:40 UTC (Tue) by rahulsundaram (subscriber, #21946) [Link]

system-config-display can be considered a "ISV" for xorg configuration file. Not all ISV's sell proprietary software. Another example was Ximian Gnome..

Elektrified X.org released

Posted Nov 30, 2004 18:50 UTC (Tue) by juanjux (guest, #11652) [Link]

I don't think that are the only reasons. One important reason would be to make Unix systems easier to administer. Every time I hit a new config file with a new `cat /proc/urandom` format I've to study (or google a lot) to change a few parameters I certainly feel something is wrong, and I've been using Unix for 10 years (not much for uber-guru standarts, I know).

Elektrified X.org released

Posted Nov 30, 2004 18:54 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

Do you want to claim that Linux should stirve to be inaccessible to propritary applications?

Elektra allows some cool stuff at the distro level. You can have a separate {rpm|deb} package of a certain configuration variant for a specific software.

Remming out a whole subtree can be done by prefixing its name with a '.' . The usage of symlinks allows many cool tricks (try to emulate that with XML). You can give different permissions to different parts of your config file.

Is that worth the price of making the system more accessible to propietary software packages?

Elektrified X.org released

Posted Nov 30, 2004 21:05 UTC (Tue) by evgeny (subscriber, #774) [Link]

> The usage of symlinks allows many cool tricks (try to emulate that with XML)

Refer by ID?

Elektrified X.org released

Posted Nov 30, 2004 23:06 UTC (Tue) by khim (subscriber, #9252) [Link]

Not the same. You'll need application to deciper such references and use them. Doable - yes, convenient - no.

Elektrified X.org released

Posted Dec 1, 2004 10:26 UTC (Wed) by evgeny (subscriber, #774) [Link]

> You'll need application to deciper such references and use them. Doable - yes, convenient - no.

Expat and libxml can do this. And, BTW, what d'ya'think kernel is doing when resolving symlinks?

Elektrified X.org released

Posted Dec 1, 2004 17:51 UTC (Wed) by tzafrir (subscriber, #11501) [Link]

Who should keep the whole XML file in the memory?

Now what about caching those small changes?

Elektrified X.org released

Posted Dec 1, 2004 20:22 UTC (Wed) by evgeny (subscriber, #774) [Link]

> Who should keep the whole XML file in the memory?

1. Which is the "whole XML file"?

2. There is no need to keep the "whole XML" (whatever it means) in memory. There are alternative methods of parsing XML, e.g. SAX.

3. You probably should argue with another person anyway. My suggestion was to use an RDBMS, not XML file(s). I did say an XML-based DB (notice the word _database_ - I never meant plain XML files, especially not one huge file) could be used as well, in principle.

> Now what about caching those small changes?

Same here.

Elektrified X.org released

Posted Dec 2, 2004 23:15 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

> > Who should keep the whole XML file in the memory?

Any software that needs to resolve IDs to nodes.

Elektrified X.org released

Posted Dec 3, 2004 20:27 UTC (Fri) by evgeny (subscriber, #774) [Link]

> > > Who should keep the whole XML file in the memory?

> Any software that needs to resolve IDs to nodes.

So do you say the kernel keeps the whole inode table/whatever in memory? And why memory requirements are different than that for similar task for a filesystem?

Elektrified X.org released

Posted Nov 30, 2004 20:13 UTC (Tue) by tarvin (subscriber, #4412) [Link]

I think that Elektra looks _very_ interesting.

My fear is that Linux configuration will become a nasty mess of XML files (note: just because something is XML-based doesn't automatically make it easily understood). On the other hand, I'm not really fond of the current state where lots of different configuration formats have to be used.

Some people immediately start screaming "argh! - it's the _registry_", referring to Windows' configuration system. But it's not: It's not like your whole configuration system will go down the drain if "_the_ registry" file becomes currupted. And it's not a large binary file which is unfriendly to revision control systems.

It would be great to have a standard configuration API, so that writers of new software don't have to invent their own configuration parsers again and again, but can concentrate on documenting the configuration options.

I really hope that some people will be able to look through the fog of fear and conservatism and give this initiative a chance.

Not so good

Posted Nov 30, 2004 20:21 UTC (Tue) by xav (subscriber, #18536) [Link]

Elektra is just a hierarchic view of the traditionnal config file. Although it enables parts of the config to be updated without having a parser to rewrite the config file, it's far from what X really need: a totally dynamic config. X shouldn't require to have its config set in stone in a file, but should allow for dynamic discovery of hardware and reconfiguration at will without restarting running applications. Think RandR extension, but for everything.

X needs

Posted Nov 30, 2004 20:37 UTC (Tue) by tarvin (subscriber, #4412) [Link]

The less that has to be explicitly configured, the better. But this is orthogonal to how a general configuration system should be. If X become 100% auto-configuring, then fine - neither an xorg.conf nor an Elektra directory is needed. Still, other software needs to store system-wide or user-specific parameters.

X needs

Posted Nov 30, 2004 23:09 UTC (Tue) by khim (subscriber, #9252) [Link]

You can run last version of X.org with empty config file if your software is not too exotic.

Elektrified X.org released

Posted Nov 30, 2004 20:35 UTC (Tue) by libra (guest, #2515) [Link]

Maybe I did read that a bit fast, but how does it handle the management of rights? Certain part of the configuration shall be accessible to users while others are for root only. Also root may want to enforce some rules that user can not overide while others are open for changing.
To my opinion the best way would be to use the specific features of ReiserFS4 to achieve that goal, and in fact keep the current system with just a custom view through a specific interface that would allow that management while being consistent with text files at the same time.
People shall not mix the frontend and the backend problem. A frontend like a registry editor can be fine, as long as we do not lose anything from the flexibility of a standard backend based on multiple, independant, files.

Rights management

Posted Nov 30, 2004 20:41 UTC (Tue) by tarvin (subscriber, #4412) [Link]

As Elektra breaks down the configuration to a lot of individual (sub)directories and files, you should be able to have very fine-grained control of permissions, using normal file system rights semantics. Hey - I didn't think of that before your message. This makes Elektra look even more attractive to me.

I don't see any need for a ReiserX file system.

Rights management

Posted Nov 30, 2004 23:14 UTC (Tue) by khim (subscriber, #9252) [Link]

If you'll think about it we are going the way of Elektra already. On my system I have /etc/apache2/conf/modules.d, /etc/conf.d, /etc/conf.d, /etc/xinetd.d and so on. This is exactly what Elektra proposing - just that every application is doing this in it's own way.

Elektrified X.org released

Posted Dec 1, 2004 0:30 UTC (Wed) by petegn (guest, #847) [Link]

i See the microsofties are trying to get a hold by the back door now they cant beat us so they are tying to polute the system with there awfull fail all the time registery type thing . not on your flippin nellie go away .

Elektrified X.org released

Posted Dec 1, 2004 1:09 UTC (Wed) by sbergman27 (subscriber, #10767) [Link]

I don't think that this attitude really helps us. Certainly, MS's registry has flaws. In particular, it seems to be a binary, non human readable, put all your eggs in one basket, "solution". Just because something bears a superficial resemblance to the MS registry does not mean that it is not a good idea.

One of my pet peeves with Linux/Unix is the total balkanization of config file formats. I would really prefer to see all these moved into XML, though. But I really don't care, as long as there is some predictability and universality to it all.

And if someone could just XMLize or Elektrify my sendmail.cf, I'd be eternally grateful. I'd even spring to send you to the mental rehabilitation center of your choice after completing the task (if required). ;-)

Elektrified X.org released

Posted Dec 1, 2004 2:03 UTC (Wed) by bk (guest, #25617) [Link]

Ha. If you're still using Sendmail then you deserve the hell that is sendmail.cf :)

As a side note, it probably would be almost trivial to write a backend that writes the config back into the application's native format (ie, goes from the nested hierarchy -> xorg.conf), making this project a simple translation layer for those who prefer a registry-like layout. That seems like a better way of doing this, as opposed to shoving a completely un-Unix configuration system down the throat of the free software community.

Elektrified X.org released

Posted Dec 1, 2004 10:44 UTC (Wed) by dh (subscriber, #153) [Link]

Hi,

I must admit that I can hardly remember the last time I read so much
rubbish as in this discussion here.

Guys, would you please bother reading and thinking precisely what Elektra
tries and how it archieves its goals before moaning and writing strange
things here? It is _not_ about XML, it is _not_ about not-vi-editable
configuration, it is _not_ about a single big file, it is _not_ about
Microsoft trying to subvert the poor penguin community. Why do you write
such absolutely unrelated things? And why do other people answer to
this???

Elektry tries to change configuration settings to be context-free by
making each line of the config file self-contained. This makes the file

- less error-prone in hand-editing and
- way better handleable for automated changes

So, generally it does _not_ take any freedom from you in editing with
whatever tool or editor you like. You are even supported in this as the
configuration semantics becomes much, much clearer. See: You can even
apply new tool chains sensibly to the config file: In the X case, if you
want to have all monitor settings, just type "cat configfile | grep
"/sys/monitors/"" or something similar. Wanna have the file sorted? "sort
configfile" does the job (ever tried this with httpd.conf or legacy
Xorg.conf?). Generally, it would ease the job of an admin tremendously if
different packages could agree on some general syntax rules for config
files, and Elektra tries to present a light-weight solution exactly for
this purpose.

Perhaps we could concentrate on these topics - and stop posting false
accusations. That project really deserves a chance IMHO.

Best regards,
Dirk
(not related to the Elektra project in any way)

Elektrified X.org released

Posted Dec 1, 2004 15:05 UTC (Wed) by hppnq (subscriber, #14462) [Link]

Generally, it would ease the job of an admin tremendously if different packages could agree on some general syntax rules for config files, and Elektra tries to present a light-weight solution exactly for this purpose.

I'm not so sure. I can see that a simple, uniform configuration syntax helps automating configuration, but to me it looks like Elektrify will make hand-editing configuration files harder rather than simpler. I am not quite sure what problem it tries to solve, and whether the chosen path will bring any joy. Things might be entirely different for you, but my main problem with configuring software is usually choosing the correct values, not understanding the configuration file syntax.

Saying: "But now you can easily sort your key value pairs!" begs the question: do I need that? I don't think so.

I would appreciate a meta-configurator that has plugins for handling native formats like fstab and httpd.conf, so no patching would be needed for the filesystem utilities and Apache.

Elektrified X.org released

Posted Dec 1, 2004 18:36 UTC (Wed) by Ross (subscriber, #4065) [Link]

If you would read the context of most of the comments you deride you would
see that they are responding to the parent comment (such as the one which
said that they would rather see you utilizing a binary database), not to the
text of the article.

One unified config format is *impossible*

Posted Dec 1, 2004 20:25 UTC (Wed) by nix (subscriber, #2304) [Link]

The `make everything a key-value pair' thing works until you hit programs that are so complex that their configuration syntax is Turing-complete.

If you can turn my XEmacs configuration (here) into something Elektra-based, I'll be impressed.

But I really, really doubt it's possible.

You can map most configuration files two-ways into this format, but not all.

One unified config format is *impossible*

Posted Dec 1, 2004 22:43 UTC (Wed) by sokol (guest, #4383) [Link]

To me, it sounds like a language abuse when you call a code
_configuration_ file. If we remain in the field
of _real_ config files which describe and declare
things rather than go down an operator chain, then
hierarchical key-value pairs do the job.

One unified config format is *impossible*

Posted Dec 2, 2004 10:24 UTC (Thu) by hppnq (subscriber, #14462) [Link]

And "real" config files are...?

One unified config format is *impossible*

Posted Dec 2, 2004 11:03 UTC (Thu) by sokol (guest, #4383) [Link]

> And "real" config files are...?
It is in the text, files that describe
and declare things, not execute some code.

One unified config format is *impossible*

Posted Dec 2, 2004 17:13 UTC (Thu) by nix (subscriber, #2304) [Link]

The point is that they blur into each other: a clear distinction in the general case between `configuration state' and `commands which affect configuration' is as impossible as a clear distinction in the general case between data and code.

That's been known for as long as general-purpose computers have existed.

Elektrified X.org released

Posted Mar 2, 2005 4:52 UTC (Wed) by aviram (guest, #24411) [Link]

Oh! There are brains around !
Finaly somebody pointed what Elektra is not !

Just to make it bold:
- Elektra is not a revolutionary lightweight new file format.
- Elektra, as an initiative, does not care about storage details.
- Elektra is not concerned about read/write transactions, just because current text configuration files aren't too.
- Elektra is not a network configuration system, just because current text configuration files aren't too. Go look for LDAP, SOAP, etc in the rare cases current Unix apps will need (or support) some.
- Elektra provides a way to vi/ed/sed/awk/OpenOffice.org/whatever keys-values only because Unix sysadmins (me included) are so addicted to this specialized practice. While average computer users (the entire human race) don't even know what "configuration" is, but they do know what are buttons, checkboxes and comboboxes.

Elektra is just what the 'dh' user above wrote. We are concerned about the problem that the concept of Elektra (but not only Elektra) can solve, more than the implementation details (which can evolve over time if the ecosystem grows -- yes, chicken and egg problem). If you don't like Elektra, we are sorry, but this was the way we found to solve the configuration superzoo issue in the most pragmactical way. Config4GNU, GConf, Hiveconf, UniConf, "etCeteraConf" currently can't do it, by design.

If you guys want to keep going deeper and deeper discussing implementation details of such a simple thing that Elektra is, fine. Just keep in mind that the general business world is way more practical than this discussion, and Linux doesn't have a real future without the interest, energy and investment of that world.

Avi Alkalay
Elektra Initiative

Elektrified X.org released

Posted Dec 2, 2004 13:06 UTC (Thu) by sokol (guest, #4383) [Link]

I like the idea of elektra. It fixes a giving "itch" which happens to be quite general in Linux world. With a little bit of luck, elektra approach will generalize (with or without filesystem backend).

Talking about backend, I have my two cents to bring. Some time ago, I asked myself what was the simpliest file format to handle hierarchical key-value paires. Just this. No read-write permissions, no validators, no multiple data types. Just an hierarchie of key-values. If someone need mentioned features, he has to extend this simpliest format at cost of reserved keys, particular syntax for references and so on. Thus a user will pay only what it really uses.

So, I came up with KVH format which uses the sipmliest parsing rules for handling key-values hierarchie I have ever seen. This format is program oriented but remains human readable and editable with plain text editor without any need of aditional APIs. APIs may come later for GUI editors and Co.

So, if you are interested, have a walk to http://serguei.sokol.free.fr/kvh-format/

Elektrified X.org released

Posted Dec 2, 2004 17:03 UTC (Thu) by kfiles (subscriber, #11628) [Link]

> So, I came up with KVH format which uses the sipmliest parsing
> rules for handling key-values hierarchie I have ever seen. This
> format is program oriented but remains human readable and editable
> with plain text editor without any need of aditional APIs. APIs may
> come later for GUI editors and Co.

Argh. This falls victim to the same problems of the old syslog.conf: visual confusion in whitespace use. A naive user, editing such a config file, might not know that the indentation by \t (tab character) was mandatory for proper parsing. Substitution of spaces for tabs in syslog.conf provided no end of headaches for sysadmins trying to track down configuration problems. Some editors (like emacs) may even unhelpfully assist in creating this problems by substituting strings of spaces for tabs.

Using arbitrary whitespace to imply parsing semantics has almost always lead to problems (c.f., syslog.conf, /etc/fstab). Unless you intend for this format to only be parsed and written by automata, please don't do this.

I much prefer the gated.conf C-style self-descriptive hierarchical config blocks, which use curly-braces for closure, and do not require the pseudo-SGML-isms of httpd.conf to indicate hierarchy.

--kirby

Elektrified X.org released

Posted Dec 2, 2004 23:09 UTC (Thu) by sokol (guest, #4383) [Link]

> Using arbitrary whitespace to imply parsing semantics
> has almost always lead to problems (c.f., syslog.conf,
> /etc/fstab). Unless you intend for this format to only
> be parsed and written by automata, please don't do this.
I must confess that I thinked to propose a more
general format where three special chars (tab, new line
and backslash) would be "customizable". Indeed, whatever
three distinct ascii-7 chars would do the job. And you
are right to point that tab is the first candidate
to be replaced for less error prone human editing.
Unfortunatly, I didn't find an elegant way to indicate
in file what are special chars:
- should we treat systematicaly first three chars as
separator declarations?
- should we have three reserved keys whose values indicate
what separators became after these keys?
- ...?
I gave up and leave special chars fixed as they are.
Any other idea?

Serguei.

Hiveconf is another alternative

Posted Dec 4, 2004 10:47 UTC (Sat) by astrand (subscriber, #4908) [Link]

As the author of the competing configuration framework Hiveconf, I see several problems with the Elektra design. This mail summarizes my thoughts. While I believe that the Hiveconf principle is very good, the implementation needs a lot of work. Those of you that feel that Elektra isn't just right, feel free to take a look at Hiveconf instead.

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds