Network Working Group D. Liu Internet-Draft Q. An Intended status: Experimental Alibaba Group Expires: January 7, 2017 July 6, 2016 Guidance Design of Architecture and Data Model for Internet of Things Systems draft-liu-t2trg-architecture-data-model-00 Abstract This document gives guidance for designing architecture and data model for Internet of Things (IoT) systems. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119] 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 http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on January 7, 2017. Copyright Notice Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect Liu & An Expires January 7, 2017 [Page 1] Internet-Draft ITS Scenario July 2016 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Guidance Design for IoT Architecture . . . . . . . . . . . . 2 3. Guidance design for IoT data model . . . . . . . . . . . . . 4 3.1. Data model design . . . . . . . . . . . . . . . . . . . . 4 3.2. Fileds in data model . . . . . . . . . . . . . . . . . . 5 3.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 7 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 7. Normative References . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 1. Introduction This document provides a guidance desgin for architecture and data model for Internet of Things (IoT). The architecture and data model can be applied to various kinds of IoT service interaction scenarios, like smart home, and independently of the network's underlying infrastructure and protocols. 2. Guidance Design for IoT Architecture Guidance design for IoT architecture is shown in figure 1. Liu & An Expires January 7, 2017 [Page 2] Internet-Draft ITS Scenario July 2016 preamble to the figure. +---------+ | User | | App | +---------+ | | +------------------------------+ | Cloud Platform | +------------+ | +Device Management |--------| Other | | +User Management | share | Platform | | +Device and User Binding | +------------+ | +Sharing with other platform | +------------------------------+ | | +-----------+ +----------+ | | +----------+ +----------+ | Terminal | | Gateway | | Device | | Device | +----------+ +----------+ | | +----+ +----+ | | +---------+ +---------+ | Child | | Child | | Device | | Device | +---------+ +---------+ Figure 1: Guidance Design for IoT Architecture Summary of the guidance design for IoT architecture o There is a centralized server that connects with devices, user application, and other vendor's platform. o The centralized server provides function of device management on terminal device, gateway device and child device, including device identification, device registration, device firmware update, etc. o The centralized server provides function of user management, including user identification, user profile management,etc. o The centralized server provides function of information sharing with other vendor's platform, including vendor identification, vendor device interoperability, vendor user interoperability, etc. Liu & An Expires January 7, 2017 [Page 3] Internet-Draft ITS Scenario July 2016 o The communication between server and user application, between server and other platform, between server and terminal device, and between server and gateway device, are based on TCP/IP o Child device could be constrained device that cannot support TCP/ IP stack. 3. Guidance design for IoT data model This section discusses the data model for IoT based on the architecture in Section 2. The data model can be used in the communication between server and user application, between server and other platform, between server and terminal device, and between server and gateway device. The default encoding schema for this data model is JSON or JSON-LD 3.1. Data model design The data model is defined in figure 2. Liu & An Expires January 7, 2017 [Page 4] Internet-Draft ITS Scenario July 2016 preamble to the figure. +---------+-------------+ | system | version | | +-------------+ | | signature | | +-------------+ | | timestamp | +---------+-------------+ | request | deviceID | | +-------------+ | | account | | +-------------+ | | token | | +-------------+ | | target | | +-------------+ | | rspID | +---------+-------------+ | method | +---------+-------------+ | params |:,| | | ...... | | |: | +---------+-------------+ | id | +-----------------------+ Figure 2: Data model 3.2. Fileds in data model The fileds defined in the data model are summarized in Table 1 below: preamble to the figure. Liu & An Expires January 7, 2017 [Page 5] Internet-Draft ITS Scenario July 2016 +---------+---------+--------+----------------------+ | Name | Format | Length | Description | +---------+---------+--------+----------------------+ |version | String | 0-255 | Data model version | +---------+---------+--------+----------------------+ |signature| String | 32-255 | Signature value | +---------+---------+--------+----------------------+ |timestamp| String | 0-255 | Timestamp | +---------+---------+--------+----------------------+ |deviceID | String | 0-255 | Optional, required | | | | | when data is sent | | | | | by device | +---------+---------+--------+----------------------+ |account | String | 0-255 | Optional, required | | | | | when data is sent by | | | | | user application, or | | | | | server, or other | | | | | vendor's platform | +---------+---------+--------+----------------------+ |token | String | 0-255 | Optional, required | | | | | when data is sent to | | | | | server. The token is | | | | | assigend by server to| | | | | device, user, or | | | | | vendor platform | +---------+---------+--------+----------------------+ |target | String | 0-255 | Optional, required | | | | | when data is sent to | | | | | server, indicating | | | | | target destination | +---------+---------+--------+----------------------+ |rspID | String | 0-255 | Optional, required | | | | | when data is a | | | | | response to last | | | | | remote control | | | | | command data. The | | | | | value is set to last | | | | | command data's id | | | | | filed value | +---------+---------+--------+----------------------+ |method | String | 0-255 | Indicate the method | +---------+---------+--------+----------------------+ |params | String | 0-1023 | Attribute set | +---------+---------+--------+----------------------+ |id | String | 0-255 | message ID | +---------+---------+--------+----------------------+ Liu & An Expires January 7, 2017 [Page 6] Internet-Draft ITS Scenario July 2016 Table 1: Data model fields 3.3. Examples Figure 3 shows one example that device posts data to server. preamble to the figure. { "system":{ "version":"1.0", "signature":"5eeff300d71f13610f283d36b4f16ffa", "timestamp":"1407543671" }, "request":{ "deviceID":"35595459BDD240E029C40033C4B69F16", "token":"zzzxxxyyzzmmmssssiiiiooppppqqq", "target":"user00000001", "rspID":"100" }, "method":"postDeviceData", "params":{ "temperature":{ "value":"34.8", "when":"1404443289" }, "humidity":{ "value":"45", "when":"1404443359" } }, "id":"91" } Figure 3: One example that device posts data to server Figure 4 shows one example that user application requests server to get device status. Liu & An Expires January 7, 2017 [Page 7] Internet-Draft ITS Scenario July 2016 preamble to the figure. { "system":{ "version":"1.0", "signature":"3grff300d71f13610f283d36b4f16ffa", "timestamp":"1404443389" }, "request":{ "token":"xy87799923eerueirueio", "target":"29C40033C4B69F1635595459BDD240E0" }, "method":"getDeviceStatus", "params":{ "uuid": "35595459BDD240E029C40033C4B69F16", "attrSet":[ "temp", "humidity" ] }, "id":"100" } Figure 4: One example that user application requests server to get device status 4. IANA Considerations This document makes no request of IANA. 5. Security Considerations TBD 6. Acknowledgements TBD 7. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . Liu & An Expires January 7, 2017 [Page 8] Internet-Draft ITS Scenario July 2016 Authors' Addresses Dapeng Liu Alibaba Group Beijing Beijing Phone: +86-1391788933 Email: maxpassion@gmail.com Qing An Alibaba Group Beijing Beijing Phone: +86-13810495624 Email: anqing.aq@alibaba-inc.com Liu & An Expires January 7, 2017 [Page 9]