– Kamailio SIP Server –

Evaluation of event frameworks

Motivation

The actual architecture of OpenSER has some limitations with regards to (network) IO. Processes blocks when DNS lookups can't be done, no data can be send over an existing TCP connection or the database has gone away. OpenSER have also created an own framework to handle problems like this, but its not fully functional as our core competence is creating a SIP server.

Requirements

  • work good with the actual architecture (multi-process)
  • available in Debian and other distributions
  • same level of support for polling methods as actually available
  • GPL compatible licence
  • healthy user community, regular releases
  • good documentation
  • good performance
  • used from well-known applications
  • cross-plattform (at least Linux, Unix)

Candidates

libevent

  • available in debian, SUSE, but the version in debian stable is rather old. Debian testing has version 1.3e, which is usable
  • support dev/poll, kqueue(2), select(2), poll(2) and epoll(4). It also has experimental support for real-time signals.
  • BSD without advertising clause
  • plenty of communication on user list, already three minor releases in 2008
  • doxygen documentation available, but not that extensive, example applications available
  • performance benchmarks available, even if there are some forks that claim a somewhat better performance
  • used from 20 applications, for example Tor, MySQL (in 6.0)
  • should compile on Linux, *BSD, Mac OS X, Solaris and Windows
  • also support asynchronous DNS with an own resolver
  • support the usage of custom logging functions

libev

  • not available in debian stable, only in unstable
  • can support the same interfaces as libevent with an compatibility layer
  • BSD without advertising clause with additional GPLv2 or later licence
  • not that much traffic on the list, but ok, repository shows recent development activities
  • good documentation available
  • claims to have better performance then libevent, but the difference is not that big
  • used from a few not so well known applications
  • should be also fairly portable

libowfat

  • reimplementation of libdjb
  • available in debian stable
  • GPL licence
  • a few releases in the last year, but more a one man effort
  • documentation available, sometimes its necessary to look at the original implementation
  • author has a focus in minimizing bloat, performance
  • used from a few not so well know applications, perhaps mutt will migrate in the future
  • should be fairly portable
  • includes also other stuff, like data structures, buffered IO, DNS resolver

liboop

  • LGPL licence
  • no recent releases, homepage is out of date

libace

  • for C++
  • rather heavy weight
  • should be available

libasio

  • for C++, will be included in boost
  • good documentation
  • should be available