Subject: [core] HTTP-CoAP proxy

From: Shoichi Sakane <[email-masked]>
Date: Tue, 13 Sep 2011 12:34:30 +0900

Hi,

I think the following behavior is not described in the current draft
of the CoAP core spec.  The behavior of this scenario is not simple
like just transmitting a message from the left to the right.

When the CoAP server made a choice to do asynchronous transaction,
the server just replied an ack without a payload.  The HTTP-CoAP
proxy doesn't have to send it back to the HTTP client in this case,
and does have to wait for the 2.05 response that contains a payload
from the server.  And, the proxy has to send it back to the client
as a response corresponding to the first request of the client.
Furthermore, the proxy must reply to the server when the response
from the server contains CON.

The following is the example diagram of such flow.

 HTTP               CoAP
Client    Proxy    Server
   |        |        |
   |  GET   |        |
   |------->|        | Header: GET (T=CON, Code=1, MID=0x7d38
   |        |------->| Token: 0x53
   |        |        | Uri-Path: "temperature"
   |        |        |
   |        |<-------| Header: (T=ACK, Code=0, MID=0x7d38)
   |        |        |
   |        |        | Header: 2.05 Content (T=CON, Code=69, MID=0xad7b)
   |        |<-------| Token: 0x53
   |<-------|        | Payload: "22.3 C" Header: (T=ACK, Code=0, MID=0xad7b)
   |  200   |        |
   |        |------->| Header: (T=ACK, Code=0, MID=0xad7b)
   |        |        |

It should be described in the document for interoperability, and for 
developers of the HTTP-CoAP proxy.

Shoichi

---

From: Zach Shelby <[email-masked]>
Date: Tue, 13 Sep 2011 13:52:22 +0300

Hi,

This is the intended behavior of an HTTP-CoAP proxy. The draft does point out that CoAP messaging must be transparent to the HTTP client, which is what your example points out. I do agree that it would be beneficial to add an example like this to Appendix B (http://tools.ietf.org/html/draft-ietf-core-coap-07#appendix-B). In addition, more implementation advice can be added to the HTTP-CoAP proxy draft. 

Zach  

On Sep 13, 2011, at 6:34 AM, Shoichi Sakane wrote:

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

-- 
Zach Shelby, Chief Nerd, Sensinode Ltd.
http://www.sensinode.com
http://zachshelby.org  - My blog "On the Internet of Things"
http://6lowpan.net - My book "6LoWPAN: The Wireless Embedded Internet"
Mobile: +358 40 7796297

---

From: Shoichi Sakane <[email-masked]>
Date: Wed, 14 Sep 2011 02:33:14 +0900

Ah, I found that it has been described in section 4.2.2 of HTTP-CoAP mapping draft. Thanks for pointing it out.

Shoichi