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,routing
data: { ... full routingcost Cost Map message ... }
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 protected]> wrote:
Wendy, Mingming and Yichen,
Please see below.
Regards,
Kai
On 07/07/16 23:21, Mingming Chen wrote:
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")?
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 protected]https://www.ietf.org/mailman/listinfo/alto
_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto