SourceForge Logo

Welcome to the Event Library home page. This is a place-holder until I or someone else can come up with a better page. This page is also intended to give you an idea of the history and goals of this project.


History:

This project grew out of IRC server development for the Undernet. The Undernet is an IRC network with 30-someodd servers and a peak user count of around 98,000 users. This means that each server carries an enormous number of clients, and each client takes up a TCP connection. In the early IRC servers, this was handled by means of a loop built around the select(2) system call. At some point during the development of Undernet's IRC server, it was pointed out that the poll(2) call is more efficient on some systems, so a second loop, based on that system call, was written.

Neither the select(2) nor the poll(2) call is all that efficient, however. Other people, whose primary focus was on web servers, started to consider the problems that crop up due to using that many sockets, and more efficient alternatives were developed, as documented at http://www.kegel.com/c10k.html. During the development of the Undernet ircu2.10.11 server release, the core network loop was replaced by a version that could make use of two of these alternatives: FreeBSD's kernel queues and Solaris's /dev/poll. This new version of Undernet's core network loop was based on an event-driven model: When sockets become readable, an event structure is created and an event handler is called. Because detection of signals and timed events were also traditionally handled in the select loop, these also became entangled with the event system.


Goals:

The purpose of this project is to take this event system implemented for Undernet's IRC server and create a library that may be used by anyone. This library is to be sufficiently general to permit operation with any network event detection system, including systems based on realtime signals. The library must provide conversion of signals and timers to events, as well as detecting events on sockets and possibly pipes. In addition, some programs may need to use threading, and the event model certainly lends itself to efficient processing by a work group of threads, so the resulting library is to use this technique as an option--though threading must not be required for use of the library. This lends added complexity to the structure of the library, but should be well worth the effort. Note, however, that the first release of the library likely will not include threading.

This project was originally conceived by Kevin L. Mitchell, and much of the basic architecture has already been developed. Also on this web site are documents regarding the coding style to be adhered to and the basic architecture of the library.