Subject: a simple linux registry

From: Tzafrir Cohen <[email-masked]>
Date: Sun, 11 Apr 2004 19:29:57 +0300

I saw an interesting project lately: a Perfect Configuration System
[tm], but designed with simplicity in mind: Each key resides in its own
text file, and the registry sits in its own tree structure.

  http://registry.sourceforge.net/

The only  disatvantages I can think of is the disk space consumption.
I wonder How much can ReiserFS help here? XFS?

But the atvantages are obvious: everything remains a file:

* can use whaever permission scheme is used on the system
* moving a subtree is an atomic operation.
* I wonder if symlinks are sensible
* Can be easily manipulated with the tools we all know

Comments? Flames? Will you use it in your own project?

-- 
Tzafrir Cohen                       +---------------------------+
http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
mailto:[email-masked]       +---------------------------+

---

From: Muli Ben-Yehuda <[email-masked]>
Date: Mon, 12 Apr 2004 00:21:36 +0300

> The only  disatvantages I can think of is the disk space

Shouldn't be significant for the average number of items in a
configuration. I wonder how many items a typical windows registry has?

> * Can be easily manipulated with the tools we all know

Everytthing is its own file sounds a lot like the sysfs design in
kernel 2.6, which is a Good Thing. 

> Comments? Flames? Will you use it in your own project?

Not likely (my code tends to have simple configuration needs), but
sounds like it's the right way to do it.  

Cheers, 
Muli 
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

---

From: Shlomi Fish <[email-masked]>
Date: Mon, 12 Apr 2004 05:14:45 +0300

> Comments? Flames? Will you use it in your own project?

Well, personally, I don't find it too user friendly. Most users (including me) 
would prefer if all the relevant information was present in a small number of 
files that can be managed using several editor instances. (preferablly even 
just one that is relevant to the problem at hand). Tweaking of fixing a 
registry like that by hand sounds like a real nightmare.

Usually, I prefer INI-formatted or a similar simple minded configuration file. 
Some INI-files implementations (like Perl's Config::IniFiles), support 
nesting INI sections, to produce a Windows registry like effect. (while still 
keeping the accessibility of text files).

XML for configuration is probably not such a good idea if you want it to be 
editable by hand. YAML seems like a better choice in this regard, but I don't 
speak from experience on this. Of course, YAML is not as expressive as XML 
is.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      [email-masked]
Homepage:        http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]

---

From: Elad Efrat <[email-masked]>
Date: Mon, 26 Apr 2004 14:00:37 +0300 (IDT)

>   http://registry.sourceforge.net/
[...]

i think it's gay ugly stupid pointless messy huge and a waste of time

---

From: Muli Ben-Yehuda <[email-masked]>
Date: Mon, 26 Apr 2004 14:12:14 +0300

> i think it's gay ugly stupid pointless messy huge and a waste of
time

Oh, come on, don't be shy - tell us what you really think about it!

Cheers, 
Muli

---

From: Tzafrir Cohen <[email-masked]>
Date: Thu, 29 Apr 2004 00:24:44 +0300

> >   http://registry.sourceforge.net/

BTW: that page is not currently availbe for some reason. Try
http://sf.net/projects/registry

> i think it's gay ugly stupid pointless messy huge and a waste of time

Ugly, stupid, pointless: maybe.

Huge: sure it isn't. Look at the size of the code of the library. Comare
to gnome's gconf .

Oh and: Why do you choose to waste your breath and time on it?

Cheers.

---

From: Beni Cherniavsky <[email-masked]>
Date: Fri, 30 Apr 2004 16:21:13 +0300 (IDT)

> I wonder How much can ReiserFS help here? XFS?
If it becomes a problem, ReiserFS is definitely a solution.  Enabling
this sort of things is the purpose that initially motivated ReiserFS.

> Comments? Flames? Will you use it in your own project?
I find the key format to be suboptimal.

- What's that about 20..39 for binary formats and 40..254 for text
   formats?  Why?!?  Why not use something extensible, like names?
   Why not use something established, like MIME types?

- I don't think a standard header would do anybody good.  Without a
   header, existing file types could be used with full support from
   existing tools (think images - how many image viewers skip everything
   until ``<DATA>``?).

   - Without a header, we don't need the `rg` command.  `ls`, `cat`,
     etc., SHOULD be directly useful on the "registry", otherwise you
     lose half the benefits.

   Let's see what it takes to get rid of the header:

   - Format version - not relevant if there is no registry format.

   - Data type & comments - if you need these at all, it makes more
     sense to use a gconf-like model where the expected type and
     key meaning documentation are stored separately as a "scheme".
     That way a user overwriting the key won't lose the documentation.
     That's good.

     - If you do need the metadata per-instance of the key, the ideal
       option would be to use subfiles of the file, as will be possible
       in reiserfs4 (any file also behaves as a directory).  Otherwise,
       less beautiful arrangements are possible...

   That's it - no headers!  No headers => no need for a special tool and
   to a great extent even no need for a library!

-- 
Beni Cherniavsky <[email-masked]>
Note: I can only read email on week-ends...