Skip to content

Commit 66b77f3

Browse files
Defined early cancellation of ongoing response forwarding
1 parent da735ae commit 66b77f3

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

draft-ietf-core-groupcomm-proxy.md

+46
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,34 @@ When using CoAP Observe {{RFC7641}}, the client follows what is specified in {{S
228228

229229
Furthermore, the client especially follows what is specified in {{Section 5 of RFC7641}}, i.e., it registers its interest to be an observer with the proxy, as if it was communicating with the servers.
230230

231+
### Cancellation of Ongoing Response Forwarding {#ssec-cancel-forwarding}
232+
233+
After having sent the unicast request to the proxy but before timeout expiration, the client might become not interested in receiving further corresponding responses, i.e., from that point in time until T seconds have elapsed since the request was sent to the proxy.
234+
235+
In such a case the client MAY ask the proxy for an early stop of the ongoing response forwarding, i.e., to not forward to the client any further response received to the forwarded group request from the servers.
236+
237+
To this end, the client can rely on one of the following two approaches.
238+
239+
* The client acts like it would at timeout expiration (see {{ssec-resp-proc-client-steps}}), i.e., it simply frees up its local Token value associated with the original unicast request sent to the proxy.
240+
241+
Consequently, further responses forwarded by the proxy would result in the client sending a CoAP Reset message (RST), which the proxy would interpret as a loss of interest from the client.
242+
243+
While this approach would work when using CoAP over UDP between the client and the proxy, it might not be suitable in case a different transport is used instead.
244+
245+
* The client sends to the proxy a new CoAP unicast request, namely Early Stop Request, such that:
246+
247+
* It MUST use the method GET.
248+
249+
* It MUST use the same Token value of the original unicast request sent to the proxy. This explicitly relates the present Early Stop Request to the original unicast request.
250+
251+
* It MUST include the Multicast-Timeout Option, specifying 0 as option value. This explicitly indicates the client's wish to stop receiving further responses to the original unicast request.
252+
253+
* It MUST NOT include any of the following: the Proxy-Uri Option or the Proxy-Cri Option; the Proxy-Scheme Option or the Proxy-Scheme-Number Option, together with the Uri-* options. This explicitly indicates the proxy to not forward the Early Stop Request.
254+
255+
After sending the Early Stop Request, the client frees up its local Token value associated with the original unicast request sent to the proxy.
256+
257+
Note that, irrespective of the approach used by the client, freeing up the Token value does not make it eligible for possible reuse yet (see {{ssec-req-send-steps}}).
258+
231259
## Request Processing at the Proxy ## {#ssec-req-proc-proxy}
232260

233261
This section defines the operations performed by the proxy, when receiving a request to forward to a group of servers.
@@ -266,6 +294,14 @@ When using CoAP Observe {{RFC7641}}, the proxy takes the role of the client and
266294

267295
When doing so, the proxy especially follows what is specified for the client in {{Section 3.7 of I-D.ietf-core-groupcomm-bis}}, by forwarding the group request to the servers over IP multicast as defined in {{ssec-req-proc-proxy-steps}} of this document.
268296

297+
### Cancellation of Ongoing Response Forwarding {#ssec-cancel-forwarding-proxy}
298+
299+
As defined in {{ssec-cancel-forwarding}}, the client might ask the proxy for an early stop of the ongoing response forwarding, i.e., to stop forwarding to the client any further responses received to the forwarded group request from the servers.
300+
301+
Consistently, the proxy stops forwarding such responses to the client, after receiving a CoAP Reset message (RST) in reply to one of such responses, or after receiving an Early Stop Request related to the ongoing response forwarding (i.e., using the same Token value of the original unicast request from the client).
302+
303+
After that, in case the proxy receives further responses to the forwarded group request from the servers, the proxy MUST NOT forward those responses to the client. In fact, the proxy can safely free up its local Token value associated with that group request, which results in discarding any further responses to the same group request received from then on from the servers.
304+
269305
## Request and Response Processing at the Server ## {#ssec-req-resp-proc-server}
270306

271307
This section defines the operations performed by the server, when receiving a group request from the proxy.
@@ -728,6 +764,14 @@ When using CoAP Observe {{RFC7641}}, what is defined in {{ssec-req-proc-proxy-ob
728764

729765
Any other proxy in the chain acts as a client and registers its own interest to observe the target resource with the next hop towards the origin servers, as per {{Section 5 of RFC7641}}.
730766

767+
### Cancellation of Ongoing Response Forwarding {#ssec-cancel-forwarding-proxy-chain}
768+
769+
Consistently with what is described in {{ssec-cancel-forwarding-proxy}}, a proxy might be asked by the (previous hop proxy closer to the) origin client for an early stop of the ongoing response forwarding.
770+
771+
That is, the proxy is asked to stop forwarding to the (previous hop proxy closer to the) origin client any further responses received to the forwarded group request from the (next hop proxy towards the) origin servers.
772+
773+
When this happens, the proxy proceeds as described in {{ssec-cancel-forwarding-proxy}}. Furthermore, if the proxy is not the last one in the chain, the proxy MAY send to the next hop proxy towards the origin servers an Early Stop Request (see {{ssec-req-proc-proxy-steps}}), with the same Token value of the group request that the proxy forwarded to the next hop proxy towards the origin servers.
774+
731775
## Response Processing at the Proxy # {#sec-proxy-chain-response-processing}
732776

733777
Upon receiving a response matching with the group request before the amount of time T' has elapsed, the proxy proceeds as follows.
@@ -1448,6 +1492,8 @@ C P S1 S2
14481492

14491493
* More precise semantics for the Reply-From Option.
14501494

1495+
* Defined early cancellation of ongoing response forwarding.
1496+
14511497
* Suggested value ranges for codepoints to register.
14521498

14531499
* Clarifications and editorial improvements.

0 commit comments

Comments
 (0)