CoRE Working Group | A.P. Castellani |
Internet-Draft | University of Padova |
Intended status: Standards Track | S. Loreto |
Expires: September 28, 2012 | Ericsson |
March 29, 2012 |
CoAP Alive Message
draft-castellani-core-alive-00
In the context of a Constrained RESTful Environment (CoRE), hosts could frequently be energy-constrained and be turned off the vast majority of time for energy-saving purposes.
In the case of a CoAP server, while it is offline, it is neither available to serve requests. Clients desiring to access its resources have no way to understand when they will find it up again.
This specification provides a simple new message that gives to a CoAP server the ability to signal its current availability in the network.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 28, 2012.
Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
In the context of a Constrained RESTful Environment (CoRE), hosts could frequently be energy-constrained and be turned off the vast majority of time for energy-saving purposes.
In the case of a CoAP server, while it is offline, it is neither available to serve requests. Clients desiring to access its resources have no way to understand when they will find it up again.
This specification provides a simple new message that gives to a CoAP server the ability to signal its current availability in the network.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This specification defines a new message type for the CoAP message-layer (see Section 4.4 of [I-D.ietf-core-coap]). The type of a message is specified by the T field of the CoAP header.
An "Alive" message (ALV) indicates that a CoAP server is up and ready to serve requests. Alive shares T value with the Non-Confirmable (NON) message type, but is univocally distinguishable by the fact that it MUST be empty.
When a client receives an ALV message from a server, if it is interested in any resource served by it, the client SHOULD try sending a request to it since the Alive message provides an indication of its current availability.
Figure 1 shows a sample use case where a server notifies its wake up to clients using multicast.
C1 C2 C3 S | | | . server is sleeping | | | . | | | . | | | . | | | . server wakes up |<--|<--|<----| ALV MID=0xfefe | | | | | | | | CON MID=0x1234 |------------>| GET /a | | | | | | | | ACK MID=0x1234 |<------------| 2.05 "A" | | | . | | | . server goes sleeping again | | | . | | | . | | | .
Figure 2 shows a sample application on how the Alive message can fix the "Observer Model" problem discussed in Section 4.2.3 of [I-D.arkko-core-sleepy-sensors].
C1 C2 C3 P S | | | | . server is sleeping | | | | . | | | | . CON MID=0x1234 | | | | . GET | | | | . Proxy-URI: coap://S/temp |------------>| . Observe: 0 | | | | . |<------------| . ACK MID=0x1234 | | | | . | | | | . (time passes..) | | | | . | | | | . server wakes up | | | |<---| ALV MID=0xfefe | | | | | | | | | | CON MID=0xabcd | | | | | GET /temp | | | |--->| Observe:0 | | | | | | | | | | ACK MID=0xabcd | | | | | 2.05 "22.5 C" | | | |<---| Observe: 789 | | | | . | | | | . CON MID=0xabce | | | | . 2.05 "22.5 C" |<------------| . Observe: 3013 | | | | . |------------>| . ACK MID=0xabce | | | | . | | | | . (time passess..) | | | | . | | | | . resource state changes | | | | . NON MID=0xfeff | | | | . 2.05 "21.5 C" | | | |<---| Observe: 1384 | | | | . | | | | . | | | | . NON MID=0xabcf | | | | . 2.05 "22.5 C" |<------------| . Observe: 3013 ...
TBD
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[I-D.ietf-core-coap] | Shelby, Z, Hartke, K, Bormann, C and B Frank, "Constrained Application Protocol (CoAP)", Internet-Draft draft-ietf-core-coap-09, March 2012. |
[I-D.arkko-core-sleepy-sensors] | Arkko, J, Rissanen, H, Loreto, S, Turanyi, Z and O Novo, "Implementing Tiny COAP Sensors", Internet-Draft draft-arkko-core-sleepy-sensors-00, July 2011. |