draft-ietf-core-dynlink-02.txt   draft-ietf-core-dynlink-03.txt 
CoRE Working Group Z. Shelby CoRE Working Group Z. Shelby
Internet-Draft ARM Internet-Draft ARM
Intended status: Informational Z. Vial Intended status: Informational Z. Vial
Expires: August 28, 2017 Schneider-Electric Expires: September 14, 2017 Schneider-Electric
M. Koster M. Koster
SmartThings SmartThings
C. Groves C. Groves
Huawei Huawei
February 24, 2017 March 13, 2017
Dynamic Resource Linking for Constrained RESTful Environments Dynamic Resource Linking for Constrained RESTful Environments
draft-ietf-core-dynlink-02 draft-ietf-core-dynlink-03
Abstract Abstract
For CoAP [RFC7252] Dynamic linking of state updates between For CoAP [RFC7252] Dynamic linking of state updates between
resources, either on an endpoint or between endpoints, is defined resources, either on an endpoint or between endpoints, is defined
with the concept of Link Bindings. This specification defines with the concept of Link Bindings. This specification defines
conditional observation attributes that work with Link Bindings or conditional observation attributes that work with Link Bindings or
with CoAP Observe [RFC7641]. with CoAP Observe [RFC7641].
Editor's note: Editor's note:
skipping to change at page 1, line 44 skipping to change at page 1, line 44
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 28, 2017. This Internet-Draft will expire on September 14, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 41 skipping to change at page 2, line 41
3.3.1. Bind Method (bind) . . . . . . . . . . . . . . . . . 6 3.3.1. Bind Method (bind) . . . . . . . . . . . . . . . . . 6
3.3.2. Minimum Period (pmin) . . . . . . . . . . . . . . . . 6 3.3.2. Minimum Period (pmin) . . . . . . . . . . . . . . . . 6
3.3.3. Maximum Period (pmax) . . . . . . . . . . . . . . . . 7 3.3.3. Maximum Period (pmax) . . . . . . . . . . . . . . . . 7
3.3.4. Change Step (st) . . . . . . . . . . . . . . . . . . 7 3.3.4. Change Step (st) . . . . . . . . . . . . . . . . . . 7
3.3.5. Greater Than (gth) . . . . . . . . . . . . . . . . . 7 3.3.5. Greater Than (gth) . . . . . . . . . . . . . . . . . 7
3.3.6. Less Than (lth) . . . . . . . . . . . . . . . . . . . 7 3.3.6. Less Than (lth) . . . . . . . . . . . . . . . . . . . 7
3.3.7. Attribute Interactions . . . . . . . . . . . . . . . 8 3.3.7. Attribute Interactions . . . . . . . . . . . . . . . 8
4. Binding Table . . . . . . . . . . . . . . . . . . . . . . . . 8 4. Binding Table . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1. Binding Interface Description . . . . . . . . . . . . . . 8 4.1. Binding Interface Description . . . . . . . . . . . . . . 8
4.2. Resource Observation Attributes . . . . . . . . . . . . . 9 4.2. Resource Observation Attributes . . . . . . . . . . . . . 9
5. Security Considerations . . . . . . . . . . . . . . . . . . . 10 5. Security Considerations . . . . . . . . . . . . . . . . . . . 11
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
6.1. Interface Description . . . . . . . . . . . . . . . . . . 11 6.1. Interface Description . . . . . . . . . . . . . . . . . . 11
6.2. Link Relations Type . . . . . . . . . . . . . . . . . . . 11 6.2. Link Relations Type . . . . . . . . . . . . . . . . . . . 11
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 12
8. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 12 8. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 12
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
9.1. Normative References . . . . . . . . . . . . . . . . . . 13 9.1. Normative References . . . . . . . . . . . . . . . . . . 13
9.2. Informative References . . . . . . . . . . . . . . . . . 13 9.2. Informative References . . . . . . . . . . . . . . . . . 13
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 13 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 14
A.1. Greater Than (gth) example . . . . . . . . . . . . . . . 13 A.1. Greater Than (gth) example . . . . . . . . . . . . . . . 14
A.2. Greater Than (gth) and Period Max (pmax) example . . . . 14 A.2. Greater Than (gth) and Period Max (pmax) example . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15
1. Introduction 1. Introduction
IETF Standards for machine to machine communication in constrained IETF Standards for machine to machine communication in constrained
environments describe a REST protocol and a set of related environments describe a REST protocol and a set of related
information standards that may be used to represent machine data and information standards that may be used to represent machine data and
machine metadata in REST interfaces. CoRE Link-format is a standard machine metadata in REST interfaces. CoRE Link-format is a standard
skipping to change at page 6, line 38 skipping to change at page 6, line 38
| | | | | | | |
| Change Step | st | xsd:decimal (>0) | | Change Step | st | xsd:decimal (>0) |
| | | | | | | |
| Greater Than | gth | xsd:decimal | | Greater Than | gth | xsd:decimal |
| | | | | | | |
| Less Than | lth | xsd:decimal | | Less Than | lth | xsd:decimal |
+--------------------+-----------+------------------+ +--------------------+-----------+------------------+
Table 2: Binding Attributes Summary Table 2: Binding Attributes Summary
**Editor's note: Naming of lth and gth to be confirmed at IETF98.
3.3.1. Bind Method (bind) 3.3.1. Bind Method (bind)
This is the identifier of a binding method which defines the rules to This is the identifier of a binding method which defines the rules to
synchronize the destination resource. This attribute is mandatory. synchronize the destination resource. This attribute is mandatory.
3.3.2. Minimum Period (pmin) 3.3.2. Minimum Period (pmin)
When present, the minimum period indicates the minimum time to wait When present, the minimum period indicates the minimum time to wait
(in seconds) before triggering a new state synchronization (even if (in seconds) before triggering a new state synchronization (even if
it has changed). In the absence of this parameter, the minimum it has changed). In the absence of this parameter, the minimum
skipping to change at page 9, line 30 skipping to change at page 9, line 30
format simply appends new bindings to the table. All links in the format simply appends new bindings to the table. All links in the
payload MUST have a relation type "boundTo". A GET request simply payload MUST have a relation type "boundTo". A GET request simply
returns the current state of a binding table whereas a DELETE request returns the current state of a binding table whereas a DELETE request
empties the table. Individual entries may be dreeleted from the empties the table. Individual entries may be dreeleted from the
table by specifying the resource path in a DELETE request. table by specifying the resource path in a DELETE request.
The following example shows requests for adding, retrieving and The following example shows requests for adding, retrieving and
deleting bindings in a binding table. deleting bindings in a binding table.
Req: POST /bnd/ (Content-Format: application/link-format) Req: POST /bnd/ (Content-Format: application/link-format)
<coap://sensor.example.com/s/light>; <coap://sensor.example.com/s/switch>;
rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60" rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60"
Res: 2.04 Changed Res: 2.04 Changed
Req: GET /bnd/ Req: GET /bnd/
Res: 2.05 Content (application/link-format) Res: 2.05 Content (application/link-format)
<coap://sensor.example.com/s/light>; <coap://sensor.example.com/s/switch>;
rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60" rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60"
Req: DELETE /bnd/a/light Req: DELETE /bnd/a/switch
Res: 2.04 Changed Res: 2.04 Changed
Req: DELETE /bnd/ Req: DELETE /bnd/
Res: 2.04 Changed Res: 2.04 Changed
Figure 1: Binding Interface Example Figure 1: Binding Interface Example
4.2. Resource Observation Attributes 4.2. Resource Observation Attributes
When resource interfaces following this specification are made When resource interfaces following this specification are made
skipping to change at page 10, line 14 skipping to change at page 10, line 14
notifications as a result. In addition, a set of query string notifications as a result. In addition, a set of query string
parameters are defined here to allow a client to control how often a parameters are defined here to allow a client to control how often a
client is interested in receiving notifications and how much a client is interested in receiving notifications and how much a
resource value should change for the new representation to be resource value should change for the new representation to be
interesting. These query parameters are described in the following interesting. These query parameters are described in the following
table. A resource using an interface description defined in this table. A resource using an interface description defined in this
specification and marked as Observable in its link description SHOULD specification and marked as Observable in its link description SHOULD
support these observation parameters. The Change Step parameter can support these observation parameters. The Change Step parameter can
only be supported on resources with an atomic numeric value. only be supported on resources with an atomic numeric value.
*Editor's note: There is a proposal to use the query parameters on
the GET Observe as the default pattern. This allows multiple
observations of the same resource. The PUT behaviour below would be
treated as a legacy option. This will be discussed at IETF98.*
These query parameters MUST be treated as resources that are read These query parameters MUST be treated as resources that are read
using GET and updated using PUT, and MUST NOT be included in the using GET and updated using PUT, and MUST NOT be included in the
Observe request. Multiple parameters MAY be updated at the same time Observe request. Multiple parameters MAY be updated at the same time
by including the values in the query string of a PUT. Before being by including the values in the query string of a PUT. Before being
updated, these parameters have no default value. updated, these parameters have no default value.
+----------------+------------------+------------------+ +----------------+------------------+------------------+
| Resource | Parameter | Data Format | | Resource | Parameter | Data Format |
+----------------+------------------+------------------+ +----------------+------------------+------------------+
| Minimum Period | /{resource}?pmin | xsd:integer (>0) | | Minimum Period | /{resource}?pmin | xsd:integer (>0) |
skipping to change at page 12, line 11 skipping to change at page 12, line 17
Acknowledgement is given to colleagues from the SENSEI project who Acknowledgement is given to colleagues from the SENSEI project who
were critical in the initial development of the well-known REST were critical in the initial development of the well-known REST
interface concept, to members of the IPSO Alliance where further interface concept, to members of the IPSO Alliance where further
requirements for interface types have been discussed, and to Szymon requirements for interface types have been discussed, and to Szymon
Sasin, Cedric Chauvenet, Daniel Gavelle and Carsten Bormann who have Sasin, Cedric Chauvenet, Daniel Gavelle and Carsten Bormann who have
provided useful discussion and input to the concepts in this provided useful discussion and input to the concepts in this
specification. specification.
8. Changelog 8. Changelog
draft-ietf-core-dynlink-03
o Section 4.2: Update the Href to use "switch" instead of "light".
o General: Added editor's notes for issues to be resolved at IETF98.
draft-ietf-core-dynlink-02 draft-ietf-core-dynlink-02
o General: Changed the name of the greater than attribute "gt" to o General: Changed the name of the greater than attribute "gt" to
"gth" and the name of the less than attribute "lt" to "lth" due to "gth" and the name of the less than attribute "lt" to "lth" due to
conlict with the core resource directory draft lifetime "lt" conlict with the core resource directory draft lifetime "lt"
attribute. attribute.
o Clause 6.1: Addressed the editor's note by changing the link o Clause 6.1: Addressed the editor's note by changing the link
target attribute to "core.binding". target attribute to "core.binding".
skipping to change at page 14, line 4 skipping to change at page 14, line 14
Appendix A. Examples Appendix A. Examples
This appendix provides some examples of the use of binding attribute This appendix provides some examples of the use of binding attribute
/ observe attributes. / observe attributes.
Note: For brevity the only the method or response code is shown in Note: For brevity the only the method or response code is shown in
the header field. the header field.
A.1. Greater Than (gth) example A.1. Greater Than (gth) example
Observed CLIENT SERVER Actual
Observed CLIENT SERVER Actual
t State | | State t State | | State
____________ | | ____________ ____________ | | ____________
1 | | 1 | |
2 unknown | | 18.5 Cel 2 unknown | | 18.5 Cel
3 +----->| Header: GET 3 +----->| Header: GET
4 | GET | Token: 0x4a 4 | GET | Token: 0x4a
5 | | Uri-Path: temperature 5 | | Uri-Path: temperature
6 | | Uri-Query: gth="25" 6 | | Uri-Query: gth="25"
7 | | Observe: 0 (register) 7 | | Observe: 0 (register)
8 | | 8 | |
skipping to change at page 14, line 35 skipping to change at page 14, line 46
29 | | Payload: "26 Cel" 29 | | Payload: "26 Cel"
20 | | 20 | |
21 | | 21 | |
Figure 2: Client Registers and Receives one Notification of the Figure 2: Client Registers and Receives one Notification of the
Current State and One of a New State when it passes through the Current State and One of a New State when it passes through the
greather than threshold of 25. greather than threshold of 25.
A.2. Greater Than (gth) and Period Max (pmax) example A.2. Greater Than (gth) and Period Max (pmax) example
Observed CLIENT SERVER Actual Observed CLIENT SERVER Actual
t State | | State t State | | State
____________ | | ____________ ____________ | | ____________
1 | | 1 | |
2 unknown | | 18.5 Cel 2 unknown | | 18.5 Cel
3 +----->| Header: GET 3 +----->| Header: GET
4 | GET | Token: 0x4a 4 | GET | Token: 0x4a
5 | | Uri-Path: temperature 5 | | Uri-Path: temperature
6 | | Uri-Query: pmax="20";gth="25" 6 | | Uri-Query: pmax="20";gth="25"
7 | | Observe: 0 (register) 7 | | Observe: 0 (register)
8 | | 8 | |
 End of changes. 15 change blocks. 
13 lines changed or deleted 27 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/