ACE on FreeBSD?

Julian Elischer julian at elischer.org
Wed Sep 24 20:36:11 UTC 2008


Bruce M. Simpson wrote:
> 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().

A true FreeBSD port would use kevent with AIO.
At Cisco/ironport we use AIO with the build in kevent trigering to
great effect. Certainly for sockets it works VERY well.

> 
> 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
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"



More information about the freebsd-net mailing list