draft-ietf-core-dynlink-05.txt   draft-ietf-core-dynlink-06.txt 
CoRE Working Group Z. Shelby CoRE Working Group Z. Shelby
Internet-Draft ARM Internet-Draft ARM
Intended status: Informational M. Vial Intended status: Informational M. Koster
Expires: September 19, 2018 Schneider-Electric Expires: January 4, 2019 SmartThings
M. Koster
SmartThings
C. Groves C. Groves
J. Zhu J. Zhu
Huawei Huawei
B. Silverajan, Ed. B. Silverajan, Ed.
Tampere University of Technology Tampere University of Technology
March 18, 2018 July 03, 2018
Dynamic Resource Linking for Constrained RESTful Environments Dynamic Resource Linking for Constrained RESTful Environments
draft-ietf-core-dynlink-05 draft-ietf-core-dynlink-06
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 note
o The git repository for the draft is found at https://github.com/ The git repository for the draft is found at https://github.com/core-
core-wg/dynlink wg/dynlink
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 https://datatracker.ietf.org/drafts/current/. Drafts is at https://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 September 19, 2018. This Internet-Draft will expire on January 4, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 25 skipping to change at page 2, line 25
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Link Bindings . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Link Bindings . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Binding Methods . . . . . . . . . . . . . . . . . . . . . 4 3.1. The "bind" attribute and Binding Methods . . . . . . . . 4
3.1.1. Polling . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.1. Polling . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2. Observe . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.2. Observe . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.3. Push . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.3. Push . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2. Link Relation . . . . . . . . . . . . . . . . . . . . . . 6 3.2. Link Relation . . . . . . . . . . . . . . . . . . . . . . 6
3.3. Binding Attributes . . . . . . . . . . . . . . . . . . . 6 4. Binding and Resource Observation Attributes . . . . . . . . . 6
3.3.1. Bind Method (bind) . . . . . . . . . . . . . . . . . 6 4.1. Minimum Period (pmin) . . . . . . . . . . . . . . . . . . 7
3.3.2. Minimum Period (pmin) . . . . . . . . . . . . . . . . 6 4.2. Maximum Period (pmax) . . . . . . . . . . . . . . . . . . 7
3.3.3. Maximum Period (pmax) . . . . . . . . . . . . . . . . 7 4.3. Change Step (st) . . . . . . . . . . . . . . . . . . . . 7
3.3.4. Change Step (st) . . . . . . . . . . . . . . . . . . 7 4.4. Greater Than (gt) . . . . . . . . . . . . . . . . . . . . 8
3.3.5. Greater Than (gt) . . . . . . . . . . . . . . . . . . 7 4.5. Less Than (lt) . . . . . . . . . . . . . . . . . . . . . 8
3.3.6. Less Than (lt) . . . . . . . . . . . . . . . . . . . 8 4.6. Notification Band (band) . . . . . . . . . . . . . . . . 8
3.3.7. Notification Band (band) . . . . . . . . . . . . . . 8 4.7. Attribute Interactions . . . . . . . . . . . . . . . . . 9
3.3.8. Attribute Interactions . . . . . . . . . . . . . . . 9 5. Binding Table . . . . . . . . . . . . . . . . . . . . . . . . 10
4. Binding Table . . . . . . . . . . . . . . . . . . . . . . . . 10 6. Implementation Considerations . . . . . . . . . . . . . . . . 11
4.1. Binding Interface Description . . . . . . . . . . . . . . 10 7. Security Considerations . . . . . . . . . . . . . . . . . . . 11
4.2. Resource Observation Attributes . . . . . . . . . . . . . 11 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
5. Security Considerations . . . . . . . . . . . . . . . . . . . 12 8.1. Interface Description . . . . . . . . . . . . . . . . . . 12
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 8.2. Link Relation Type . . . . . . . . . . . . . . . . . . . 12
6.1. Interface Description . . . . . . . . . . . . . . . . . . 13 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13
6.2. Link Relation Type . . . . . . . . . . . . . . . . . . . 13 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 13
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 11. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 14 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 15
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 12.1. Normative References . . . . . . . . . . . . . . . . . . 15
9.1. Normative References . . . . . . . . . . . . . . . . . . 15 12.2. Informative References . . . . . . . . . . . . . . . . . 15
9.2. Informative References . . . . . . . . . . . . . . . . . 15 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 15
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 16 A.1. Greater Than (gt) example . . . . . . . . . . . . . . . . 15
A.1. Greater Than (gt) example . . . . . . . . . . . . . . . . 16
A.2. Greater Than (gt) and Period Max (pmax) example . . . . . 16 A.2. Greater Than (gt) and Period Max (pmax) example . . . . . 16
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17
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 [RFC7252] 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 [RFC6690] is a
for doing Web Linking [RFC5988] in constrained environments. standard for doing Web Linking [RFC8288] in constrained environments.
This specification introduces the concept of a Link Binding, which This specification introduces the concept of a Link Binding, which
defines a new link relation type to create a dynamic link between defines a new link relation type to create a dynamic link between
resources over which to exchange state updates. Specifically, a Link resources over which state updates are conveyed. Specifically, a
Binding is a link for binding the state of 2 resources together such Link Binding is a unidirectional link for binding the states of
that updates to one are sent over the link to the other. CoRE Link source and destination resources together such that updates to one
Format representations are used to configure, inspect, and maintain are sent over the link to the other. CoRE Link Format
Link Bindings. This specification additionally defines a set of representations are used to configure, inspect, and maintain Link
Bindings. This specification additionally defines a set of
conditional Observe Attributes for use with Link Bindings and with conditional Observe Attributes for use with Link Bindings and with
the standalone CoRE Observe [RFC7641] method. the standalone CoRE Observe [RFC7641] method.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this specification are to be interpreted as described "OPTIONAL" in this document are to be interpreted as described in BCP
in [RFC2119]. 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
This specification requires readers to be familiar with all the terms This specification requires readers to be familiar with all the terms
and concepts that are discussed in [RFC5988] and [RFC6690]. This and concepts that are discussed in [RFC8288] and [RFC6690]. This
specification makes use of the following additional terminology: specification makes use of the following additional terminology:
Link Binding: A unidirectional logical link between a source Link Binding: A unidirectional logical link between a source
resource and a destination resource, over which state information resource and a destination resource, over which state information
is synchronized. is synchronized.
State Synchronization: Depending on the binding method (Polling, State Synchronization: Depending on the binding method (Polling,
Observe, Push) different REST methods may be used to synchronize Observe, Push) different REST methods may be used to synchronize
the resource values between a source and a destination. The the resource values between a source and a destination. The
process of using a REST method to achieve this is defined as process of using a REST method to achieve this is defined as
skipping to change at page 4, line 15 skipping to change at page 4, line 15
3. Link Bindings 3. Link Bindings
In a M2M RESTful environment, endpoints may directly exchange the In a M2M RESTful environment, endpoints may directly exchange the
content of their resources to operate the distributed system. For content of their resources to operate the distributed system. For
example, a light switch may supply on-off control information that example, a light switch may supply on-off control information that
may be sent directly to a light resource for on-off control. may be sent directly to a light resource for on-off control.
Beforehand, a configuration phase is necessary to determine how the Beforehand, a configuration phase is necessary to determine how the
resources of the different endpoints are related to each other. This resources of the different endpoints are related to each other. This
can be done either automatically using discovery mechanisms or by can be done either automatically using discovery mechanisms or by
means of human intervention and a so-called commissioning tool. In means of human intervention and a so-called commissioning tool. In
this specification the abstract relationship between two resources is this specification such an abstract relationship between two
called a link Binding. The configuration phase necessitates the resources is defined, called a link Binding. The configuration phase
exchange of binding information so a format recognized by all CoRE necessitates the exchange of binding information so a format
endpoints is essential. This specification defines a format based on recognized by all CoRE endpoints is essential. This specification
the CoRE Link-Format to represent binding information along with the defines a format based on the CoRE Link-Format to represent binding
rules to define a binding method which is a specialized relationship information along with the rules to define a binding method which is
between two resources. The purpose of a binding is to synchronize a specialized relationship between two resources. The purpose of
the content between a source resource and a destination resource. such a binding is to synchronize the content between a source
The destination resource MAY be a group resource if the authority resource and a destination resource. The destination resource MAY be
component of the destination URI contains a group address (either a a group resource if the authority component of the destination URI
multicast address or a name that resolves to a multicast address). contains a group address (either a multicast address or a name that
Since a binding is unidirectional, the binding entry defining a resolves to a multicast address). Since a binding is unidirectional,
relationship is present only on one endpoint. The binding entry may the binding entry defining a relationship is present only on one
be located either on the source or the destination endpoint depending endpoint. The binding entry may be located either on the source or
on the binding method. the destination endpoint depending on the binding method.
3.1. Binding Methods 3.1. The "bind" attribute and Binding Methods
A binding method defines the rules to generate the web-transfer A binding method defines the rules to generate the web-transfer
exchanges that synchronize state between source and destination exchanges that synchronize state between source and destination
resources. By using REST methods content is sent from the source resources. By using REST methods content is sent from the source
resource to the destination resource. resource to the destination resource.
In order to use binding methods, this specification defines a special
CoRE link attribute "bind". This is the identifier of a binding
method which defines the rules to synchronize the destination
resource. This attribute is mandatory.
+----------------+-----------+------------+
| Attribute | Parameter | Value |
+----------------+-----------+------------+
| Binding method | bind | xsd:string |
+----------------+-----------+------------+
Table 1: The bind attribute
The following table gives a summary of the binding methods defined in The following table gives a summary of the binding methods defined in
this specification. this specification.
+---------+------------+-------------+---------------+ +---------+------------+-------------+---------------+
| Name | Identifier | Location | Method | | Name | Identifier | Location | Method |
+---------+------------+-------------+---------------+ +---------+------------+-------------+---------------+
| Polling | poll | Destination | GET | | Polling | poll | Destination | GET |
| | | | | | | | | |
| Observe | obs | Destination | GET + Observe | | Observe | obs | Destination | GET + Observe |
| | | | | | | | | |
| Push | push | Source | PUT | | Push | push | Source | PUT |
+---------+------------+-------------+---------------+ +---------+------------+-------------+---------------+
Table 1: Binding Method Summary Table 2: Binding Method Summary
The description of a binding method must define the following The description of a binding method must define the following
aspects: aspects:
Identifier: This is the value of the "bind" attribute used to Identifier: This is the value of the "bind" attribute used to
identify the method. identify the method.
Location: This information indicates whether the binding entry is Location: This information indicates whether the binding entry is
stored on the source or on the destination endpoint. stored on the source or on the destination endpoint.
skipping to change at page 5, line 45 skipping to change at page 6, line 8
3.1.2. Observe 3.1.2. Observe
The Observe method creates an observation relationship between the The Observe method creates an observation relationship between the
destination endpoint and the source resource. On each notification destination endpoint and the source resource. On each notification
the content from the source resource is copied to the destination the content from the source resource is copied to the destination
resource. The creation of the observation relationship requires the resource. The creation of the observation relationship requires the
CoAP Observation mechanism [RFC7641] hence this method is only CoAP Observation mechanism [RFC7641] hence this method is only
permitted when the resources are made available over CoAP. The permitted when the resources are made available over CoAP. The
binding entry for this method MUST be stored on the destination binding entry for this method MUST be stored on the destination
endpoint. The binding conditions are mapped as query string endpoint. The binding conditions are mapped as query string
parameters (see Section 4.2). parameters (see Section 4).
3.1.3. Push 3.1.3. Push
When the Push method is assigned to a binding, the source endpoint When the Push method is assigned to a binding, the source endpoint
sends PUT requests to the destination resource when the binding sends PUT requests to the destination resource when the binding
condition attributes are satisfied for the source resource. The condition attributes are satisfied for the source resource. The
source endpoint MUST only send a notification request if the binding source endpoint MUST only send a notification request if the binding
conditions are met. The binding entry for this method MUST be stored conditions are met. The binding entry for this method MUST be stored
on the source endpoint. on the source endpoint.
3.2. Link Relation 3.2. Link Relation
Since Binding involves the creation of a link between two resources, Since Binding involves the creation of a link between two resources,
Web Linking and the CoRE Link-Format are a natural way to represent Web Linking and the CoRE Link-Format are a natural way to represent
binding information. This involves the creation of a new relation binding information. This involves the creation of a new relation
type, named "boundto". In a Web link with this relation type, the type, named "boundto". In a Web link with this relation type, the
target URI contains the location of the source resource and the target URI contains the location of the source resource and the
context URI points to the destination resource. context URI points to the destination resource.
3.3. Binding Attributes 4. Binding and Resource Observation Attributes
Web link attributes allow a fine-grained control of the type of state In addition to "bind", this specification further defines Web link
attributes allowing a fine-grained control of the type of state
synchronization along with the conditions that trigger an update. synchronization along with the conditions that trigger an update.
This specification defines the attributes below:
When resource interfaces following this specification are made
available over CoAP, the CoAP Observation mechanism [RFC7641] MAY
also be used to observe any changes in a resource, and receive
asynchronous notifications as a result. A resource using an
interface description defined in this specification and marked as
Observable in its link description SHOULD support these observation
parameters.
In addition, the set of parameters are defined here allow a client to
control how often a client is interested in receiving notifications
and how much a resource value should change for the new
representation to be interesting, as query parameters.
These query parameters MUST be treated as resources that are read
using GET and updated using PUT, and MUST NOT be included in the
Observe request. Multiple parameters MAY be updated at the same time
by including the values in the query string of a PUT. Before being
updated, these parameters have no default value.
These attributes are defined below:
+--------------------+-----------+------------------+ +--------------------+-----------+------------------+
| Attribute | Parameter | Value | | Attribute | Parameter | Value |
+--------------------+-----------+------------------+ +--------------------+-----------+------------------+
| Binding method | bind | xsd:string |
| | | |
| Minimum Period (s) | pmin | xsd:integer (>0) | | Minimum Period (s) | pmin | xsd:integer (>0) |
| | | | | | | |
| Maximum Period (s) | pmax | xsd:integer (>0) | | Maximum Period (s) | pmax | xsd:integer (>0) |
| | | | | | | |
| Change Step | st | xsd:decimal (>0) | | Change Step | st | xsd:decimal (>0) |
| | | | | | | |
| Greater Than | gt | xsd:decimal | | Greater Than | gt | xsd:decimal |
| | | | | | | |
| Less Than | lt | xsd:decimal | | Less Than | lt | xsd:decimal |
| | | | | | | |
| Notification Band | band | xsd:boolean | | Notification Band | band | xsd:boolean |
+--------------------+-----------+------------------+ +--------------------+-----------+------------------+
Table 2: Binding Attributes Summary Table 3: Binding Attributes Summary
3.3.1. Bind Method (bind)
This is the identifier of a binding method which defines the rules to
synchronize the destination resource. This attribute is mandatory.
3.3.2. Minimum Period (pmin) 4.1. 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
period is up to the synchronization initiator. The minimum period period is up to the synchronization initiator. The minimum period
MUST be greater than zero otherwise the receiver MUST return a CoAP MUST be greater than zero otherwise the receiver MUST return a CoAP
error code 4.00 "Bad Request" (or equivalent). error code 4.00 "Bad Request" (or equivalent).
3.3.3. Maximum Period (pmax) 4.2. Maximum Period (pmax)
When present, the maximum period indicates the maximum time in When present, the maximum period indicates the maximum time in
seconds between two consecutive state synchronizations (regardless if seconds between two consecutive state synchronizations (regardless if
it has changed). In the absence of this parameter, the maximum it has changed). In the absence of this parameter, the maximum
period is up to the synchronization initiator. The maximum period period is up to the synchronization initiator. The maximum period
MUST be greater than zero and MUST be greater than the minimum period MUST be greater than zero and MUST be greater than the minimum period
parameter (if present) otherwise the receiver MUST return a CoAP parameter (if present) otherwise the receiver MUST return a CoAP
error code 4.00 "Bad Request" (or equivalent). error code 4.00 "Bad Request" (or equivalent).
3.3.4. Change Step (st) 4.3. Change Step (st)
When present, the change step indicates how much the value of a When present, the change step indicates how much the value of a
resource SHOULD change before triggering a new state synchronization resource SHOULD change before triggering a new state synchronization
(compared to the value of the previous synchronization). Upon (compared to the value of the previous synchronization). Upon
reception of a query including the st attribute the current value reception of a query including the st attribute the current value
(CurrVal) of the resource is set as the initial value (STinit). Once (CurrVal) of the resource is set as the initial value (STinit). Once
the resource value differs from the STinit value (i.e. CurrVal >= the resource value differs from the STinit value (i.e. CurrVal >=
STinit + ST or CurrVal <= STint - ST) then a new state STinit + ST or CurrVal <= STint - ST) then a new state
synchronization occurs. STinit is then set to the state synchronization occurs. STinit is then set to the state
synchronization value and new state synchronizations are based on a synchronization value and new state synchronizations are based on a
change step against this value. The change step MUST be greater than change step against this value. The change step MUST be greater than
zero otherwise the receiver MUST return a CoAP error code 4.00 "Bad zero otherwise the receiver MUST return a CoAP error code 4.00 "Bad
Request" (or equivalent). Request" (or equivalent).
The Change Step parameter can only be supported on resources with an
atomic numeric value.
Note: Due to the state synchronization based update of STint it may Note: Due to the state synchronization based update of STint it may
result in that resource value received in two sequential state result in that resource value received in two sequential state
synchronizations differs by more than st. synchronizations differs by more than st.
3.3.5. Greater Than (gt) 4.4. Greater Than (gt)
When present, Greater Than indicates the upper limit value the When present, Greater Than indicates the upper limit value the
resource value SHOULD cross before triggering a new state resource value SHOULD cross before triggering a new state
synchronization. State synchronization only occurs when the resource synchronization. State synchronization only occurs when the resource
value exceeds the specified upper limit value. The actual resource value exceeds the specified upper limit value. The actual resource
value is used for the synchronization rather than the gt value. If value is used for the synchronization rather than the gt value. If
the value continues to rise, no new state synchronizations are the value continues to rise, no new state synchronizations are
generated as a result of gt. If the value drops below the upper generated as a result of gt. If the value drops below the upper
limit value and then exceeds the upper limit then a new state limit value and then exceeds the upper limit then a new state
synchronization is generated. synchronization is generated.
3.3.6. Less Than (lt) 4.5. Less Than (lt)
When present, Less Than indicates the lower limit value the resource When present, Less Than indicates the lower limit value the resource
value SHOULD cross before triggering a new state synchronization. value SHOULD cross before triggering a new state synchronization.
State synchronization only occurs when the resource value is less State synchronization only occurs when the resource value is less
than the specified lower limit value. The actual resource value is than the specified lower limit value. The actual resource value is
used for the synchronization rather than the lt value. If the value used for the synchronization rather than the lt value. If the value
continues to fall no new state synchronizations are generated as a continues to fall no new state synchronizations are generated as a
result of lt. If the value rises above the lower limit value and result of lt. If the value rises above the lower limit value and
then drops below the lower limit then a new state synchronization is then drops below the lower limit then a new state synchronization is
generated. generated.
3.3.7. Notification Band (band) 4.6. Notification Band (band)
The notification band attribute allows a bounded or unbounded (based The notification band attribute allows a bounded or unbounded (based
on a minimum or maximum) value range that may trigger multiple state on a minimum or maximum) value range that may trigger multiple state
synchronizations. This enables use cases where different ranges synchronizations. This enables use cases where different ranges
results in differing behaviour. For example: monitoring the results in differing behaviour. For example: monitoring the
temperature of machinery. Whilst the temperature is in the normal temperature of machinery. Whilst the temperature is in the normal
operating range only periodic observations are needed. However as operating range only periodic observations are needed. However as
the temperature moves to more abnormal ranges more frequent the temperature moves to more abnormal ranges more frequent
synchronization/reporting may be needed. synchronization/reporting may be needed.
skipping to change at page 9, line 5 skipping to change at page 9, line 26
synchronization occurs when the resource value is equal to or above synchronization occurs when the resource value is equal to or above
the notification band minimum. If lt is not present there is no the notification band minimum. If lt is not present there is no
minimum value for the band. minimum value for the band.
When band is present with the gt attribute, it defines the upper When band is present with the gt attribute, it defines the upper
bound for the notification band (notification band maximum). State bound for the notification band (notification band maximum). State
synchronization occurs when the resource value is equal to or below synchronization occurs when the resource value is equal to or below
the notification band maximum. If gt is not present there is no the notification band maximum. If gt is not present there is no
maximum value for the band. maximum value for the band.
3.3.8. Attribute Interactions If band is present with both the gt and lt attributes, two kinds of
signaling bands are specified.
Pmin, pmax, st, gt and lt may be present in the same query.
If pmin and pmax are present in a query then they take precedence
over the other parameters. Thus even if st, gt or lt are met, if
pmin has not been exceeded then no state synchronization occurs.
Likewise if st, gt or lt have not been met and pmax time has expired
then state synchronization occurs. The current value of the resource
is used for the synchronization. If pmin time is exceeded and st, gt
or lt are met then the current value of the resource is synchronized.
If st is also included, a state synchronization resulting from pmin
or pmax updates STinit with the synchronized value.
If gt and lt are included gt MUST be greater than lt otherwise an
error CoAP error code 4.00 "Bad Request" (or equivalent) MUST be
returned.
If st is included in a query with a gt or lt attribute then state If a band is specified in which the value of gt is less than that of
synchronizations occur only when the conditions described by st AND lt, in-band signaling occurs. State synchronization occurs whenever
gt or st AND lt are met. the resource value is between the notification band minimum and
maximum or is equal to the notification band minimum or maximum.
To enable an notification band at least the notification band minimum On the other hand if the band is specified in which the value of gt
or maximum MUST be set. If both the notification band minimum and is greater than that of lt, out-of-band signaling occurs. State
maximum are set then a finite band is specified. State synchronization occurs whenever the resource value is outside the
synchronization occurs whenever the resource value is between the
notification band minimum and maximum or is equal to the notification notification band minimum and maximum or is equal to the notification
band minimum or maximum. If only the notification band minimum or band minimum or maximum.
maximum is set then the band has an open bound. That is all values
above the notification band minimum or all values below the
notification band maximum will be synchronized.
When using multiple resource bindings (e.g. multiple Observations of
resource) with different bands, consideration should be given to the
resolution of the resource value when setting sequential bands. For
example: Given BandA (Abmn=10, Bbmx=20) and BandB (Bbmn=21, Bbmx=30).
If the resource value returns an integer then notifications for
values between and inclusive of 10 and 30 will be triggered. Whereas
if the resolution is to one decimal point (0.1) then notifications
for values 20.1 to 20.9 will not be triggered.
Note: The use of the notification band minimum and maximum allow for
a synchronization whenever a change in the resource value occurs.
Theoretically this could occur in-line with the server internal
sample period for the determining the resource value. Implementors
SHOULD consider the resolution needed before updating the resource,
e.g. updating the resource when a temperature sensor value changes by
0.001 degree versus 1 degree.
If pmin and pmax are present in a query then they take precedence
over the other parameters. Thus even if the notification band
minimum and maximum are met if pmin has not been exceeded then no
state synchronization occurs. Likewise if the notification band
minimum and maximum have not been met and pmax time has expired then
state synchronization occurs. The current value of the resource is
used for the synchronization. If pmin time is exceeded and the
notification band minimum and maximum are met then the current value
of the resource is synchronized. If st is also included, a state
synchronization resulting from pmin or pmax updates STinit with the
synchronized value. If change step (st) is included in a query with
the notification band minimum or maximum then state synchronization
will occur whilst the resource value is in the notification band AND
the resource value differs from STinit by the change step.
4. Binding Table 4.7. Attribute Interactions
The binding table is a special resource that gives access to the Pmin, pmax, st, gt and lt may be present in the same query.
bindings on a endpoint. A binding table resource MUST support the Parameters are not defined at multiple prioritization levels.
Binding interface defined below. A profile SHOULD allow only one Instead, the server state machine generates a notification whenever
resource table per endpoint. any of the parameter conditions are met, after which it performs a
reset on all the requested conditions. State synchronization also
occurs only once even if there are multiple conditions being met at
the same time.
4.1. Binding Interface Description 5. Binding Table
This section defines a REST interface for Binding table resources. The Binding table is a special resource that gives access to the
The interface supports the link-format type. bindings on a endpoint. This section defines a REST interface for
Binding table resources. The Binding table resource MUST support the
Binding interface defined below. The interface supports the link-
format type.
The if= column defines the Interface Description (if=) attribute The if= column defines the Interface Description (if=) attribute
value to be used in the CoRE Link Format for a resource conforming to value to be used in the CoRE Link Format for a resource conforming to
that interface. When this value appears in the if= attribute of a that interface. When this value appears in the if= attribute of a
link, the resource MUST support the corresponding REST interface link, the resource MUST support the corresponding REST interface
described in this section. The resource MAY support additional described in this section. The resource MAY support additional
functionality, which is out of scope for this specification. functionality, which is out of scope for this specification.
Although this interface description is intended to be used with the Although this interface description is intended to be used with the
CoRE Link Format, it is applicable for use in any REST interface CoRE Link Format, it is applicable for use in any REST interface
definition. definition.
The Methods column defines the REST methods supported by the The Methods column defines the REST methods supported by the
interface, which are described in more detail below. interface, which are described in more detail below.
+-----------+----------+-------------------+-----------------+ +-----------+----------+-------------------+-----------------+
| Interface | if= | Methods | Content-Formats | | Interface | if= | Methods | Content-Formats |
+-----------+----------+-------------------+-----------------+ +-----------+----------+-------------------+-----------------+
| Binding | core.bnd | GET, POST, DELETE | link-format | | Binding | core.bnd | GET, POST, DELETE | link-format |
+-----------+----------+-------------------+-----------------+ +-----------+----------+-------------------+-----------------+
Table 3: Binding Interface Description Table 4: Binding Interface Description
The Binding interface is used to manipulate a binding table. A The Binding interface is used to manipulate a binding table. A
request with a POST method and a content format of application/link- request with a POST method and a content format of application/link-
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 deleted from the table empties the table. Individual entries may be deleted from the table
by specifying the resource path in a DELETE request. 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
skipping to change at page 11, line 34 skipping to change at page 11, line 23
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/light
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 6. Implementation Considerations
When resource interfaces following this specification are made
available over CoAP, the CoAP Observation mechanism [RFC7641] MAY be
used to observe any changes in a resource, and receive asynchronous
notifications as a result. In addition, a set of query string
parameters are defined here to allow a client to control how often a
client is interested in receiving notifications and how much a
resource value should change for the new representation to be
interesting. These query parameters are described in the following
table. A resource using an interface description defined in this
specification and marked as Observable in its link description SHOULD
support these observation parameters. The Change Step parameter can
only be supported on resources with an atomic numeric value.
These query parameters MUST be treated as resources that are read
using GET and updated using PUT, and MUST NOT be included in the
Observe request. Multiple parameters MAY be updated at the same time
by including the values in the query string of a PUT. Before being
updated, these parameters have no default value.
+-------------------+------------------+------------------+
| Attribute Name | Parameter | Data Format |
+-------------------+------------------+------------------+
| Minimum Period | /{resource}?pmin | xsd:integer (>0) |
| | | |
| Maximum Period | /{resource}?pmax | xsd:integer (>0) |
| | | |
| Change Step | /{resource}?st | xsd:decimal (>0) |
| | | |
| Less Than | /{resource}?lt | xsd:decimal |
| | | |
| Greater Than | /{resource}?gt | xsd:decimal |
| | | |
| Notification Band | /{resource}?band | xsd:boolean |
+-------------------+------------------+------------------+
Table 4: Resource Observation Attribute Summary
Minimum Period: As per Section 3.3.2
Maximum Period: As per Section 3.3.3
Change Step: As per Section 3.3.4
Greater Than: As per Section 3.3.5 When using multiple resource bindings (e.g. multiple Observations of
resource) with different bands, consideration should be given to the
resolution of the resource value when setting sequential bands. For
example: Given BandA (Abmn=10, Bbmx=20) and BandB (Bbmn=21, Bbmx=30).
If the resource value returns an integer then notifications for
values between and inclusive of 10 and 30 will be triggered. Whereas
if the resolution is to one decimal point (0.1) then notifications
for values 20.1 to 20.9 will not be triggered.
Less Than: As per Section 3.3.6 The use of the notification band minimum and maximum allow for a
synchronization whenever a change in the resource value occurs.
Theoretically this could occur in-line with the server internal
sample period for the determining the resource value. Implementors
SHOULD consider the resolution needed before updating the resource,
e.g. updating the resource when a temperature sensor value changes by
0.001 degree versus 1 degree.
Notification Band: As per Section 3.3.7 7. Security Considerations
5. Security Considerations The initiation of a link binding can be delegated from a client to a
link state machine implementation, which can be an embedded client or
a configuration tool. Consequently, consideration has to be given to
what kinds of security credentials the the state machine needs to be
configured with, and what kinds of access control lists client
implementations should possess, so that transactions on creating link
bindings and handling error conditions can be processed by the state
machine.
An implementation of a client needs to be prepared to deal with An implementation of a client needs to be prepared to deal with
responses to a request that differ from what is specified in this responses to a request that differ from what is specified in this
specification. A server implementing what the client thinks is a specification. A server implementing what the client thinks is a
resource with one of these interface descriptions could return resource with one of these interface descriptions could return
malformed representations and response codes either by accident or malformed representations and response codes either by accident or
maliciously. A server sending maliciously malformed responses could maliciously. A server sending maliciously malformed responses could
attempt to take advantage of a poorly implemented client for example attempt to take advantage of a poorly implemented client for example
to crash the node or perform denial of service. to crash the node or perform denial of service.
6. IANA Considerations 8. IANA Considerations
6.1. Interface Description 8.1. Interface Description
The specification registers the "binding" CoRE interface description The specification registers the "binding" CoRE interface description
link target attribute value as per [RFC6690]. link target attribute value as per [RFC6690].
Attribute Value: core.binding Attribute Value: core.bnd
Description: The binding interface is used to manipulate a binding Description: The binding interface is used to manipulate a binding
table which describes the link bindings between source and table which describes the link bindings between source and
destination resources for the purposes of synchronizing their destination resources for the purposes of synchronizing their
content. content.
Reference: This specification. Note to RFC editor: please insert the Reference: This specification. Note to RFC editor: please insert the
RFC of this specification. RFC of this specification.
Notes: None Notes: None
6.2. Link Relation Type 8.2. Link Relation Type
This specification registers the new "boundto" link relation type as This specification registers the new "boundto" link relation type as
per [RFC5988]. per [RFC8288].
Relation Name: boundto Relation Name: boundto
Description: The purpose of a boundto relation type is to indicate Description: The purpose of a boundto relation type is to indicate
that there is a binding between a source resource and a that there is a binding between a source resource and a
destination resource for the purposes of synchronizing their destination resource for the purposes of synchronizing their
content. content.
Reference: This specification. Note to RFC editor: please insert Reference: This specification. Note to RFC editor: please insert
the RFC of this specification. the RFC of this specification.
Notes: None Notes: None
Application Data: None Application Data: None
7. Acknowledgements 9. Acknowledgements
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 10. Contributors
Matthieu Vial
Schneider-Electric
Grenoble
France
Phone: +33 (0)47657 6522
EMail: matthieu.vial@schneider-electric.com
11. Changelog
draft-ietf-core-dynlink-06
o Document restructure and refactoring into three main sections
o Clarifications on band usage
o Implementation considerations introduced
o Additional text on security considerations
draft-ietf-core-dynlink-05 draft-ietf-core-dynlink-05
o Addition of a band modifier for gt and lt, adapted from draft- o Addition of a band modifier for gt and lt, adapted from draft-
groves-core-obsattr groves-core-obsattr
o Removed statement prescribing gt MUST be greater than lt o Removed statement prescribing gt MUST be greater than lt
draft-ietf-core-dynlink-03 draft-ietf-core-dynlink-03
skipping to change at page 15, line 22 skipping to change at page 15, line 5
o This is a copy of draft-groves-core-dynlink-00 o This is a copy of draft-groves-core-dynlink-00
draft-groves-core-dynlink Draft Initial Version 00: draft-groves-core-dynlink Draft Initial Version 00:
o This initial version is based on the text regarding the dynamic o This initial version is based on the text regarding the dynamic
linking functionality in I.D.ietf-core-interfaces-05. linking functionality in I.D.ietf-core-interfaces-05.
o The WADL description has been dropped in favour of a thorough o The WADL description has been dropped in favour of a thorough
textual description of the REST API. textual description of the REST API.
9. References 12. References
9.1. Normative References 12.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC5988] Nottingham, M., "Web Linking", RFC 5988,
DOI 10.17487/RFC5988, October 2010,
<https://www.rfc-editor.org/info/rfc5988>.
[RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link
Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
<https://www.rfc-editor.org/info/rfc6690>. <https://www.rfc-editor.org/info/rfc6690>.
9.2. Informative References [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8288] Nottingham, M., "Web Linking", RFC 8288,
DOI 10.17487/RFC8288, October 2017,
<https://www.rfc-editor.org/info/rfc8288>.
12.2. Informative References
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252, Application Protocol (CoAP)", RFC 7252,
DOI 10.17487/RFC7252, June 2014, DOI 10.17487/RFC7252, June 2014,
<https://www.rfc-editor.org/info/rfc7252>. <https://www.rfc-editor.org/info/rfc7252>.
[RFC7641] Hartke, K., "Observing Resources in the Constrained [RFC7641] Hartke, K., "Observing Resources in the Constrained
Application Protocol (CoAP)", RFC 7641, Application Protocol (CoAP)", RFC 7641,
DOI 10.17487/RFC7641, September 2015, DOI 10.17487/RFC7641, September 2015,
<https://www.rfc-editor.org/info/rfc7641>. <https://www.rfc-editor.org/info/rfc7641>.
skipping to change at page 18, line 4 skipping to change at page 17, line 38
39 26 Cel | | Observe: 37 39 26 Cel | | Observe: 37
40 | | Payload: "26 Cel" 40 | | Payload: "26 Cel"
41 | | 41 | |
42 | | 42 | |
Figure 3: Client Registers and Receives one Notification of the Figure 3: Client Registers and Receives one Notification of the
Current State, one when pmax time expires and one of a new State when Current State, one when pmax time expires and one of a new State when
it passes through the greather than threshold of 25. it passes through the greather than threshold of 25.
Authors' Addresses Authors' Addresses
Zach Shelby Zach Shelby
ARM ARM
150 Rose Orchard Kidekuja 2
San Jose 95134 Vuokatti 88600
FINLAND FINLAND
Phone: +1-408-203-9434 Phone: +358407796297
Email: zach.shelby@arm.com Email: zach.shelby@arm.com
Matthieu Vial
Schneider-Electric
Grenoble
FRANCE
Phone: +33 (0)47657 6522
Email: matthieu.vial@schneider-electric.com
Michael Koster Michael Koster
SmartThings SmartThings
665 Clyde Avenue 665 Clyde Avenue
Mountain View 94043 Mountain View 94043
USA USA
Email: michael.koster@smartthings.com Email: michael.koster@smartthings.com
Christian Groves Christian Groves
Huawei
Australia Australia
Email: cngroves.std@gmail.com Email: cngroves.std@gmail.com
Jintao Zhu Jintao Zhu
Huawei Huawei
No.127 Jinye Road, Huawei Base, High-Tech Development District No.127 Jinye Road, Huawei Base, High-Tech Development District
Xi'an, Shaanxi Province Xi'an, Shaanxi Province
China China
 End of changes. 65 change blocks. 
227 lines changed or deleted 206 lines changed or added

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