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 <jingxuan.n.zh...@gmail.com>

> 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 <y...@cs.yale.edu>   |
| Professor of Computer Science       |
| http://www.cs.yale.edu/~yry/        |
alto mailing list

Reply via email to