Re: KITTEN: IETF 75 - 76

Nicolas Williams <Nicolas.Williams@sun.com> Thu, 03 September 2009 15:48 UTC

Return-Path: <Nicolas.Williams@sun.com>
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 D55CF3A6BFB for <kitten@core3.amsl.com>; Thu, 3 Sep 2009 08:48:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.852
X-Spam-Level:
X-Spam-Status: No, score=-5.852 tagged_above=-999 required=5 tests=[AWL=0.194, BAYES_00=-2.599, HELO_MISMATCH_COM=0.553, 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 ip2Rxjj50Lv5 for <kitten@core3.amsl.com>; Thu, 3 Sep 2009 08:48:41 -0700 (PDT)
Received: from brmea-mail-2.sun.com (brmea-mail-2.Sun.COM [192.18.98.43]) by core3.amsl.com (Postfix) with ESMTP id ACECE3A696B for <kitten@ietf.org>; Thu, 3 Sep 2009 08:48:40 -0700 (PDT)
Received: from dm-central-01.central.sun.com ([129.147.62.4]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n83FbZDc012784 for <kitten@ietf.org>; Thu, 3 Sep 2009 15:37:35 GMT
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104]) by dm-central-01.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL, v2.2) with ESMTP id n83FbYNM042005 for <kitten@ietf.org>; Thu, 3 Sep 2009 09:37:34 -0600 (MDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1]) by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id n83FQebU009844; Thu, 3 Sep 2009 10:26:40 -0500 (CDT)
Received: (from nw141292@localhost) by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id n83FQcuN009843; Thu, 3 Sep 2009 10:26:38 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Thu, 03 Sep 2009 10:26:38 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Michael B Allen <miallen@ioplex.com>
Subject: Re: KITTEN: IETF 75 - 76
Message-ID: <20090903152638.GH1033@Sun.COM>
References: <20090901173110.GL1033@Sun.COM> <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> <20090902172015.da056c19.miallen@ioplex.com> <20090902212652.GX1033@Sun.COM> <20090902211200.8a2dd378.miallen@ioplex.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20090902211200.8a2dd378.miallen@ioplex.com>
User-Agent: Mutt/1.5.7i
Cc: "kitten@ietf.org" <kitten@ietf.org>, Volker Lendecke <vl@SerNet.DE>
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
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 15:48:42 -0000

On Wed, Sep 02, 2009 at 09:12:00PM -0400, Michael B Allen wrote:
> On Wed, 2 Sep 2009 16:26:52 -0500
> Nicolas Williams <Nicolas.Williams@sun.com> wrote:
> > The problem with this model is that it has the GSS-API impose its own
> > event loop on the application.  Imagine if every library did that!  An
> > application that uses multiple such libraries, where some such libraries
> > use other such libraries, would be very difficult to get to work at all,
> > particularly without threading or sub-processes.
> > 
> > I don't understand your aversion to callbacks.  Callbacks are
> > exceedingly common in C APIs nowadays, and that's a good thing, IMO.
> 
> I think you're exaggerating, if not misrepresenting, the detractions
> of the NOWAIT flag technique. But it is no matter. For a variety of
> reasons I will not pursue the issue further.

I have worked on applications that use over half a dozen layered
components, at least two of which need to do blocking I/O operations,
plus the application itself being async I/O event driven.

Putting together such an application with your async I/O model would
result in an enormous amount of complication.

I'd much rather have the library give me either file descriptors to
select on, or a callback.

> However, before I go back to lurking, I have to declare that callbacks
> are NOT simple. They can be quite complicated. Just from looking at
> function signatures posted in this thread I personally have no idea
> how these callbacks would actually work. Are they called by another
> thread, by a signal, through another call or by another caller? Is
> locking required? What data is safe to modify in the callback? They
> seem C oriented - do the semantics change if a different language is
> used like Java? Hopefully the answers to these questions will be clear
> if these callbacks do end up in a GSSAPI implementations.

Callbacks are simple (and the ones I proposed certainly are).  One
should specify the calling context, as you point out.  To be most
portable we should say that callback functions must be async-signal-
safe, which means that callback functions should limit themselves to:
signalling condition variables, writing to a pipe, or otherwise posting
an event to another event loop.

Nico
--