From owner-freebsd-net@FreeBSD.ORG Wed Sep 24 20:38:12 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00260106568E for ; Wed, 24 Sep 2008 20:38:11 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outR.internet-mail-service.net (outr.internet-mail-service.net [216.240.47.241]) by mx1.freebsd.org (Postfix) with ESMTP id D68A38FC17 for ; Wed, 24 Sep 2008 20:38:11 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id B71FF247D; Wed, 24 Sep 2008 13:38:59 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 2C0F52D6006; Wed, 24 Sep 2008 13:38:11 -0700 (PDT) Message-ID: <48DAA533.3080607@elischer.org> Date: Wed, 24 Sep 2008 13:38:11 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <48DA5204.3030803@FreeBSD.org> <48DAA4BB.7080907@elischer.org> In-Reply-To: <48DAA4BB.7080907@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Mungyung Ryu Subject: Re: ACE on FreeBSD? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2008 20:38:12 -0000 Julian Elischer wrote: > 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. sorry I meant for sockets and raw devices.. (what we use them for) sockets don't need AIO to work well with kevent but raw devices do. Luckily it works as advertised. > >> >> 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@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"