< draft-hartke-t2trg-data-hub-03.txt   draft-hartke-t2trg-data-hub-04.txt >
Thing-to-Thing Research Group K. Hartke Thing-to-Thing Research Group K. Hartke
Internet-Draft Ericsson Internet-Draft Ericsson
Intended status: Experimental March 11, 2019 Intended status: Experimental July 8, 2019
Expires: September 12, 2019 Expires: January 9, 2020
Thing-to-Thing Data Hub Thing-to-Thing Data Hub
draft-hartke-t2trg-data-hub-03 draft-hartke-t2trg-data-hub-04
Abstract Abstract
The "Thing-to-Thing Data Hub" is a RESTful, hypermedia-driven Web The "Thing-to-Thing Data Hub" is a RESTful, hypermedia-driven Web
application that can be used in Thing-to-Thing communications to application that can be used in Thing-to-Thing communications to
share data items such as thing descriptions, configurations, resource share data items such as thing descriptions, configurations, resource
descriptions, or firmware updates at a central location. descriptions, or firmware updates at a central location.
Status of This Memo Status of This Memo
skipping to change at page 1, line 33 skipping to change at page 1, line 33
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 12, 2019. This Internet-Draft will expire on January 9, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 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 12 skipping to change at page 2, line 12
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3
2. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Interaction Model . . . . . . . . . . . . . . . . . . . . . . 5 3. Interaction Model . . . . . . . . . . . . . . . . . . . . . . 5
4. Security Considerations . . . . . . . . . . . . . . . . . . . 7 4. Security Considerations . . . . . . . . . . . . . . . . . . . 7
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.1. Normative References . . . . . . . . . . . . . . . . . . 7 6.1. Normative References . . . . . . . . . . . . . . . . . . 8
6.2. Informative References . . . . . . . . . . . . . . . . . 8 6.2. Informative References . . . . . . . . . . . . . . . . . 8
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 9 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 9
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
In Thing-to-Thing communication, there is often a need to share data In Thing-to-Thing communication, there is often a need to share data
items of common interest through a central location. For example, items of common interest through a central location. For example,
the Resource Directory [I-D.ietf-core-resource-directory] aggregates the Resource Directory [I-D.ietf-core-resource-directory] aggregates
descriptions of Web resources held on constrained nodes, which descriptions of Web resources held on constrained nodes, which
enables other nodes to easily discover these resources. Similarly, a enables other nodes to easily discover these resources; a Thing
Firmware Server [I-D.ietf-suit-architecture] stores stores firmware Directory [W3C.CR-wot-architecture-20190516] stores metadata of IoT
images and manifests, making this data available to deployed devices, devices, allowing clients to discover interaction affordances and
commissioning tools, and other services. supported protocol bindings of Things; and a Firmware Server
[I-D.ietf-suit-architecture] stores firmware images and manifests,
making this data available to deployed devices, commissioning tools,
and other services.
As more and more Thing-to-Thing applications are implemented, it As more and more Thing-to-Thing applications are implemented, it
becomes increasingly important being able to not only share resource becomes increasingly important being able to not only share resource
descriptions and firmware updates but also many other kinds of data, descriptions and firmware updates but also many other kinds of data,
such as default configurations for new devices, service locations, or such as default configurations for new devices, service locations, or
certificate revocation lists. Resource directories and firmware certificate revocation lists. Resource directories and firmware
servers are not a good fit for these kinds of data, as they're servers are not a good fit for these kinds of data, as they're
specialized to their use cases and generally not accepting any other specialized to their use cases and generally not accepting any other
kinds of data. And creating new, specialized applications for every kinds of data. And creating new, specialized applications for every
type of data is not practical in the long term. type of data is not practical in the long term.
skipping to change at page 3, line 32 skipping to change at page 3, line 32
Data items published to a data hub are exposed as resources. As Data items published to a data hub are exposed as resources. As
such, they can be observed for changes [RFC7641] over CoAP. This such, they can be observed for changes [RFC7641] over CoAP. This
allows clients to stay informed of information that other clients allows clients to stay informed of information that other clients
update over time. As a result, the data hub functions similar to update over time. As a result, the data hub functions similar to
a Publish-Subscribe Broker [I-D.ietf-core-coap-pubsub]. a Publish-Subscribe Broker [I-D.ietf-core-coap-pubsub].
o Evolvable o Evolvable
The key differentiator of the data hub compared to Resource The key differentiator of the data hub compared to Resource
Directory [I-D.ietf-core-resource-directory] and CoAP Publish- Directory [I-D.ietf-core-resource-directory] and CoAP Publish-
Subscribe Broker [I-D.ietf-core-coap-pubsub] is the evolvability Subscribe Broker [I-D.ietf-core-coap-pubsub] lies in the
-- the ability to respond effectively to the need for changes evolvability of the application -- the ability to respond
without negatively impacting existing and new clients. effectively to the need for changes without negatively impacting
existing and new clients.
Data hubs enable fine-grained evolvability by driving all Data hubs enable fine-grained evolvability by driving all
interactions by machine-understandable hypermedia elements. interactions by machine-understandable hypermedia elements.
Features can be added, changed or removed in a safe, backwards- Features can be added, changed or removed in a safe, backwards-
compatible way simply by updating the data hub representation to compatible way simply by updating the data hub representation to
expose appropriate links and forms. expose appropriate links and forms.
1.1. Notational Conventions 1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
skipping to change at page 4, line 11 skipping to change at page 4, line 11
Terms defined in this document appear in _cursive_ where they are Terms defined in this document appear in _cursive_ where they are
introduced. introduced.
2. Data Model 2. Data Model
The data model of the "Thing-to-Thing Data Hub" application consists The data model of the "Thing-to-Thing Data Hub" application consists
of three elements: the _data hub_ itself, a _data collection_, and a of three elements: the _data hub_ itself, a _data collection_, and a
number of _data items_ that have been shared (Figure 1). number of _data items_ that have been shared (Figure 1).
Data Hub Data Hub
+-----------------------------------------------+ +----------------------------------------------------------+
| ___ | | |
| Data / \ | | ___ |
| Collection \___/ | | Data / \ |
| | ___ | | Collection \___/ |
| |________/ \ Data Item | | \ |
| | \___/ | | \____________________ |
| | ___ | | \___ \___ \___ |
| |________/ \ Data Item | | / \ / \ ... / \ Data |
| | \___/ | | \___/ \___/ \___/ Items |
| | . | | |
| | . | | |
| | . | +----------------------------------------------------------+
| | ___ |
| |________/ \ Data Item |
| \___/ |
| |
+-----------------------------------------------+
Figure 1: A Data Collection with a Number of Shared Data Items Hosted Figure 1: A Data Collection with a Number of Shared Data Items Hosted
at a Data Hub at a Data Hub
Data Hub Data Hub
A data hub is a Web application running on a Web server. It hosts A data hub is a Web application running on a Web server that hosts
the data collection and the data items. the data collection and the data items.
Data Collection Data Collection
A data collection is a collection resource that contains the data A data collection is a collection resource that contains the data
items. items.
Representations of data collections MUST have the "application/ Representations of data collections MUST have the "application/
coral+cbor" or "text/coral" media type [I-D.hartke-t2trg-coral]. coral+cbor" media type [I-D.hartke-t2trg-coral]. The
The representations primarily consist of links to the data items, representations consist primarily of links to the data items.
using the "item" link relation type [RFC6573]. To reduce the These links have the <http://www.iana.org/assignments/relation/
number of round-trips, the representations MAY also embed item> link relation type [RFC6573]. To reduce the number of
(complete or partial) representations of the data items. Forms round-trips, the representations MAY also embed (complete or
contained in the representation enable interactions with the data partial) representations of the data items. Forms contained in
collection and the data items, as detailed in the following the representation enable interactions with the data collection
sections. The representations MAY additionally contain other and the data items, as detailed in the following sections. The
links and forms that are not described in this document, such as a representations MAY additionally contain other links and forms
link with the "alternate" link relation type that are not described in this document, such as a link with the
[W3C.REC-html52-20171214] that references an alternate <http://www.iana.org/assignments/relation/alternate> link relation
type [W3C.REC-html52-20171214] that references an alternate
representation of the data collection resource. representation of the data collection resource.
In this version of this document, a data hub is defined to have a In this version of this document, a data hub is defined to have a
depth of only one level. That is, all data item resources are depth of only one level. That is, all data item resources are
organized directly under the top-level data collection resource. organized directly under the top-level data collection resource.
This could be extended to multiple levels in a future version. This could be extended to multiple levels in a future version.
Data Item Data Item
A data item is a resource that is a member of the data collection A data item is a resource that is a member of the data collection
resource. resource.
Data item representations can have any media type. However, a Data item representations can have any media type. However, a
data collection MAY restrict the media types it accepts for data collection MAY restrict the media types it accepts for
publication. In this case, the form in the representation of the publication. In this case, the form in the representation of the
data collection for creating data items MUST list the acceptable data collection for creating data items MUST list the acceptable
media types using form fields with the name <urn:TBD1#accept>. media types using form fields of type <http://coreapps.org/
coap#accept>.
The representations of data items MAY link back to the data The representations of data items MAY link back to the data
collection resource using the "collection" link relation type collection resource using the
[RFC6573]. <http://www.iana.org/assignments/relation/collection> link
relation type [RFC6573].
3. Interaction Model 3. Interaction Model
The interaction model consists of eight potential interactions with a The interaction model consists of eight potential interactions with a
data hub: discovering and reading the data collection, and creating, data hub: discovering and reading the data collection, and creating,
reading, observing, updating, deleting, and finding shared data items reading, observing, updating, deleting, and finding shared data items
in the data collection. in the data collection.
Discovering a Data Hub Discovering a Data Hub
In this version of this document, clients are assumed to be pre- In this version of this document, clients are assumed to be pre-
configured with a link to a data collection at a data hub. configured with an entry-point IRI for a data collection at a data
hub.
Reading a Collection Reading a Collection
A client can retrieve a representation of a data collection by A client can retrieve a representation of a data collection by
following the pre-configured link. As described above, the dereferencing the entry-point IRI. As described above, the
representation of the data collection includes links to (and, representation of the data collection includes links to (and,
optionally, representations of) the data items in the data optionally, representations of) the data items in the data
collection. The representation of the data collection also collection. The representation of the data collection also
includes forms for creating, updating, deleting, and finding data includes forms for creating, updating, deleting, and finding data
items. items.
Creating an Item Creating an Item
The representation of a data collection MAY contain a form with The representation of a data collection MAY contain a form with
the <urn:TBD1#create> operation type. Submitting this form with a the <http://coreapps.org/collections#create> operation type.
representation in one of the acceptable media types creates a new Submitting this form with a representation in one of the
data item in the data collection. The acceptable media types are acceptable media types creates a new data item in the data
indicated by <urn:TBD1#accept> form fields. collection. The acceptable media types are indicated by form
fields of type <http://coreapps.org/coap#accept>.
Implementations of this version of this document MUST offer the Implementations of this version of this document MUST use the
POST method [RFC7252] in the form. On success, the location of method implied by the <http://coreapps.org/collections#create>
the created data item MUST be conveyed in a 2.01 (Created) operation type, i.e., the POST method [RFC7252]. A form
response using the Location-Path and Location-Query options indicating different a method MUST be ignored.
[RFC7252].
On success, the location of the created data item MUST be conveyed
in a 2.01 (Created) response using the Location-Path and Location-
Query options [RFC7252].
Reading an Item Reading an Item
A client can retrieve a representation of a data item by following A client can retrieve a representation of a data item by following
a link with the <http://www.iana.org/assignments/relation/item> a link with the <http://www.iana.org/assignments/relation/item>
link relation type in the representation of the data collection. link relation type in the representation of the data collection.
Observing an Item Observing an Item
A client can observe a data item by following a link with the A client can observe a data item by following a link with the
<http://www.iana.org/assignments/relation/item> link relation type <http://www.iana.org/assignments/relation/item> link relation type
in the representation of the data collection and observing the in the representation of the data collection and observing the
target resource as specified in RFC 7641 [RFC7641]. target resource as specified in RFC 7641 [RFC7641].
Updating an Item Updating an Item
For each data item in a data collection, the representation of the For each data item in a data collection, the representation of the
data collection MAY include a form with the <urn:TBD1#update> data collection MAY include a form with the <http://coreapps.org/
operation type nested within the link to the data item. base#update> operation type nested within the link to the data
Submitting this form updates the data item to the submitted item. Submitting this form updates the data item to the submitted
representation. representation.
Implementations of this version of this document MUST offer the Implementations of this version of this document MUST use the
PUT method [RFC7252] in the form. method implied by the <http://coreapps.org/base#update> operation
type, i.e., the PUT method [RFC7252]. A form indicating different
a method MUST be ignored.
On success, a 2.04 (Changed) response is returned.
Deleting an Item Deleting an Item
For each data item in a data collection, the representation of the For each data item in a data collection, the representation of the
data collection MAY include a form with the <urn:TBD1#delete> data collection MAY include a form with the <http://coreapps.org/
operation type nested within the link to the data item. collections#delete> operation type nested within the link to the
Submitting this form deletes the data item from the data data item. Submitting this form deletes the data item from the
collection. data collection.
Implementations of this version of this document MUST offer the Implementations of this version of this document MUST use the
DELETE method [RFC7252] in the form. method implied by the <http://coreapps.org/collections#delete>
operation type, i.e., the DELETE method [RFC7252]. A form
indicating different a method MUST be ignored.
On success, a 2.02 (Deleted) response is returned.
Searching for Items Searching for Items
The representation of a data collection MAY contain a form with The representation of a data collection MAY contain a form with
the <urn:TBD1#search> operation type. This form can be used to the <http://coreapps.org/base#search> operation type. This form
find data items in the data collection. Submitting this form with can be used to find data items in the data collection. Submitting
a search query returns the subset of data items that match the this form with a search query returns the subset of data items
query. that match the query.
(TODO: Describe the representation format for search queries.) (TODO: Specify the representation format for search queries.)
Implementations of this version of this document MUST offer the Implementations of this version of this document MUST use the
FETCH method [RFC8132] in the form. method implied by the <http://coreapps.org/base#search> operation
type, i.e., the FETCH method [RFC8132]. A form indicating
different a method MUST be ignored.
On success, a 2.05 (Content) response is returned.
(TODO: Specify the representation format for the response.)
4. Security Considerations 4. Security Considerations
The data hub application relies on a Web transfer protocol like CoAP The data hub application relies on a Web transfer protocol like CoAP
to exchange representations in a CoRAL serialization format. See to exchange representations in a CoRAL serialization format. See
Section 11 of RFC 7252 [RFC7252] and Section 7 of RFC 7641 [RFC7641] Section 11 of RFC 7252 [RFC7252] and Section 7 of RFC 7641 [RFC7641]
for security considerations relating to CoAP. See Section 7 of RFC for security considerations relating to CoAP. See Section 7 of RFC
XXXX [I-D.hartke-t2trg-coral] for security considerations relating to XXXX [I-D.hartke-t2trg-coral] for security considerations relating to
CoRAL. CoRAL.
skipping to change at page 7, line 47 skipping to change at page 8, line 18
5. IANA Considerations 5. IANA Considerations
This document has no IANA actions. This document has no IANA actions.
6. References 6. References
6.1. Normative References 6.1. Normative References
[I-D.hartke-t2trg-coral] [I-D.hartke-t2trg-coral]
Hartke, K., "The Constrained RESTful Application Language Hartke, K., "The Constrained RESTful Application Language
(CoRAL)", draft-hartke-t2trg-coral-08 (work in progress), (CoRAL)", draft-hartke-t2trg-coral-09 (work in progress),
March 2019. July 2019.
[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>.
[RFC6573] Amundsen, M., "The Item and Collection Link Relations", [RFC6573] Amundsen, M., "The Item and Collection Link Relations",
RFC 6573, DOI 10.17487/RFC6573, April 2012, RFC 6573, DOI 10.17487/RFC6573, April 2012,
<https://www.rfc-editor.org/info/rfc6573>. <https://www.rfc-editor.org/info/rfc6573>.
skipping to change at page 8, line 34 skipping to change at page 8, line 50
[RFC8132] van der Stok, P., Bormann, C., and A. Sehgal, "PATCH and [RFC8132] van der Stok, P., Bormann, C., and A. Sehgal, "PATCH and
FETCH Methods for the Constrained Application Protocol FETCH Methods for the Constrained Application Protocol
(CoAP)", RFC 8132, DOI 10.17487/RFC8132, April 2017, (CoAP)", RFC 8132, DOI 10.17487/RFC8132, April 2017,
<https://www.rfc-editor.org/info/rfc8132>. <https://www.rfc-editor.org/info/rfc8132>.
6.2. Informative References 6.2. Informative References
[I-D.ietf-core-coap-pubsub] [I-D.ietf-core-coap-pubsub]
Koster, M., Keranen, A., and J. Jimenez, "Publish- Koster, M., Keranen, A., and J. Jimenez, "Publish-
Subscribe Broker for the Constrained Application Protocol Subscribe Broker for the Constrained Application Protocol
(CoAP)", draft-ietf-core-coap-pubsub-06 (work in (CoAP)", draft-ietf-core-coap-pubsub-08 (work in
progress), January 2019. progress), March 2019.
[I-D.ietf-core-resource-directory] [I-D.ietf-core-resource-directory]
Shelby, Z., Koster, M., Bormann, C., Stok, P., and C. Shelby, Z., Koster, M., Bormann, C., Stok, P., and C.
Amsuess, "CoRE Resource Directory", draft-ietf-core- Amsuess, "CoRE Resource Directory", draft-ietf-core-
resource-directory-19 (work in progress), January 2019. resource-directory-22 (work in progress), July 2019.
[I-D.ietf-suit-architecture] [I-D.ietf-suit-architecture]
Moran, B., Meriac, M., Tschofenig, H., and D. Brown, "A Moran, B., Meriac, M., Tschofenig, H., and D. Brown, "A
Firmware Update Architecture for Internet of Things Firmware Update Architecture for Internet of Things
Devices", draft-ietf-suit-architecture-02 (work in Devices", draft-ietf-suit-architecture-05 (work in
progress), January 2019. progress), April 2019.
[I-D.ietf-suit-information-model] [I-D.ietf-suit-information-model]
Moran, B., Tschofenig, H., and H. Birkholz, "Firmware Moran, B., Tschofenig, H., and H. Birkholz, "Firmware
Updates for Internet of Things Devices - An Information Updates for Internet of Things Devices - An Information
Model for Manifests", draft-ietf-suit-information-model-02 Model for Manifests", draft-ietf-suit-information-model-02
(work in progress), January 2019. (work in progress), January 2019.
[RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for
Constrained-Node Networks", RFC 7228, Constrained-Node Networks", RFC 7228,
DOI 10.17487/RFC7228, May 2014, DOI 10.17487/RFC7228, May 2014,
<https://www.rfc-editor.org/info/rfc7228>. <https://www.rfc-editor.org/info/rfc7228>.
[W3C.CR-wot-architecture-20190516]
Kovatsch, M., Matsukura, R., Lagally, M., Kawaguchi, T.,
Toumura, K., and K. Kajimoto, "Web of Things (WoT)
Architecture", World Wide Web Consortium Candidate
Recommendation CR-wot-architecture-20190516, May 2019,
<https://www.w3.org/TR/2019/CR-wot-architecture-20190516>.
[W3C.REC-html52-20171214] [W3C.REC-html52-20171214]
Faulkner, S., Eicholz, A., Leithead, T., Danilo, A., and Faulkner, S., Eicholz, A., Leithead, T., Danilo, A., and
S. Moon, "HTML 5.2", World Wide Web Consortium S. Moon, "HTML 5.2", World Wide Web Consortium
Recommendation REC-html52-20171214, December 2017, Recommendation REC-html52-20171214, December 2017,
<https://www.w3.org/TR/2017/REC-html52-20171214>. <https://www.w3.org/TR/2017/REC-html52-20171214>.
Acknowledgements Acknowledgements
Thanks to Christian Amsuess and Jaime Jimenez for helpful comments Thanks to Christian Amsuess and Jaime Jimenez for helpful comments
and discussions that have shaped the document. and discussions that have shaped the document.
 End of changes. 28 change blocks. 
84 lines changed or deleted 113 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/