rsyslog
May 17, 2008 - 10:32 AM

Donate!
Satisfied with rsyslog?

Donate and help keep
the project alive!

Rainer's Blog

Login




 


 Log in Problems?
 New User? Sign Up!

Online
There are 17 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Announcements
Announcements  :: Honey, I shrunk the syslogd... ::
(583 Reads)  
Posted by rgerhards on Friday, July 27, 2007 - 03:08 AM

Have you noticed it? Syslogd.c is shrinking these days...

Ever since I started to work on this project, syslogd.c kept growing. Rsyslog was forked from sysklogd quite a while ago. I inherited working code, that enabled me to build an enhanced syslogd step by step. However, what I also inherited was a monolithic design. In the early days, that was not really an issue. Sysklogd's syslogd is roughly 2000 lines of code and lots of it is the version history in comments.
As I built on that basis, more and more features were added. Some of these features required supporting functions. Some of them were implemented in separate source files. The majority of the code, though, went straight into syslogd.c. A major reason for this was that moving the code to some more decent place would have required re-working of the code. And, hey, who would do that when you can otherwise implement the next cool and ever-requested feature. So this went on and on and syslogd.c kept growing. What I managed to do, at least, was to build blocks, delimited by comments, inside syslogd.c. That should later turn out to be a life-saver. But while the code for different modules was somewhat clean to identify, it used global data structures all the way long. Anyhow, all worked well...

In July of 2007, we finally hit the mark of over 10,000 lines of code for syslogd.c - and this even after some of the defines were already moved out of the main code file. Of course, many of these lines are comments (I am proud that rsyslog is probably one of the best-commented open source packages out). And of course 10,000 lines is not much - but after all, it is still a small project, and for that a single file of that size is scary.

That alone would not have me convinced to give up my lazyness. However, new feature request came in. A plug-in interface would be nice. And, while we are at it, how about queued message delivery in case the recipient is not available? And what about an even enhanced multi-threading that will support tomorrow's highly parallel many-many core CPUs? There are good answers to all of these questions. It's even fun to do. But not with the original monolithic design. No, that's a no-go. Can't do. Ummm.., OK, will not do ;)

...sorry folks - I run out of time right now. Will be continued...

Send this story to someone  Printer-friendly page
Only logged in users are allowed to comment. register/log in
 Search
 
Google

 Last Forum Posts
 · Re: Transport With Stunnel-need your hel ...
Sorry, I overlooked the message. This looks like a duplicate port ...
· Re: if ... then ... else
I've re-read the whole thread. I think I now got it. Else is just ...
· Re: if ... then ... else
sandiso wrote:So I have many boxes and from few of those boxes I ...
· Re: if ... then ... else
You got me confused. I think my config is right but I`ll explain ...
· Re: if ... then ... else
Thanks for the files (received via mail). The problem was always ...

 Top Contributors
 
Contributor Contribs
varmojfekoj 7
Michael Biebl 2
Michel Biebl 1
Peter Vrabec 1


 Past Articles

:: Syndication: ::
Page created in 0.265824079514 seconds.