RESTful Design for Internet of Things Systems
draft-irtf-t2trg-rest-iot-07
Network Working Group A. Keranen
Internet-Draft Ericsson
Intended status: Informational M. Kovatsch
Expires: 26 August 2021 Huawei Technologies
K. Hartke
Ericsson
22 February 2021
RESTful Design for Internet of Things Systems
draft-irtf-t2trg-rest-iot-07
Abstract
This document gives guidance for designing Internet of Things (IoT)
systems that follow the principles of the Representational State
Transfer (REST) architectural style. This document is a product of
the IRTF Thing-to-Thing Research Group (T2TRG).
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 26 August 2021.
Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved.
Keranen, et al. Expires 26 August 2021 [Page 1]
Internet-Draft RESTful Design for IoT Systems February 2021
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1. Architecture . . . . . . . . . . . . . . . . . . . . . . 8
3.2. System design . . . . . . . . . . . . . . . . . . . . . . 9
3.3. Uniform Resource Identifiers (URIs) . . . . . . . . . . . 10
3.4. Representations . . . . . . . . . . . . . . . . . . . . . 12
3.5. HTTP/CoAP Methods . . . . . . . . . . . . . . . . . . . . 13
3.5.1. GET . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.2. POST . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.3. PUT . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.4. DELETE . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.5. FETCH . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5.6. PATCH . . . . . . . . . . . . . . . . . . . . . . . . 15
3.6. HTTP/CoAP Status/Response Codes . . . . . . . . . . . . . 15
4. REST Constraints . . . . . . . . . . . . . . . . . . . . . . 16
4.1. Client-Server . . . . . . . . . . . . . . . . . . . . . . 16
4.2. Stateless . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3. Cache . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.4. Uniform Interface . . . . . . . . . . . . . . . . . . . . 18
4.5. Layered System . . . . . . . . . . . . . . . . . . . . . 19
4.6. Code-on-Demand . . . . . . . . . . . . . . . . . . . . . 19
5. Hypermedia-driven Applications . . . . . . . . . . . . . . . 20
5.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 20
5.2. Knowledge . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3. Interaction . . . . . . . . . . . . . . . . . . . . . . . 21
5.4. Hypermedia-driven Design Guidance . . . . . . . . . . . . 22
6. Design Patterns . . . . . . . . . . . . . . . . . . . . . . . 22
6.1. Collections . . . . . . . . . . . . . . . . . . . . . . . 22
6.2. Calling a Procedure . . . . . . . . . . . . . . . . . . . 23
6.2.1. Instantly Returning Procedures . . . . . . . . . . . 23
6.2.2. Long-running Procedures . . . . . . . . . . . . . . . 23
6.2.3. Conversion . . . . . . . . . . . . . . . . . . . . . 24
6.2.4. Events as State . . . . . . . . . . . . . . . . . . . 24
6.3. Server Push . . . . . . . . . . . . . . . . . . . . . . . 25
Show full document text