Re: KITTEN: IETF 75 - 76

Volker Lendecke <Volker.Lendecke@SerNet.DE> Thu, 03 September 2009 22:08 UTC

Return-Path: <Volker.Lendecke@SerNet.DE>
X-Original-To: kitten@core3.amsl.com
Delivered-To: kitten@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7516128C120 for <kitten@core3.amsl.com>; Thu, 3 Sep 2009 15:08:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.215
X-Spam-Level:
X-Spam-Status: No, score=-6.215 tagged_above=-999 required=5 tests=[AWL=0.034, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y3w+DiilVLXC for <kitten@core3.amsl.com>; Thu, 3 Sep 2009 15:08:53 -0700 (PDT)
Received: from mail.SerNet.de (mail1.SerNet.de [193.175.80.2]) by core3.amsl.com (Postfix) with ESMTP id 6A78228C11F for <kitten@ietf.org>; Thu, 3 Sep 2009 15:08:52 -0700 (PDT)
Received: from intern.SerNet.DE by mail.SerNet.DE with esmtp (Exim 4.63 #1) id 1MjJhZ-0002hm-8O; Thu, 03 Sep 2009 23:18:41 +0200
Received: by intern.SerNet.DE id 1MjJhY-003ouY-EN; Thu, 03 Sep 2009 23:18:41 +0200
Received: by intern.SerNet.DE id 1MjJhY-003ou0-7X; Thu, 03 Sep 2009 23:18:40 +0200
Date: Thu, 03 Sep 2009 23:18:34 +0200
From: Volker Lendecke <Volker.Lendecke@SerNet.DE>
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Subject: Re: KITTEN: IETF 75 - 76
References: <396484EF-9812-40CE-9221-F1A1319FD10B@kth.se> <20090901181307.fe1d4efa.miallen@ioplex.com> <98F14484-1B48-45A1-86E7-5E78383F5109@kth.se> <20090901214059.17a309e6.miallen@ioplex.com> <4A9E22D9.9050405@samba.org> <20090902153241.GJ1033@Sun.COM> <24246_1251926735_n82LPYA9008569_20090902172015.da056c19.miallen@ioplex.com> <A24265FEB13A8A10136EC243@minbar.fac.cs.cmu.edu> <21582_1252004057_n83IsGex029266_20090903111749.267187da.miallen@ioplex.com> <A34D9682FFEFE2F5018D14F4@atlantis.pc.cs.cmu.edu>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs"
Content-Disposition: inline
In-Reply-To: <A34D9682FFEFE2F5018D14F4@atlantis.pc.cs.cmu.edu>
User-Agent: Mutt/1.5.18 (2008-05-17)
Message-Id: <E1MjJhY-003ouY-EN@intern.SerNet.DE>
Organization: SerNet GmbH, Goettingen, Germany
X-Mailman-Approved-At: Thu, 03 Sep 2009 21:46:02 -0700
Cc: kitten@ietf.org, Love@core3.amsl.com, Volker Lendecke <vl@SerNet.DE>, Nicolas Williams <Nicolas.Williams@sun.com>
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Volker.Lendecke@SerNet.DE
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Sep 2009 22:08:54 -0000

On Thu, Sep 03, 2009 at 04:55:54PM -0400, Jeffrey Hutzelman wrote:

> A proper event loop blocks until there is an event (_any_ event), then 
> does some work.  Polling is not an event loop.  Polling wastes cycles and 
> can result in serious increases in power use besides.  Not to mention all 
> of the points Nico has made with respect to the complexities of an API 
> trying to impose an event model on an application with several 
> intermediate libraries in between.

That's why I pointed at the avahi libs. Samba internally has
its own version of an event loop, and it would be outright
impossible to adapt that to an event loop from an external
lib. Adapting to those avahi libs was really easy for me,
given that I have done quite a bit of async programming
inside Samba before. There are other samples out there, but
many of those (I've looked at some async DNS libs) assume
select(2) as the blocking call. This won't work in modern
systems anymore that use epoll other more efficient
mechanisms.

I'm not saying that avahi is the last word in this, but it
worked pretty well for me.

Internally the libs would use the async calls only, the sync
wrappers would then provide a stub event loop around the
async calls. That's at least what we do in the native Samba
async code.

Volker