Subject: [alto] SSE review

From: "Mingming Chen" <[email-masked]>
Date: Thu, 7 Jul 2016 23:21:28 +0800 (CST)

Hi Wendy,
Yichen and I are reviewing SSE, here are something uncertain for us and we want to discuss.
(1) In 2. Overview of Approach part, page 6, " The server responds by sending an event with the URI of a stream-control resource for this update stream. The client uses the control URI to select the resources for which it wants updates". We are not sure what's the meaning of " The client uses the control URI to select the resources for which it wants updates". Do you mean the "add" control ( location 3. Changes Since Version -01,page 6, "Defined a new 'Stream Control' resource to allow clients to add or remove resources from a previously created Update Stream")? 
In 9.2 Example: Advanced Network and Cost Map Updates, page 24, there is a good example of updates. But we didn't find an example of clients using the stream control URI to execute "add" control but just "remove". 
(2) In 4. Overview of Server-Sent Events (SSEs), page 7, "Messages are delimited by two new-lines (this is a slight simplification: see [SSE] for details)." But in the following, "The protocol defines three field names: event, id, and data". The example in Figure 1 also illustrate the three field names. So the question is, what is the "two new-lines" refer to?
Look forward to your reply! Thank you so much!

Best Regards,
Mingming, Yichen

---

From: Gao Kai <[email-masked]>
Date: Fri, 8 Jul 2016 00:32:22 +0800

Wendy, Mingmingand Yichen,

Please see below.

Regards,
Kai

On 07/07/16 23:21, Mingming Chen wrote:
> (1) In 2. Overview of Approach part, page 6, " The server responds by
> sending an event with the URI of a stream-control resource for this
> update stream. The client uses the control URI to select the resources
> for which it wants updates". We are not sure what's the meaning of "
> The client uses the control URI to select the resources for which it
> wants updates". Do you mean the "add" control ( location 3. Changes
> Since Version -01,page 6, "Defined a new 'Stream Control' resource to
> allow clients to add or remove resources from a previously created
> Update Stream")?
See section 9.2, page 23, the example of the response.  The "URI" refers
to value of the "control-uri", which is
"http://alto.example.com/updates/streams/2718281828459". The ALTO client
can send commands to that URI to control the update stream, for example,
the example on page 24.  You can tell the difference between an update
stream and a stream control from the Content-type of the two examples,
where the update stream service (page 23) uses text/event-stream while
stream control service (page 24) uses text/plain.

p.s. Wendy, I can't help noticing that there is a huge blank on page 22,
which is sufficient to hold the example request from page 23.  Maybe the
request and response can be put in different artworks?
> In 9.2 Example: Advanced Network and Cost Map Updates, page 24, there
> is a good example of updates. But we didn't find an example of clients
> using the stream control URI to execute "add" control but just "remove". 
> (2) In 4. Overview of Server-Sent Events (SSEs), page 7, "Messages are
> delimited by two new-lines (this is a slight simplification: see [SSE]
> for details)." But in the following, "The protocol defines three field
> names: event, id, and data". The example in Figure 1 also illustrate
> the three field names. So the question is, what is the "two new-lines"
> refer to?
Still the example on page 23 (Not sure if I understand it correctly,
Wendy please feel free to correct me).

     event: =application/alto-updatestreamcontrol+json
     data: {"control-uri":
     data: "http://alto.example.com/updates/streams/2718281828459"}// <-
the first new line
     // <- the second newline
     event: application/alto-costmap+json,routing
     data: { ... full routingcost Cost Map message ... }

>
>
> Best Regards,
> Mingming, Yichen
>
>
>  
>
>
>
> _______________________________________________
> alto mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/alto

---

From: "Mingming Chen" <[email-masked]>
Date: Fri, 8 Jul 2016 01:31:18 +0800 (CST)

Hi Kai,
Thank you so much for your reply. But I think you misunderstood my questions a little bit. Before that, the pages are not match my documents. Mine is :https://datatracker.ietf.org/doc/draft-ietf-alto-incr-update-sse/?include_text=1. Anyway, it is not a big deal. I can understand you. Let me explain more on these two questions:
(1) Just take the example you forwarded, Page 22. We don't think this (see below in line 6-14) 
1: POST /updates/costs HTTP/1.1
2:     Host: alto.example.com
3:     Accept: text/event-stream,application/alto-error+json
4:     Content-Type: application/alto-updatestreamparams+json
5:     Content-Length: ###

6:     { "add": {
7:         "my-network-map": {
8:           "resource-id": "my-network-map"
9:           },
10:         "my-routingcost-map": {
11:           "resource-id": "my-routingcost-map"
12:         }
13:       }
14:     }
15:HTTP/1.1 200 OK
16:     Connection: keep-alive
17:     Content-Type: text/event-stream

18:     event: =application/alto-updatestreamcontrol+json
19:     data: {"control-uri":
20:     data: "http://alto.example.com/updates/streams/2718281828459"}

21:     event: application/alto-costmap+json,routing
22:     data: { ... full routingcost Cost Map message ... }

23:     event: application/alto-costmap+json,hops
24:     data: { ... full hopcount Cost Map message ... }

25:        (pause)

26:     event: application/merge-patch+json,routing
27:     data: {"cost-map": {"PID2" : {"PID3" : 31}}}

28:     event: application/merge-patch+json,hops
29:     data: {"cost-map": {"PID2" : {"PID3" : 4}}}
is the "uri add" control. You see, it is the first request. It doesn't use uri "http://alto.example.com/updates/streams/3141592653589" , actually, the uri (line 20) is the reply body of "this add".After that, there will be a "uri remove" control. But we think there should be another different "uri add" control in consider of "Defined a new 'Stream Control' resource to allow clients to add or remove resources from a previously created Update Stream". We think uri come out firstly, then there should be an "add" just like "remove" , "remove" uses this uri.
(2) Sorry that the format can't make me clear in your reply. Just a guessing, do you mean the two "data"s in the reply? See below:
HTTP/1.1 200 OK
     Connection: keep-alive
     Content-Type: text/event-stream

     event: =application/alto-updatestreamcontrol+json
     data: {"control-uri":                                          //first new-line
     data: "http://alto.example.com/updates/streams/2718281828459"} //second new-line 

     event: application/alto-costmap+json,hops
     data: { ... full hopcount Cost Map message ... }

Do you mean that? See Page 7 "If a message has more than one "data" line, the value of the data field is the concatenation of the values on those lines". So I can't agree with you if you mean above like I guessed. Besides that, Page 7, "Messages are delimited by two new-lines (this is a slight simplification: see [SSE] for details). Each line is of the form 'field-name: string value'. The protocol defines three field names: event, id, and data." We think "event", "id", "data" are "field-name"s, "string value"s are the contents after each colon. 
Hope more people could join the discussion and we can come to an agreement. Thank you so much!

Best Regards,
Mingming

At 2016-07-08 00:32:22, "Gao Kai" <[email-masked]> wrote:
Wendy, Mingming and Yichen,

Please see below.

Regards,
Kai

Hi Wendy,

See section 9.2, page 23, the example of the response.  The "URI" refers to value of the "control-uri", which is "http://alto.example.com/updates/streams/2718281828459". The ALTO client can send commands to that URI to control the update stream, for example, the example on page 24.  You can tell the difference between an update stream and a stream control from the Content-type of the two examples, where the update stream service (page 23) uses text/event-stream while stream control service (page 24) uses text/plain.

p.s. Wendy, I can't help noticing that there is a huge blank on page 22, which is sufficient to hold the example request from page 23.  Maybe the request and response can be put in different artworks?

In 9.2 Example: Advanced Network and Cost Map Updates, page 24, there is a good example of updates. But we didn't find an example of clients using the stream control URI to execute "add" control but just "remove". 
(2) In 4. Overview of Server-Sent Events (SSEs), page 7, "Messages are delimited by two new-lines (this is a slight simplification: see [SSE] for details)." But in the following, "The protocol defines three field names: event, id, and data". The example in Figure 1 also illustrate the three field names. So the question is, what is the "two new-lines" refer to?
Look forward to your reply! Thank you so much!
Still the example on page 23 (Not sure if I understand it correctly, Wendy please feel free to correct me).

     event: =application/alto-updatestreamcontrol+json
     data: {"control-uri":
     data: "http://alto.example.com/updates/streams/2718281828459"}// <- the first new line
     // <- the second newline
     event: application/alto-costmap+json,routing
     data: { ... full routingcost Cost Map message ... }

Best Regards,
Mingming, Yichen

_______________________________________________
alto mailing list
[email-masked]://www.ietf.org/mailman/listinfo/alto

---

From: "Mingming Chen" <[email-masked]>
Date: Fri, 8 Jul 2016 23:51:41 +0800 (GMT+08:00)

Hi Kai,
The page number is on the bottom of each page but not top. And I sent to alto group again so everyone can see it. Please re-check. 
On what you stated, I can understand all. But I am not saying I don't understand the example  or the design. I am saying, I think the expression in some parts are not synchronized. Thanks!

Best Regards,
Mingming
On 07/08/2016 09:33, Gao Kai wrote:
Mingming,

I'm using the contents from link [1], which points to the latest version.

For other comments please see below.

Regards,
Kai

[1]: https://www.ietf.org/id/draft-ietf-alto-incr-update-sse-02.txt

On 08/07/16 01:30, Mingming Chen wrote:

Hi Kai,

6:     { "add": {
7:         "my-network-map": {

25:        (pause)

28:     event: application/merge-patch+json,hops
29:     data: {"cost-map": {"PID2" : {"PID3" : 4}}}
is the "uri add" control. You see, it is the first request. It doesn't use uri "http://alto.example.com/updates/streams/3141592653589" , actually,
It doesn't use the uri because the first request is not sent to a stream control service.

the uri (line 20) is the reply body of "this add".After that, there will be a "uri remove" control. But we think there should be another different "uri add" control in consider of "Defined a new 'Stream Control' resource to allow clients to add or remove resources from a previously created Update Stream". We think uri come out firstly, then there should be an "add" just like "remove" , "remove" uses this uri.
Some resources are already added in the initial request (the first request).  So you can simply remove them.

Wrong.  "Delimited" means "separated".

Do you mean that? See Page 7 "If a message has more than one "data" line, the value of the data field is the concatenation of the values on those lines". So I can't agree with you if you mean above like I guessed. Besides that, Page 7, "Messages are delimited by two new-lines (this is a slight simplification: see [SSE] for details). Each line is of the form 'field-name: string value'. The protocol defines three field names: event, id, and data." We think "event", "id", "data" are "field-name"s, "string value"s are the contents after each colon. 
Hope more people could join the discussion and we can come to an agreement. Thank you so much!
If you only send me the email, how can more people join the discussion...

Best Regards,
Mingming

Please see below.

Regards,
Kai

Hi Wendy,

Best Regards,
Mingming, Yichen

---

From: Gao Kai <[email-masked]>
Date: Sat, 9 Jul 2016 00:08:06 +0800

Mingming,

You are right about the pagenumbers.  My mistake.  Sorry about that.

Regards,
Kai

On 08/07/16 23:51, Mingming Chen wrote:
> Hi Kai,
> The page number is on the bottom of each page but not top. And I sent
> to alto group again so everyone can see it. Please re-check. 
> On what you stated, I can understand all. But I am not saying I don't
> understand the example  or the design. I am saying, I think the
> expression in some parts are not synchronized. Thanks!
>
> Best Regards,
> Mingming
> On 07/08/2016 09:33, Gao Kai <mailto:[email-masked]> wrote:
>
>     Mingming,
>
>     I'm using the contents from link[1], which points to the latest
>     version.
>
>     For other comments please seebelow.
>
>     Regards,
>     Kai
>
>>     Thank you so much for your reply. But I think you misunderstood
>>     my questions a little bit. Before that, the pages are not match
>>     my documents. Mine is
>>     :https://datatracker.ietf.org/doc/draft-ietf-alto-incr-update-sse/?include_text=1.
>>     Anyway, it is not a big deal. I can understand you. Let me
>>     explain more on these two questions:
>>     is the "uri add" control. You see, it is the first request. It
>>     doesn't use uri
>>     "http://alto.example.com/updates/streams/3141592653589"
>>     <http://alto.example.com/updates/streams/3141592653589%22> ,
>>     actually,
>>     the uri (line 20) is the reply body of "this add".After that,
>>     there will be a "uri remove" control. But we think there should
>>     be another different "uri add" control in consider of "Defined a
>>     new 'Stream Control' resource to allow clients to addor remove
>>     resources from a previously created Update Stream". We think uri
>>     come out firstly, then there should be an "add" just like
>>     "remove" , "remove" uses this uri.
>>     (2) Sorry that the format can't make me clear in your reply. Just
>>     a guessing, do you mean the two "data"s in the reply? See below:
>>     HTTP/1.1 200 OK
>>          Connection: keep-alive
>>          data: "http://alto.example.com/updates/streams/2718281828459"
>>     <http://alto.example.com/updates/streams/2718281828459%22%7D>} //second new-line 
>>
>>     Do you mean that? See Page 7 "If a message has more than one
>>     "data" line, the value of the data field is the concatenation of
>>     the values on those lines". So I can't agree with you if you mean
>>     above like I guessed. Besides that, Page 7, "Messages are
>>     delimited by two new-lines (this is a slight simplification: see
>>     [SSE] for details). Each line is of the form 'field-name: string
>>     value'. The protocol defines three field names: event, id, and
>>     data." We think "event", "id", "data" are "field-name"s, "string
>>     value"s are the contents after each colon. 
>>>         (1) In 2. Overview of Approach part, page 6, " The server
>>>         responds by sending an event with the URI of a
>>>         stream-control resource for this update stream. The client
>>>         uses the control URI to select the resources for which it
>>>         wants updates". We are not sure what's the meaning of " The
>>>         client uses the control URI to select the resources for
>>>         which it wants updates". Do you mean the "add" control (
>>>         location 3. Changes Since Version -01,page 6, "Defined a new
>>>         'Stream Control' resource to allow clients to add or remove
>>>         resources from a previously created Update Stream")?
>>         See section 9.2, page 23, the example of the response.  The
>>         "URI" refers to value of the "control-uri", which is
>>         "http://alto.example.com/updates/streams/2718281828459". The
>>         ALTO client can send commands to that URI to control the
>>         update stream, for example, the example on page 24.  You can
>>         tell the difference between an update stream and a stream
>>         control from the Content-type of the two examples, where the
>>         update stream service (page 23) uses text/event-stream while
>>         p.s. Wendy, I can't help noticing that there is a huge blank
>>         on page 22, which is sufficient to hold the example request
>>         from page 23.  Maybe the request and response can be put in
>>         different artworks?
>>>         In 9.2 Example: Advanced Network and Cost Map Updates, page
>>>         24, there is a good example of updates. But we didn't find
>>>         an example of clients using the stream control URI to
>>>         execute "add" control but just "remove". 
>>>         (2) In 4. Overview of Server-Sent Events (SSEs), page 7,
>>>         "Messages are delimited by two new-lines (this is a slight
>>>         simplification: see [SSE] for details)." But in the
>>>         following, "The protocol defines three field names: event,
>>>         id, and data". The example in Figure 1 also illustrate the
>>>         three field names. So the question is, what is the "two
>>>         new-lines" refer to?
>>         Still the example on page 23 (Not sure if I understand it
>>         correctly, Wendy please feel free to correct me).
>>
>>              data:
>>         "http://alto.example.com/updates/streams/2718281828459"}// <-
>>         the first new line
>>              // <- the second newline

---

From: "Mingming Chen" <[email-masked]>
Date: Sat, 9 Jul 2016 00:31:28 +0800 (GMT+08:00)

Hi Kai, Wendy,
Thank you so much to engage the discussion. I really want more people to engage discussion of SSE. Dear Wendy, I really want to discuss with you. Thanks!

Best Regards,
Mingming

On 07/09/2016 00:08, Gao Kai wrote:
Mingming,

You are right about the page numbers.  My mistake.  Sorry about that.

Regards,
Kai

Hi Kai,

Best Regards,
Mingming

Regards,
Kai

Hi Kai,

6:     { "add": {
7:         "my-network-map": {

25:        (pause)

Best Regards,
Mingming

Please see below.

Regards,
Kai

Hi Wendy,

Best Regards,
Mingming, Yichen

---

From: Wendy Roome <[email-masked]>
Date: Fri, 08 Jul 2016 13:36:30 -0400

Mingming,

Thanks for reading it!

(1) The paragraph is somewhat confusing.  I will replace the last two
sentences with something like

The control URI allows a client to modify the newly-created update stream.
For example, by sending requests on the control URI, the client can request
the server to send update events for additional resources, to stop sending
updates for previously requested resources, or to gracefully stop and close
the update stream altogether.

p24: I will add an example of using the control uri to add a resource as
well as remove one.

(2) "Two new lines" means two line-separators in a row, where a
line-separator is a new-line, carriage-return, or carriage-return/new-line.
(*Sigh* I wish the IETF could standardize line endings!!)

I will re-phrase that is to say that an event is terminated by a blank line
(no fields).

- Wendy

From:  Mingming Chen <[email-masked]>
Date:  Thu, July 7, 2016 at 11:21
To:  Wendy Roome <[email-masked]>
Cc:  IETF ALTO <[email-masked]>
Subject:  SSE review

Hi Wendy,
Yichen and I are reviewing SSE, here are something uncertain for us and we
want to discuss.
(1) In 2. Overview of Approach part, page 6, " The server responds by
sending an event with the URI of a stream-control resource for this update
stream. The client uses the control URI to select the resources for which it
wants updates". We are not sure what's the meaning of " The client uses the
control URI to select the resources for which it wants updates". Do you mean
the "add" control ( location 3. Changes Since Version -01,page 6, "Defined a
new 'Stream Control' resource to allow clients to add or remove resources
from a previously created Update Stream")?
In 9.2 Example: Advanced Network and Cost Map Updates, page 24, there is a
good example of updates. But we didn't find an example of clients using the
stream control URI to execute "add" control but just "remove".
(2) In 4. Overview of Server-Sent Events (SSEs), page 7, "Messages are
delimited by two new-lines (this is a slight simplification: see [SSE] for
details)." But in the following, "The protocol defines three field names:
event, id, and data". The example in Figure 1 also illustrate the three
field names. So the question is, what is the "two new-lines" refer to?
Look forward to your reply! Thank you so much!

Best Regards,
Mingming, Yichen

---

From: Yichen Qian <[email-masked]>
Date: Sat, 9 Jul 2016 02:02:40 +0800

Hi Wendy,

Thank you so much for the reply! I reviewed the draft together with Mingming and I think your answer solved our confusion. And the revision also looks great.

By the way, there is a typo in the draft. In the first line of chapter 6.1 ALTO Event Format, "basic stucture” should be “basic structure”.

Best,
Yichen

> On Jul 9, 2016, at 1:36 AM, Wendy Roome <[email-masked]> wrote:
> 
> Mingming,
> 
> Thanks for reading it!
> 
> (1) The paragraph is somewhat confusing.  I will replace the last two sentences with something like
> 
> The control URI allows a client to modify the newly-created update stream. For example, by sending requests on the control URI, the client can request the server to send update events for additional resources, to stop sending updates for previously requested resources, or to gracefully stop and close the update stream altogether.
> 
> p24: I will add an example of using the control uri to add a resource as well as remove one.
> 
> (2) "Two new lines" means two line-separators in a row, where a line-separator is a new-line, carriage-return, or carriage-return/new-line. (*Sigh* I wish the IETF could standardize line endings!!)
> 
> I will re-phrase that is to say that an event is terminated by a blank line (no fields).
> 
> 	- Wendy
> 
> From: Mingming Chen <[email-masked] <mailto:[email-masked]>>
> To: Wendy Roome <[email-masked] <mailto:[email-masked]>>
> Cc: IETF ALTO <[email-masked] <mailto:[email-masked]>>
> Subject: SSE review
> 
> Hi Wendy,

---

From: "Mingming Chen" <[email-masked]>
Date: Mon, 11 Jul 2016 18:19:47 +0800 (CST)

Hi Wendy,
Sorry to reply so late because of a trip. And thank you so much for solving our confusion. I will work with Yichen on it. Keep in touch! Thanks a lot!

Best Regards,
Mingming

At 2016-07-09 02:02:40, "Yichen Qian" <[email-masked]> wrote:

Hi Wendy,

Best,
Yichen

Mingming,

Thanks for reading it!

- Wendy

Hi Wendy,

Best Regards,
Mingming, Yichen