Re: [alto] Issue about incr-updates-sse update stream control design

Dawn Chan <dawn_chen_f@hotmail.com> Sat, 03 March 2018 12:57 UTC

Return-Path: <dawn_chen_f@hotmail.com>
X-Original-To: alto@ietfa.amsl.com
Delivered-To: alto@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 48285126DEE for <alto@ietfa.amsl.com>; Sat, 3 Mar 2018 04:57:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.125
X-Spam-Level:
X-Spam-Status: No, score=-0.125 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FORGED_HOTMAIL_RCVD2=0.874, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=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=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hotmail.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 Zar3MsBxkRGO for <alto@ietfa.amsl.com>; Sat, 3 Mar 2018 04:57:30 -0800 (PST)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-oln040092004096.outbound.protection.outlook.com [40.92.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A6797120721 for <alto@ietf.org>; Sat, 3 Mar 2018 04:57:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TQznhfpQEbcxU2dkOuFhy6aN7/b8Tl9nb9rMZwCruIM=; b=THNWZ9wtWNQG7qoZReAZqJO3Bb9h9RbyYkFnyzmnftZoAtROYbyYVFvsNzw4e2WfXmBfe/Xx7SVaXKTZOE3gzITi3zLLVPGVkDAwIgHZs0dCP1BGF5ZsnvLSZS3rqOq+RlYNOR4T2335HziSLaNOduC87w5eAXacVBc0e4adwmBH4UHXzQHuVOJDuSbcJMxF75hHg3IQlk7pxxPGgaSLHOg9zNFI1KkA6oY+X9YV4K7m0LllzJ02x+z4ToSv1HLq4r5OcknNfOzXs3wRyny+N6mMiAD5LdH+1HzCtK2knpPDA1UnhrjYdmQjQotbAA6LQ66tJbiJJ24EICwucIlSHw==
Received: from CY1NAM02FT060.eop-nam02.prod.protection.outlook.com (10.152.74.58) by CY1NAM02HT198.eop-nam02.prod.protection.outlook.com (10.152.75.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.527.18; Sat, 3 Mar 2018 12:57:29 +0000
Received: from BLUPR02MB1202.namprd02.prod.outlook.com (10.152.74.57) by CY1NAM02FT060.mail.protection.outlook.com (10.152.74.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.527.18 via Frontend Transport; Sat, 3 Mar 2018 12:57:29 +0000
Received: from BLUPR02MB1202.namprd02.prod.outlook.com ([fe80::f5e6:68f8:39a:2dae]) by BLUPR02MB1202.namprd02.prod.outlook.com ([fe80::f5e6:68f8:39a:2dae%14]) with mapi id 15.20.0548.014; Sat, 3 Mar 2018 12:57:29 +0000
From: Dawn Chan <dawn_chen_f@hotmail.com>
To: "Y. Richard Yang" <yry@cs.yale.edu>, Jensen Zhang <jingxuan.n.zhang@gmail.com>
CC: "alto@ietf.org" <alto@ietf.org>
Thread-Topic: [alto] Issue about incr-updates-sse update stream control design
Thread-Index: AQHTsj8x4DwCmmDLBEmRZf/L6Yq0c6O9mGEAgADhcgA=
Date: Sat, 03 Mar 2018 12:57:29 +0000
Message-ID: <BLUPR02MB12028DC2BEE31A2164FC0AE3B5C40@BLUPR02MB1202.namprd02.prod.outlook.com>
References: <CAAbpuyp_JjsOugb838xXk5r-ft26nJbNuGzDHKZG=Dk2oUzPcw@mail.gmail.com> <CANUuoLpmn0FPL3552QJVEBBKK22L-SsXej82Vead2W3M0FbG+A@mail.gmail.com>
In-Reply-To: <CANUuoLpmn0FPL3552QJVEBBKK22L-SsXej82Vead2W3M0FbG+A@mail.gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-incomingtopheadermarker: OriginalChecksum:C8FAD7D8DD30DF51A5A9E257F7B83ED144798EE0DF0CD01ADFA5DE0207030858; UpperCasedChecksum:B90B74D142199F29F2AAA91CDA7908CC4CF887FC7FA03772C290D1681D724A1A; SizeAsReceived:7289; Count:47
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [fMrUlTnZ3IimJ/01x2spwHDckCMex7sW]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; CY1NAM02HT198; 6:R5FHptTuRC2pOy0RYy35B3PgXEtTm3tYqOtaiVfZ/y7wQKxwt3mIk5rfU11FPi9RdKohi9qCyMYEOylU/UUflL7oRipdRRfvKMTFo7wUt7M9/VmgdoeAwgu45hf2idz7QdltEKPcDL7/h8/08ds/z20BZuWjXG4roXRPVz3RR7e8wUeG7pNB6o8swhUhxhKPfMBsbyehCOZrL4Rv8ZEfigfifW7q/cx9r6mpjtDhTL062BrmgWZxhAJKePnBcbdN52f2XhJof+MwQQILbY9BXfe33RirGpMPy74DlTltoJbBqUAe+lXyjOSgEgf9fDxlkXoQXuO2eJMSqDFFvv/YmrBIgSYLuVpvWQ9BF9KLzhI=; 5:OLVrkI7hNmdW9GI0a5yo6MX4ufRd9ZM8ClFt2N3A8vbrIQAyNI9xa81uro79/dQVtchujMKhhmNmi70xvwHQrRjDDfaob4OuNWRRpFgbxuKEivEveU7TFxjKuuSTPPtjebj655V8eKHX8CTKGowhCvbrRKTxnsshILiEejkiRTQ=; 24:EI+SebHomTpua/xofxGanByzbdyXKzEQGJ4S3KBPYqYapXg/7+eZ00EzP34lHDlVErMm7+qTAxbQ19QqF7wqEE8HjR4tZQREs9bPU5LmJDA=; 7:QF4bo9lHBTyUXrH1oqNBVuKbnaVsk7+4NBRhd217fiHAFHzAEFZYReRu5pgfuL+Sj+iXrjOE80NFN8xyd7/Ph8yZrD1I92UZzSC9figsptgZKjw0100InJUtmaBJf80gC5M1sQtyoEoycma0/B6a3ECHYoc/0DMdY0ePJXWsEO0LV6NhWGhca+vgRTB/kC9BiSH3qtS4ErWS8bKP535yWS1WkKmNy6m7wQ/S9TRWp5sAYtVAAJNf+5FI1lQrV//u
x-incomingheadercount: 47
x-eopattributedmessage: 0
x-microsoft-antispam: UriScan:(189865482101610); BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125374)(1603101448)(1701031045); SRVR:CY1NAM02HT198;
x-ms-traffictypediagnostic: CY1NAM02HT198:
x-ms-office365-filtering-correlation-id: 6046255d-c951-4b6f-e64e-08d5810651aa
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:CY1NAM02HT198; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT198;
x-forefront-prvs: 0600F93FE1
x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:CY1NAM02HT198; H:BLUPR02MB1202.namprd02.prod.outlook.com; FPR:; SPF:None; LANG:;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BLUPR02MB12028DC2BEE31A2164FC0AE3B5C40BLUPR02MB1202namp_"
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6046255d-c951-4b6f-e64e-08d5810651aa
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 12:57:29.2735 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT198
Archived-At: <https://mailarchive.ietf.org/arch/msg/alto/gufUEW3NqOCgoK2a4HlicrT9LA4>
Subject: Re: [alto] Issue about incr-updates-sse update stream control design
X-BeenThere: alto@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Application-Layer Traffic Optimization \(alto\) WG mailing list" <alto.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/alto>, <mailto:alto-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/alto/>
List-Post: <mailto:alto@ietf.org>
List-Help: <mailto:alto-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/alto>, <mailto:alto-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 03 Mar 2018 12:57:33 -0000

Hi Jensen and Richard,

Here are some of my ideas about the problem.

Actually, the solution for option 1 is already mentioned in Section 8.6 of the draft:
“If a request is successful, the server returns an HTTP ‘204 No Content’ response with no data.  If there are any errors, the server MUST return the appropriate error code, and MUST NOT add or remove any resources from the update stream.  Thus control requests are atomic: they cannot partially succeed.”

Here, the appropriate error code is returned in the HTTP response. Actually, an HTTP response has to be sent to the client whether the request is successful or not.

The approach that the server also notifies client outcome in the update stream can guarantee that the request does succeed. So I think it is better to use them both.

This way, if the request is processed successfully, the server will return with an HTTP “204” no content and a message in the update stream. If the request fails, the server will only return an error with ALTO error code in the HTTP response.

Another issue in the draft is the name of “client-id”. The name “client-id” looks more likely to distinguish ALTO clients, rather the different requests of different resources. So, I think it might be better to use another name, maybe “request-id”, to replace “client-id”. Do you have any better names?

Dawn

On 3 Mar 2018, at 7:30 AM, Y. Richard Yang <yry@cs.yale.edu<mailto:yry@cs.yale.edu>> wrote:

Hi Jensen,

Good question! Let's see the design space:
1. Client can send "add" or "remove"; since HTTP requests are "one-way", this needs to use a new control channel--a new HTTP request

2. Response option 1: Server notifies client outcome in the HTTP response by using a HTTP response code;

3. Response option 2: Server notifies client outcome in the update stream;

Note that we can have 3 options: (1) option 1 only; (2) option 2 only; (3)  both.

Option 1 only may have a concurrency issue, depending on the specific design and semantics. Consider two semantics:

1. Server responds *only after* the last updates have been sent successfully. This will lead to synchronization of likely two processes at the server; hence the guaranteed serialized sequence is:

client sends remove request -> server (process 1) processes the request -> server (may be process 2) flushes all outstanding updates to client -> server (process 1) notifies client by returning in the http request.

The price here is that the server process structure can be more complex.

2. Server responds *immediately* (i.e., not blocked by flushing and ack of all pending updates), and hence, the semantics is that although the client gets a "remove" success, updates may continue to arrive; hence the client code needs to be careful to handle the issue. It is not clear when the client can be notified that the buffer is flushed indeed.

Option 2 does not have the preceding issue: the server HTTP response only acknowledges that the "remove" request is received successfully and can be processed, but not that it is cleared.

But thinking about the issue one more time, we can use option 2 only, but then the document need to make clear that the client can handle remaining updates gracefully---just as after TCP close but data can continue to arrive. Is this a design that you appreciate more?

Richard




On Fri, Mar 2, 2018 at 10:57 AM, Jensen Zhang <jingxuan.n.zhang@gmail.com<mailto:jingxuan.n.zhang@gmail.com>> wrote:
Hi incr-update-sse authors and all,

I have a question about the current update stream control design in incr-updates-sse.

In the last paragraph of Section 7.6.2, the document writes

"When the client uses the stream control service to stop updates for one or more resources (Section 8<https://tools.ietf.org/html/draft-ietf-alto-incr-update-sse-09#section-8>), the ALTO server MUST send a control event (Section 6.3<https://tools.ietf.org/html/draft-ietf-alto-incr-update-sse-09#section-6.3>) whose "remove" field has the client-ids of those resources."

As section 7 defines "Update Stream Service", this paragraph means the ALTO server MUST send a control event in the update stream to notify the client the status of a stream control service request. Why do we want to use a different channel to return the output? Why not return this control event from the response of update stream control service? I feel it will introduce the unnecessary complexity.

Can anyone of authors elaborate the reason for this design?

Thanks,
Jensen



--
--
 =====================================
| Y. Richard Yang <yry@cs.yale.edu<mailto:yry@cs.yale.edu>>   |
| Professor of Computer Science       |
| http://www.cs.yale.edu/~yry/        |
 =====================================
_______________________________________________
alto mailing list
alto@ietf.org<mailto:alto@ietf.org>
https://www.ietf.org/mailman/listinfo/alto