FSDN: FSM Userlocal Advogato Sorce Mage GNU/Linux
[GNU-Friends] Sections: Front Page News Interviews GNU-Friends Diaries
Menu: About Submit Story FAQ Donate Search
This page brought to you by: Xinit Systems, selling server and storage systems.
Why I'm hacking dmd
By wolfgangj, Section Diaries
Posted on Sun Jun 8th, 2003 at 13:30:23 GMT
The Free Software project I am working on is dmd (I just release version -0.5). The dmd program is a ``Daemon managing Daemons'' (or maybe a ``Daemons-managing Daemon''?). In other words, it is a service manager, and it is entirely written in Guile Scheme, the extension language of the GNU project. It provides a replacement for the service-managing capabillities of System V Init (or any other init) with a both powerfull and beautiful dependency-based system including a convenient interface.


Let me explain why working on dmd makes sense, why it is an important project and why you should be interested (at least a sunflower-seed-sized bit). I would like to introduce you to this topic with a quote from the GNU Coding Standards:

``When a feature [...] is done poorly in Unix, feel free to replace it completely with something totally different and better. (For example, `vi' is replaced with Emacs.)''

That is what I also do with dmd. I replace System V Init (which is indeed comparable with vi in some sense) with something completely different and better. [As a sidenote: Yes, dmd does not replace all of System V Init, but the remaining part can be replaced without to much work and actually is already replaced on the GNU system.] I don't want to say that people developing a Free Software implementation of System V Init are doing a bad job. It may be important to provide that as well, like the GNU Coding Standards suggest:

``But it is nice to offer a compatible feature as well. (There is a free `vi' clone, so we offer it.)''

However, System V Init sucks. Everybody knows it. There are several project out there to replace it. Maybe more than there are projects which try to replace X11, and having more haters among programmers than X11 is a priviledge not many programs enjoy. The System V Init mechanism has various defects, both conceptually and from the users perspective, and it seems necessary to replace it with something more seasonable.

However, isn't it unrealistic to replace a package that widespread? Of course it is unrealistic to replace it everywhere. I do not expect Red Hat to adopt dmd (at least not within the next few years). But that does not mean that we cannot use something better in the GNU system. I hope that the ``something better'' in this case actually will end up being dmd. Additionally, dmd might eventually have a couple of happy users even on GNU/Linux or other operating systems. I think that the latter might happen if I get dmd to a point where one can easiely create packages for a GNU/Linux distribution that take advantage of the features of dmd, but will also work with System V Init. That should not be too hard, but is rather low on my priority list.

Ok, at this point it should be clear why I think dmd can, in a sense, be successful eventually. Now let us look at the second question, why is this project important?

I can think of two major reasons. The first one is obvious and was already mentioned: We do not only want GNU to be free (though this is the most important aspect), but also to be good, which is why we need something better than we have today, and that does not only mean better than System V Init, but actually better than all its current alternatives as well. Some might be good, but a key component of the GNU system should be more than merely ``good''. This brings us to the second point: The service manager is a key component, since basically every installation of GNU will have it (assuming we will use dmd in GNU). Now remember that dmd is written in Guile Scheme, and while it has some support for external scripts written in any language, the best thing is to write all service-specific code in Guile Scheme. If dmd will be a mandatory piece on GNU, this will automatically promote the use of Guile.

Why do I find this so important? Well, Scheme is a programming language that does not cramp the mind of its users in any way, which makes it a very feasable language for doing creative, unusual things. The possibility of interactive development with an interpreter is also a productivity-boosting feature. Having a language like this well integrated and widely-used is an absolute requirement for an operating system that a hacker can love. I think it is for this reason that the GNU manifesto mentions that LISP will be a system programming language in addition to C. Guile Scheme, as a dialect of LISP, can and should become the system scripting language (a term invented by me, as far as I know) of the GNU OS.

The last of the questions I promised to answer intially is why you should be interested. To be honest, I don't know, since the only thing I know about you is that you are reading this text. But I can mention a few possibilities of why one might be interested: Maybe you have been waiting for a good service manager for a long time? Maybe you like (or love) the Scheme programming language, or LISP in general? Maybe you are in search for something really cool to hack (though I currently would suggest that you hack the GNU Hurd or Guile instead)? Maybe you even know me and like to see what I'm doing? If none of these applies, sorry for wasting your time. ;-)

< Free Software Trophies awards go to... (1 comments) | GNU/FreeBSD progress (1 comments) >
Make a new account

View: Display: Sort:
Why I'm hacking dmd | 3 comments (3 topical, editorial) | Post A Comment
[new] MCP (#1)
by jonas (#2) on Tue Jun 10th, 2003 at 19:52:21 GMT
(User Info)

Reading about dmd made me remember a project I used to work on, entirely for my own benefit. You're probably aware of the fact that a very good way to learn some new feature of a system is to cleverly disguise the actual learning with a new software project that has to use said feature.

The feature I was interested in at the time was dynamic loading. This was more years ago than I can remember, but I got the idea that I would write a replacement for init! It would have sexy things like dynamic loading of applications, priority-based handling and other things.

I took some time just now to revisit that code and it was pretty neat to look through it. Lots of details that I didn't remember, but that I can now put in context. For example, I devised a system where the modules could send messages to one another, and where you could call functions in other modules. Sounds familiar? No wonder I was so interested in CORBA later on.

Of course, the project is largely useless. It was written for me to learn a specific feature, and the implementation shows that quite clearly (the main executable has 20 lines of source code, including comments, which dynamically loads a loader library and executes a function in that library). And I never wrote anything but a finger module, and a simple HTTP/1.1 module.

I wonder how many software projects start out this way, and actually make it to a finished project. Good luck with your project, and thank you for a trip down memory lane! :-)

[ Reply to This ]

[new] trash the nasty packaged inits! (#2)
by S11 or sirian (#439) () on Tue Aug 5th, 2003 at 08:36:00 GMT
(User Info) http://csserver.evansville.edu/~sc87/

From the standpoint of a multi-distribution packager (as I sometimes am), bravo! Each of the distributions now seems to have its own hacked together (in the bad way) init manager.

Do you have a page for this yet? I am doing something similar, but for user Internet services rather than system services, and would love to grep for ideas.

DotGNU || Free Software in Education group
[ Reply to This ]

Why I'm hacking dmd | 3 comments (3 topical, editorial) | Post A Comment
View: Display: Sort:

Verbatim copying and distribution of this article is permitted in any medium, provided this notice is preserved. Images of gnu:s in the logo are © Free Software Foundation, Inc and distributed under the GNU General Public License. Comments are copyright by thir respective owner. All other material are © 2002 .