Re: [Taps] On Profiles for TAPS Preconnections

Tommy Pauly <tpauly@apple.com> Tue, 23 July 2019 14:47 UTC

Return-Path: <tpauly@apple.com>
X-Original-To: taps@ietfa.amsl.com
Delivered-To: taps@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CA4441202F3 for <taps@ietfa.amsl.com>; Tue, 23 Jul 2019 07:47:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YnyV9dju03fl for <taps@ietfa.amsl.com>; Tue, 23 Jul 2019 07:47:14 -0700 (PDT)
Received: from nwk-aaemail-lapp02.apple.com (nwk-aaemail-lapp02.apple.com [17.151.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3584C1202D4 for <taps@ietf.org>; Tue, 23 Jul 2019 07:47:05 -0700 (PDT)
Received: from pps.filterd (nwk-aaemail-lapp02.apple.com [127.0.0.1]) by nwk-aaemail-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x6NEgIvY009497; Tue, 23 Jul 2019 07:47:03 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : content-type : mime-version : subject : from : in-reply-to : date : cc : message-id : references : to; s=20180706; bh=57TNF+/1QXwzArxZPkboCU75pNiaGIcmdsErHbQZvYY=; b=YRcsabhh8633TRV6hAuc/BfJNclrdwg2jf0q821hdFp0qzNhCzQw/yzYyT29t600qwsl k/rWxT3cZllaa4QrdeSBFtFJn0CkdW5350+SxIIg60tjoB3W4eemS6DSQkbJoAiX1RHX K6QIrrKNevNxy74sSY1pkCv/HaPEvUe5PFr5usvw5NAd9DJNV2LJNRRM4GIpdCbb+owC C/uBfa5IdUeGAValAxpFXZpz02MSzYBHLQYWghUg3mqGWmDk46gRXo0yKIzdBz2o1le4 9bUDcu+tT1VcROvSmWYP9qIAr6B0oAGiPAtnZ2DLiZIl/hiaKCo4uOBudQaQxXKXSRH6 Zg==
Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) by nwk-aaemail-lapp02.apple.com with ESMTP id 2tuyhn3rm1-12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 23 Jul 2019 07:47:03 -0700
Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPS id <0PV3001QFNQDAH60@ma1-mtap-s03.corp.apple.com>; Tue, 23 Jul 2019 07:47:02 -0700 (PDT)
Received: from process_milters-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0PV300C00N6YCI00@nwk-mmpp-sz10.apple.com>; Tue, 23 Jul 2019 07:47:01 -0700 (PDT)
X-Va-A:
X-Va-T-CD: 2b784dc161e0635db4a0c2407b1814f4
X-Va-E-CD: 6b84095c203fe2a1a8945a03453fd93c
X-Va-R-CD: 6aae7abbe171cacdfada0471f498e066
X-Va-CD: 0
X-Va-ID: 20ae2876-92b5-4f17-ab86-17700d8058ef
X-V-A:
X-V-T-CD: 2b784dc161e0635db4a0c2407b1814f4
X-V-E-CD: 6b84095c203fe2a1a8945a03453fd93c
X-V-R-CD: 6aae7abbe171cacdfada0471f498e066
X-V-CD: 0
X-V-ID: 439b3bd2-1264-4af4-af4c-0b152d161804
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-23_06:,, signatures=0
Received: from [17.235.51.16] by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0PV300IITNQA6X70@nwk-mmpp-sz10.apple.com>; Tue, 23 Jul 2019 07:47:01 -0700 (PDT)
Sender: tpauly@apple.com
Content-type: multipart/alternative; boundary="Apple-Mail=_8CFE614B-0C07-401E-A733-BEDC18AA0138"
MIME-version: 1.0 (Mac OS X Mail 12.4 \(3445.104.2\))
From: Tommy Pauly <tpauly@apple.com>
X-Priority: 3
In-reply-to: <06E302AD-081B-4B5B-8565-BF3DECCE3B13@tiesel.net>
Date: Tue, 23 Jul 2019 10:46:54 -0400
Cc: Maximilian Franke <mfranke@inet.tu-berlin.de>, Tommy Pauly <tpauly=40apple.com@dmarc.ietf.org>, taps WG <taps@ietf.org>
Message-id: <5BC70DCC-9E80-4526-92D9-90609DD29F37@apple.com>
References: <a11d917f-3b40-4614-94b1-6e7d56892159@email.android.com> <857A1326-9DA7-4BE9-A8C3-B12474ABEF76@apple.com> <06E302AD-081B-4B5B-8565-BF3DECCE3B13@tiesel.net>
To: "Philipp S. Tiesel" <philipp@tiesel.net>
X-Mailer: Apple Mail (2.3445.104.2)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-23_06:, , signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/taps/kzbLoqxJAFWmqegv78G2tlz_FLs>
Subject: Re: [Taps] On Profiles for TAPS Preconnections
X-BeenThere: taps@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IETF Transport Services \(TAPS\) Working Group" <taps.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/taps>, <mailto:taps-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/taps/>
List-Post: <mailto:taps@ietf.org>
List-Help: <mailto:taps-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/taps>, <mailto:taps-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Jul 2019 14:47:18 -0000

TransportProperties.WithProfile(profile) *is* a constructor, I believe? (Or at least that's what I interpret and suggest). Calling it multiple times creates two different sets of properties. It's just a convenience way, but not the only way.

Thanks,
Tommy

> On Jul 23, 2019, at 10:35 AM, Philipp S. Tiesel <philipp@tiesel.net> wrote:
> 
> 
> 
>> On 23. Jul 2019, at 09:40, Tommy Pauly <tpauly@apple.com <mailto:tpauly@apple.com>> wrote:
>> 
>> Yes, I would be happier with suggesting something like TransportProperties.WithProfile(profile), rather than replacing the primary constructor.
> 
> This has several drawbacks and makes things more complicated:
>  - We need to define what should happen when TransportProperties.WithProfile(profile) is called multiple times
>  - We need to define whether TransportProperties.WithProfile(profile) should override properties that have been set using TransportProperties.add(property, value)
>  - Implementations could choose to do this differently.
> 
> Having the profile only in the constructors avoids these, as the behaviour is 100% clear - the profile sets the defaults, everything can be overridden afterwards. Also it makes clear that one can only specify a single profile.
> 
>> To the point of trimming down the API, I do think that it may be good to only choose one between options like this:
>> 
>> * properties.prefer(property)
>> * properties.add(property, prefer)
>> 
>> The API prescribed by this document is abstract, and needs to give freedom to implementations to make things elegant in their particular languages.
>> 
>> What about having an appending, that's non-normative and not required for RFC compliance, that describes suggested conveniences, such as "properties.prefer()" and the concept of convenience profiles?
>> 
>> The point is, if you wanted to have the minimal implementation of a TAPS implementation that made it possible to let applications do what they need over TAPS, you wouldn't necessarily need to implement these conveniences, since they don't add any new capabilities, but instead are semantic sugar.
>> 
>> Thanks,
>> Tommy
>> 
>>> On Jul 23, 2019, at 9:34 AM, Max Franke <mfranke@inet.tu-berlin.de <mailto:mfranke@inet.tu-berlin.de>> wrote:
>>> 
>>> I wonder if this argument is more because at the moment profiles are handed over as a parameter on creation of the properties and not about the existance of properties in general. 
>>> Maybe another solution would be a call along the lines of TransportProperties.WithProfile(profile) , similar to what we already have with WithService on the endpoints?
>>> As Philipp said, there are already convenience features in other places of the API which should be removed if we agree on keeping the complexity to the bare minimum for the core interface. 
>>> 
>>> Best regards,
>>> Max
>>> 
>>> Am 22.07.2019 19:15 schrieb Tommy Pauly <tpauly=40apple.com@dmarc.ietf.org <mailto:tpauly=40apple.com@dmarc.ietf.org>>:
>>> 
>>> > On Jul 22, 2019, at 6:56 PM, Philipp S. Tiesel <philipp@tiesel.net <mailto:philipp@tiesel.net>> wrote:
>>> > 
>>> > Hi,
>>> > 
>>> >> On 22. Jul 2019, at 15:09, Tommy Pauly <tpauly=40apple.com@dmarc.ietf.org <mailto:tpauly=40apple.com@dmarc.ietf.org>> wrote:
>>> >> 
>>> >> An issue we discussed today in the TAPS meeting was whether or not we should add a concept of "profiles" to the Transport Services APIs. An example of a profile is a "reliable, secure, in-order stream"; or "unreliable datagrams". Another way to think of these profiles are as convenient ways to initialize common parameters.
>>> >> 
>>> >> One option is described in this PR: https://github.com/ietf-tapswg/api-drafts/pull/328 <https://github.com/ietf-tapswg/api-drafts/pull/328>
>>> >> 
>>> >> To help discern the working group's position, I'll try to distill the high-level options here:
>>> >> 
>>> >> 1. Add Profiles as a top-level API document concept that modifies how transport properties and/or preconnections are created. (This is PR #328.)
>>> >> 2. Mention in the API document that specific API implementations may expose conveniences and profiles (presumably as a way to initialize preconnections), but do not modify the API or specify an abstract symbol for profiles.
>>> >> 3. Do not mention profiles at all in the API document, but mention something in the implementation document.
>>> > 
>>> > I am definitely in favour of option 1. Our implementation experience with PyTAPS showed that setting all transport properties necessary to get “UDP like service” becomes tedious otherwise.
>>> > I fear not including them in the examples and the core API will result in many developers rejecting TAPS as too complex to use.
>>> > The profiles provide a useful convenience to applications (just like the the shortcuts properties.prefer(property) instead of properties.add(property, prefer)).
>>> > 
>>> > In addition, profiles allow us to be less conservative in how we choose the defaults for transport properties, i.e., we don’t need the TAPS defaults to be TCP compatible as long as the reliable-in-order-stream profile is.
>>> 
>>> Speaking not as the person asking the question, but as an individual in the group:
>>> 
>>> I'm pretty strongly against option (1), and prefer (2). I think we should specify that convenience functions can exist, but I think changing the one initialization function of the transport properties to take a profile is not the right move for the API. Everything can be achieved by making the API for a convenience profile be a layer on top of the existing API.
>>> 
>>> Specifically, these are the differences:
>>> 
>>> (1) Exposes an API in which you always pass a profile (or an explicit nil) to a TransportProperties object; but the TransportProperties *also* lets you set each of the individual properties after that.
>>> (2) Allows implementations to expose an API call to deliver a TransportProperties that's set up based on a profile, but that isn't the fundamental constructor. It is implemented by creating a TransportProperties (TransportProperties()) and then setting the properties internally.
>>> 
>>> Thanks,
>>> Tommy
>>> 
>>> > 
>>> > AVE!
>>> >   Philipp S. Tiesel
>>> > 
>>> > -- 
>>> > Philipp S. Tiesel 
>>> > https://philipp.tiesel.net/ <https://philipp.tiesel.net/>
>>> > 
>>> 
>>> _______________________________________________
>>> Taps mailing list
>>> Taps@ietf.org <mailto:Taps@ietf.org>
>>> https://www.ietf.org/mailman/listinfo/taps <https://www.ietf.org/mailman/listinfo/taps>
>>> 
>>> _______________________________________________
>>> Taps mailing list
>>> Taps@ietf.org <mailto:Taps@ietf.org>
>>> https://www.ietf.org/mailman/listinfo/taps <https://www.ietf.org/mailman/listinfo/taps>
>> 
> 
> AVE!
>    Philipp S. Tiesel
> 
> -- 
> Philipp S. Tiesel 
> https://philipp.tiesel.net/ <https://philipp.tiesel.net/>
> _______________________________________________
> Taps mailing list
> Taps@ietf.org <mailto:Taps@ietf.org>
> https://www.ietf.org/mailman/listinfo/taps <https://www.ietf.org/mailman/listinfo/taps>