* Claudio Jeker <cje...@diehard.n-r-g.com> [2014-05-05 10:50]: > On Sun, May 04, 2014 at 10:39:33PM +0200, Vincent Gross wrote: > > I am considering to write a daemon of some kind, and I was going over > > OpenBGPd's sources to get some good fine-grained design examples. I > > noticed that although all IO's are asynchronous, libevent is not used, > > but I can't figure out why.
I'm not a libevent-fan. So I didn't use it. For bgpd, libevent+kqueue vs poll plain doesn't matter, the number of sockets is too low. > > So, is libevent not used by accident or by design ? in the latter case, > > what is precisely the feature/design consideration that made it > > unsuitable ? > Don't use bgpd as an example. It was one of the first privsep daemon we > did and at that time it was done without libevent. ospfd and all the later > daemons use libevent. Their event loop is therefor a lot simpler. > So yeah not using libevent in bgpd could be considered an accident. not an accident. however, when I wrote the initial bgpd bits, I didn't think there would be so many daemons using its framework 10 years later. so things changed, and there's no problem with that. wether you use libevent or not is a matter of taste imho unless we're potentially dealing with a very large number of sockets, in which case kqueue has advantages over poll. -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/