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

"Y. Richard Yang" <> Fri, 02 March 2018 23:30 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id A5CF41242EA for <>; Fri, 2 Mar 2018 15:30:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Ne5DP37MamCI for <>; Fri, 2 Mar 2018 15:30:27 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4010:c07::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 107181200C1 for <>; Fri, 2 Mar 2018 15:30:27 -0800 (PST)
Received: by with SMTP id q69so15561501lfi.10 for <>; Fri, 02 Mar 2018 15:30:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pjLT5kYmf9S46JXdn+VnZ0LCdi5Cjf9eEXe8gW3PtFQ=; b=TF8sw6AXCJJZKUK/a8nlALK5kCNQKwvnFqnPFf1aHu6DRvqLn3xFo4X+VXT51vZtXO FaobtuQP5/dRIiMyDxZC27I67jBfLdkcfBmZxsNZRF65eaFy4WGXq2E16KQSBq5AZ05M CTJ9BqLb/C8xWQbUIIITa1hgwkCG0eRisZZo9pEFhKdFh1qViRCGdqScIpOFcC33PuX1 wmshehleXkuiAw2WwD84n7b8FJgw+VsO/insGImqYFDN5Q7Fqf/za+Yk7DrgcY0LH7bk XZI4yIGYVmGI9iCerCiiSisrHW78UMMsV0nruXjYdLodRK+J7CDz9CJAX8juKK7y0zSu NfqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=pjLT5kYmf9S46JXdn+VnZ0LCdi5Cjf9eEXe8gW3PtFQ=; b=e73PEBIuPqfheHHJRwUm1C6eYwSIBWb7cEUhHm7ZwZupfTuKLy/Y7BIRVlWjIwHBLA 2nSrMMB3g0k0nwuBzykW2pLPGgyAbsUt012B1mzu/yjukvukXRoTrajvzhtt0OXe5svy TPYzthQEDAInEOjKT/2hVi7hol3wdkAkW0WN6jtnMZIzWLRRdzerhoGEtEoCPxnUG+d/ fojnRCoKZzj6mYYaJMl3iuvhO1YptJqoW2l4wVpJXm5fPGKqeeERDCpjGAlEbKsJen+S WPwgcyinZVLOjVhzarAB4kdVXHIk6q5rfk04yd7zMQYIrKJjUIHbvQ4EiMUrmE+FOuXe whpw==
X-Gm-Message-State: AElRT7HKNoUoIbR/i7iCmfQ/08U8PQ0ho6HQdojV62PMO2lCxZJYw/TB gfkRiZU1yLpsdt1UmqXGjBXGQwijew91lkuldC67OQ==
X-Google-Smtp-Source: AG47ELs42hYk3D87Oc/TrHOchUq2A/ELbqHRfs1fKR4DBCNigT9WcFhsNVqEUtIPa8dkDFu/11gs/Ksct8on2+FemHU=
X-Received: by with SMTP id n12mr5332197lfb.10.1520033425275; Fri, 02 Mar 2018 15:30:25 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Fri, 2 Mar 2018 15:30:24 -0800 (PST)
In-Reply-To: <>
References: <>
From: "Y. Richard Yang" <>
Date: Fri, 2 Mar 2018 18:30:24 -0500
X-Google-Sender-Auth: V5t7RbG5KI8VtElSZZRDoXEtOHY
Message-ID: <>
To: Jensen Zhang <>
Cc: Wendy Roome <>, IETF ALTO <>
Content-Type: multipart/alternative; boundary="001a11412e185c43d10566765c48"
Archived-At: <>
Subject: Re: [alto] Issue about incr-updates-sse update stream control design
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Application-Layer Traffic Optimization \(alto\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 02 Mar 2018 23:30:30 -0000

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)

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?


On Fri, Mar 2, 2018 at 10:57 AM, Jensen Zhang <>

> 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
> <>),
> the ALTO server MUST send a control event (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 <>   |
| Professor of Computer Science       |
|        |