oneM2M : Protocol Binding
Jun-Hawn Huh
ijhhuh@mobile.re.kr
Mobile Networking and Computing Lab.
Dept. of Electronics, Electrical and Computer Science and Engineering
1
INDEX
oneM2M : Protocol BInding
This presentation is about the protocol specific
part of communication protocol used by oneM2M
compliant systems as ‘ MQTT, HTTP, CoAP
binding ’
1 Introduction : Meaning of Binding
2
3 oneM2M : Primitive
4 oneM2M : Binding Function
5
2
Overview
oneM2M : Binding protocol
▪︎ binding with HTTP
▪︎ binding with CoAP
▪︎ binding with MQTT
Introduction :
Meaning of Binding
Binding / Bridging
Binding : Binding may refer to persons or
places with naming from a variety of origins, or
to the concept of bridging or holding two or
more separate things together.
Different Shape
=
3
Resource Exchange
= Different Interface
Introduction :
oneM2M _Meaning of Binding
oneM2M
: Its aim is to develop technical specifications for a
common M2M Service Layer that can be
embedded within various hardware and software
to connect the wide range of devices worldwide
with M2M application servers.
oneM2M World
HTTP
World
MQTT
World
CoAP
World
Binding
4
Application
/ Service Layer
Transport Layer
Network Layer
DataLink Layer
PHY Layer
application
oneM2M Service
HTTP
TCP
IPv6
IEEE
802.15.4
Bluetooth4.0
LowEnergy
3GPP
application application
MQTT CoAP
TCP/UDP
ZigBee
6LoWPAN
RPL
Overview : Where is oneM2M ?
5
Wi-Fi
CSE(Common Service Entity)
CSFs(Common Service Function)
oneM2M procedure
Overview : oneM2M_Composition
of CSE( Common Service Entity )
Manipulation of oneM2M resource
OneM2M : primitive
<Method>
Create
Read
Update
Delete
Notify
Mca Mcc Mcn
6

Application and
Service Laye
Management

Device
Management

Communication
Management /
Delivery Handling
 and more …
<Common Service functions >
reference point
: provide API
oneM2M
: Primitive
Primitive
- A control part, which contains parameters specifying the processing of the primitive
- An optional content part, which represents resource data, either the complete
resource or only part of resource (i.e. values of one or more resource attributes ) in
the partial addressing case.
7
Content part
Control part
Primitive
< Request Primitive Parameters > < Response Primitive Parameters >
oneM2M
: Binding Function
8
Primitive
other protocols message
Binding Function ()
oneM2M : Protocol Binding
Purpose
1 HTTP Protocol 2 MQTT Protocol
3 CoAP Protocol 4 Future ETC..
- Websocket
- etc
9
- Web transfer protocol.
- Compose of request & response
- One of the protocol implementation
RESTful architecture
- A lightweight messaging protocol for small
sensors and mobile devices,
- optimized for high-latency or unreliable networks
- web transfer protocol for use with
constrained nodes and constrained
networks
- designed to easily translate to HTTP
for simplified integration with the
web
GET /site/firstPoint?user=admin HTTP/1.1
Host: http://siteMap.com
Accept : Text/html
Content-Length : 65
<xml>
<content>
<xPoint>3</xPoint>
<yPoint>5</yPoint>
</content>
</xml>
oneM2M : Protocol Binding
: binding with HTTP
- Binding oneM2M Protocol primitive types to HTTP method.
- Binding oneM2M response status codes(successful/unsuccessful) to HTTP
response codes.
- Binding oneM2M RESTful resources to HTTP resources.
HTTP 1.1 Message
TS-0009 Scope
Status Line
HTTP 1.1 Overview
version status code
HTTP/1.1 200 OK
Date : Mon, 20 Nov 2015 12:00:10 GMT
Server: Apache/1.3.0 (Unix)
Last-Modified: Mon 22 2015 …
Content-Length : 6821
Content-Type : Text/html
<xml>
……….
</xml>
Request Line
Header Field
Body Message
각 라인에 대한 간단한 설명.+ request 메시지도...

Query string
oneM2M : Protocol Binding
: binding with HTTP
11
oneM2M Prameter Mapping HTTP Element
Exist in
Request &
Response
primitive type n/a
To Request-Target
From From (header)
Request Identifier
Originating TimeStamp
Result Expiration Timestamp
Event Category
(new extension headers)
Content Message-body
Exist only
Request
Operation Method (POST/GET/PUT/DELETE)
ResponseType Content-Type (header)
Name
Request Expiration Timestamp
Operation Execution Time
Response Type
Result Persistence
Result Content
Delivery Aggregation
Group Request Identifier
Filter Criteria
Discovery Result Type
Query-String
Exist only
Response
Response Status Code (new extension header)
Mandatory Conditional OptionalETC
oneM2M Type HTTP Method
Create POST
Retrieve GET
Update PUT
Delete DELETE
Notify POST
Example
12
oneM2M : Protocol Binding
: binding with HTTP _ Example
13
- Binding oneM2M primitives to CoAP messages
- Binding oneM2M Response Status Codes to CoAP Response Codes
- Defining behaviour of a CoAp Client and Server depending on oneM2M
parameter
CoAP message
TS-0008 Scope
oneM2M : Protocol Binding
: binding with CoAP
0 1 2 3
Ver T TKL Code Message ID
Token( if any, TKL bytes )
Options (if any ) …
Payload (if any)…
CoAP overview
Type : message Type( Confirmable, NonConfirmable…)
Token
Code : include Method
oneM2M Type CoAP Method
Create POST
Retrieve GET
Update PUT
Delete DELETE
Notify POST
14
oneM2M : Protocol Binding
: binding with CoAP
Mandatory Conditional OptionalETC
oneM2M Prameter Mapping CoAP Element
pointOfAccess Uri-Host & Port
To Uri-Path
ResourceType Uri-Query( include Response Type, FilterCriteria….)
Request Identifier Token
From
Name
Originating TimeStamp
Result Expiration Timestamp
Event Category
…(Etc Option)…
(CoAP Option)
Content Payload
Operation Method (POST/GET/PUT/DELETE)
Response Status Code CoAp Response Status Code
Example
15
oneM2M : Protocol Binding
: binding with CoAP _ Example
< oneM2M CoAP binding example - AE Registration>
16
- How a CSE or AE connects to MQTT
- How an Originator( CSE or AE ) formulates a Request as an MQTT messages,
and transmits it to its intended Receiver
- How a Receiver listen or incoming Requests.
- How that Receiver can formulate and transmit a Response.
TS-0010 Scope
oneM2M : Protocol Binding
: binding with MQTT
< Message format of MQTT Control Packet >
MQTT overview
MQTT message
Packet type
Flags
Packet length
Topic
Content
17
oneM2M : Protocol Binding
: binding with MQTT
< oneM2M , MQTT binding example - request >
< oneM2M , MQTT binding example - response >
123
/oneM2M/req/ <to>
/oneM2M/res/ <from>
oneM2M request primitive
oneM2M response primitive
<->
<->
CSE-ID
or
AE-ID( )
other
primitive
prameter
is in here!
( )
< Message format of MQTT Control Packet >
To or From
paramer
is in here!
( )
Example
18
oneM2M : Protocol Binding
: binding with MQTT _ Example
< Initiating Process in MQTT binding >
< Request/Response message delivery over MQTT >
Summary
19
❖ oneM2M CSE(Common Service Entity) binding with application layer
protocol HTTP, CoAP, MQTT
• but i think oneM2M out of consideration about each protocols
characteristics
❖ Study about how translate oneM2M primitive to other protocols
message
Thank you
20
Extra Page
21
oneM2M : Protocol Binding
: binding with HTTP
- Binding oneM2M Protocol primitive types to HTTP method.
- Binding oneM2M response status codes(successful/unsuccessful) to HTTP
response codes.
- Binding oneM2M RESTful resources to HTTP resources.
HTTP 1.1 Message
TS-0009 Scope
HTTP 1.1 Overview
0 1 2 3
method Sp URL Sp Version Cr if
Header field name : value Cr If
:
Header field name : value Cr If
Cr If
Entity Body
Status Line
Header Line
0 1 2 3
Version Sp Status Code Sp Phrase Cr if
Header field name : value Cr If
:
Header field name : value Cr If
Cr If
Entity Body
Status Line
Header Line
23
❖ MQTT server co-located within a node
oneM2M : Protocol Binding
: binding with MQTT
_ Scenarios depending on location
< MQTT server independently located scenario >
24
❖ MQTT server located independently from nodes
oneM2M : Protocol Binding
: binding with MQTT
_ Scenarios depending on location (1)
< MQTT server co-located scenario >
25
oneM2M : Protocol Binding
: binding with CoAP _ Example
< CoAP mapping for nonBlocking Synchronous Access>
26
oneM2M : Protocol Binding
: binding with CoAP _ Example
< CoAP mapping for nonBlocking Asynchronous Access>
27
oneM2M : Protocol Binding
: binding with CoAP _ Example
< CoAP mapping for Blocking Access>
oneM2M
: Primitive detail
Request Primitive
28
Mandatory /
Conditioanl
Optional Optional
To Role Result Persistence
From Name Request Identifier
Operation
Originating
Timestamp
Operation
Execution Time
Content
Request Expiration
Timestamp
Event Category
ResourceType
Result Expiration
Timestamp
Delivery
Aggregation
Response Type
Group Request
Identifier
Result Content Filter Criteria
Discovery Result
Type
oneM2M
: Primitive detail
Response Primitive
Mandatory /
Conditioanl
Optional
Response Code To
Request Identifier From
Content
Originating
Timestamp
Result Expiration
Timestamp
Event Category
Status Code

허준환 One m2m-protocol binding

  • 1.
    oneM2M : ProtocolBinding Jun-Hawn Huh ijhhuh@mobile.re.kr Mobile Networking and Computing Lab. Dept. of Electronics, Electrical and Computer Science and Engineering 1
  • 2.
    INDEX oneM2M : ProtocolBInding This presentation is about the protocol specific part of communication protocol used by oneM2M compliant systems as ‘ MQTT, HTTP, CoAP binding ’ 1 Introduction : Meaning of Binding 2 3 oneM2M : Primitive 4 oneM2M : Binding Function 5 2 Overview oneM2M : Binding protocol ▪︎ binding with HTTP ▪︎ binding with CoAP ▪︎ binding with MQTT
  • 3.
    Introduction : Meaning ofBinding Binding / Bridging Binding : Binding may refer to persons or places with naming from a variety of origins, or to the concept of bridging or holding two or more separate things together. Different Shape = 3 Resource Exchange = Different Interface
  • 4.
    Introduction : oneM2M _Meaningof Binding oneM2M : Its aim is to develop technical specifications for a common M2M Service Layer that can be embedded within various hardware and software to connect the wide range of devices worldwide with M2M application servers. oneM2M World HTTP World MQTT World CoAP World Binding 4
  • 5.
    Application / Service Layer TransportLayer Network Layer DataLink Layer PHY Layer application oneM2M Service HTTP TCP IPv6 IEEE 802.15.4 Bluetooth4.0 LowEnergy 3GPP application application MQTT CoAP TCP/UDP ZigBee 6LoWPAN RPL Overview : Where is oneM2M ? 5 Wi-Fi
  • 6.
    CSE(Common Service Entity) CSFs(CommonService Function) oneM2M procedure Overview : oneM2M_Composition of CSE( Common Service Entity ) Manipulation of oneM2M resource OneM2M : primitive <Method> Create Read Update Delete Notify Mca Mcc Mcn 6  Application and Service Laye Management  Device Management  Communication Management / Delivery Handling  and more … <Common Service functions > reference point : provide API
  • 7.
    oneM2M : Primitive Primitive - Acontrol part, which contains parameters specifying the processing of the primitive - An optional content part, which represents resource data, either the complete resource or only part of resource (i.e. values of one or more resource attributes ) in the partial addressing case. 7 Content part Control part Primitive < Request Primitive Parameters > < Response Primitive Parameters >
  • 8.
    oneM2M : Binding Function 8 Primitive otherprotocols message Binding Function ()
  • 9.
    oneM2M : ProtocolBinding Purpose 1 HTTP Protocol 2 MQTT Protocol 3 CoAP Protocol 4 Future ETC.. - Websocket - etc 9 - Web transfer protocol. - Compose of request & response - One of the protocol implementation RESTful architecture - A lightweight messaging protocol for small sensors and mobile devices, - optimized for high-latency or unreliable networks - web transfer protocol for use with constrained nodes and constrained networks - designed to easily translate to HTTP for simplified integration with the web
  • 10.
    GET /site/firstPoint?user=admin HTTP/1.1 Host:http://siteMap.com Accept : Text/html Content-Length : 65 <xml> <content> <xPoint>3</xPoint> <yPoint>5</yPoint> </content> </xml> oneM2M : Protocol Binding : binding with HTTP - Binding oneM2M Protocol primitive types to HTTP method. - Binding oneM2M response status codes(successful/unsuccessful) to HTTP response codes. - Binding oneM2M RESTful resources to HTTP resources. HTTP 1.1 Message TS-0009 Scope Status Line HTTP 1.1 Overview version status code HTTP/1.1 200 OK Date : Mon, 20 Nov 2015 12:00:10 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon 22 2015 … Content-Length : 6821 Content-Type : Text/html <xml> ………. </xml> Request Line Header Field Body Message 각 라인에 대한 간단한 설명.+ request 메시지도... Query string
  • 11.
    oneM2M : ProtocolBinding : binding with HTTP 11 oneM2M Prameter Mapping HTTP Element Exist in Request & Response primitive type n/a To Request-Target From From (header) Request Identifier Originating TimeStamp Result Expiration Timestamp Event Category (new extension headers) Content Message-body Exist only Request Operation Method (POST/GET/PUT/DELETE) ResponseType Content-Type (header) Name Request Expiration Timestamp Operation Execution Time Response Type Result Persistence Result Content Delivery Aggregation Group Request Identifier Filter Criteria Discovery Result Type Query-String Exist only Response Response Status Code (new extension header) Mandatory Conditional OptionalETC oneM2M Type HTTP Method Create POST Retrieve GET Update PUT Delete DELETE Notify POST
  • 12.
    Example 12 oneM2M : ProtocolBinding : binding with HTTP _ Example
  • 13.
    13 - Binding oneM2Mprimitives to CoAP messages - Binding oneM2M Response Status Codes to CoAP Response Codes - Defining behaviour of a CoAp Client and Server depending on oneM2M parameter CoAP message TS-0008 Scope oneM2M : Protocol Binding : binding with CoAP 0 1 2 3 Ver T TKL Code Message ID Token( if any, TKL bytes ) Options (if any ) … Payload (if any)… CoAP overview Type : message Type( Confirmable, NonConfirmable…) Token Code : include Method
  • 14.
    oneM2M Type CoAPMethod Create POST Retrieve GET Update PUT Delete DELETE Notify POST 14 oneM2M : Protocol Binding : binding with CoAP Mandatory Conditional OptionalETC oneM2M Prameter Mapping CoAP Element pointOfAccess Uri-Host & Port To Uri-Path ResourceType Uri-Query( include Response Type, FilterCriteria….) Request Identifier Token From Name Originating TimeStamp Result Expiration Timestamp Event Category …(Etc Option)… (CoAP Option) Content Payload Operation Method (POST/GET/PUT/DELETE) Response Status Code CoAp Response Status Code
  • 15.
    Example 15 oneM2M : ProtocolBinding : binding with CoAP _ Example < oneM2M CoAP binding example - AE Registration>
  • 16.
    16 - How aCSE or AE connects to MQTT - How an Originator( CSE or AE ) formulates a Request as an MQTT messages, and transmits it to its intended Receiver - How a Receiver listen or incoming Requests. - How that Receiver can formulate and transmit a Response. TS-0010 Scope oneM2M : Protocol Binding : binding with MQTT < Message format of MQTT Control Packet > MQTT overview MQTT message Packet type Flags Packet length Topic Content
  • 17.
    17 oneM2M : ProtocolBinding : binding with MQTT < oneM2M , MQTT binding example - request > < oneM2M , MQTT binding example - response > 123 /oneM2M/req/ <to> /oneM2M/res/ <from> oneM2M request primitive oneM2M response primitive <-> <-> CSE-ID or AE-ID( ) other primitive prameter is in here! ( ) < Message format of MQTT Control Packet > To or From paramer is in here! ( )
  • 18.
    Example 18 oneM2M : ProtocolBinding : binding with MQTT _ Example < Initiating Process in MQTT binding > < Request/Response message delivery over MQTT >
  • 19.
    Summary 19 ❖ oneM2M CSE(CommonService Entity) binding with application layer protocol HTTP, CoAP, MQTT • but i think oneM2M out of consideration about each protocols characteristics ❖ Study about how translate oneM2M primitive to other protocols message
  • 20.
  • 21.
  • 22.
    oneM2M : ProtocolBinding : binding with HTTP - Binding oneM2M Protocol primitive types to HTTP method. - Binding oneM2M response status codes(successful/unsuccessful) to HTTP response codes. - Binding oneM2M RESTful resources to HTTP resources. HTTP 1.1 Message TS-0009 Scope HTTP 1.1 Overview 0 1 2 3 method Sp URL Sp Version Cr if Header field name : value Cr If : Header field name : value Cr If Cr If Entity Body Status Line Header Line 0 1 2 3 Version Sp Status Code Sp Phrase Cr if Header field name : value Cr If : Header field name : value Cr If Cr If Entity Body Status Line Header Line
  • 23.
    23 ❖ MQTT serverco-located within a node oneM2M : Protocol Binding : binding with MQTT _ Scenarios depending on location < MQTT server independently located scenario >
  • 24.
    24 ❖ MQTT serverlocated independently from nodes oneM2M : Protocol Binding : binding with MQTT _ Scenarios depending on location (1) < MQTT server co-located scenario >
  • 25.
    25 oneM2M : ProtocolBinding : binding with CoAP _ Example < CoAP mapping for nonBlocking Synchronous Access>
  • 26.
    26 oneM2M : ProtocolBinding : binding with CoAP _ Example < CoAP mapping for nonBlocking Asynchronous Access>
  • 27.
    27 oneM2M : ProtocolBinding : binding with CoAP _ Example < CoAP mapping for Blocking Access>
  • 28.
    oneM2M : Primitive detail RequestPrimitive 28 Mandatory / Conditioanl Optional Optional To Role Result Persistence From Name Request Identifier Operation Originating Timestamp Operation Execution Time Content Request Expiration Timestamp Event Category ResourceType Result Expiration Timestamp Delivery Aggregation Response Type Group Request Identifier Result Content Filter Criteria Discovery Result Type
  • 29.
    oneM2M : Primitive detail ResponsePrimitive Mandatory / Conditioanl Optional Response Code To Request Identifier From Content Originating Timestamp Result Expiration Timestamp Event Category Status Code