ACE on FreeBSD?

Bruce M. Simpson bms at FreeBSD.org
Wed Sep 24 14:43:20 UTC 2008


Hi,

I looked at ACE years and years ago (~1997) when Doug Schmidt was first 
promoting the ideas behind it. The whole Reactor/Proactor split pretty 
much hangs on the event dispatch which your particular OS supports.

The key observation is whether your target OS implements events in an 
edge-triggered or level-triggered way; I am borrowing definitions from 
electronic engineering here.

You could do a straight port with Proactor, but performance will 
probably suck, because both FreeBSD (and Linux, I believe) need to 
emulate POSIX asynchronous I/O operations.

Reactor will generally "fare better" on UNIX derived systems such as 
FreeBSD and Linux, because its event handling primitives are geared 
towards the level-triggered facilities provided by select().

In Windows, Winsock events use asynchronous notifications which may be 
tied to Win32 EVENT objects, and the usual Kernel32.DLL thread 
primitives are used around this. This makes Proactor more appropriate in 
that environment.

XORP does some similar stuff to ACE under the hood to support the native 
socket facilities of both Windows and FreeBSD/Linux. It's hybridized but 
it behaves more like Reactor because we run in a single thread, and you 
have to force Winsock's helper thread to run, by preempting you, using 
some file handle and socket tricks.

I don't currently know about stability of ACE on FreeBSD.

cheers
BMS


More information about the freebsd-net mailing list