Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2008 15:43:16 +0100
From:      "Bruce M. Simpson" <bms@FreeBSD.org>
To:        Mungyung Ryu <rumuru@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: ACE on FreeBSD?
Message-ID:  <48DA5204.3030803@FreeBSD.org>
In-Reply-To: <e465331f0809231512s444afacdk597878ac0692260c@mail.gmail.com>
References:  <e465331f0809231512s444afacdk597878ac0692260c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48DA5204.3030803>