SlideShare a Scribd company logo
Hypermedia
for Machine APIs:
An Example
Michael J Koster
August 15, 2015
• Application Semantics and Discovery
– Describes intrinsic resources and controls at the application level using
physical concepts like temperature, light intensity
– Enables applications to discover the proper resources to link to
• API State Machine Automation
– Enables Common Web Client to interact with any device or virtual
entity, regardless of schema or model structure, or protocol used
– Hypermedia controls work like HTTP links and forms, but for functional
abstractions of physical world items like on/off light switch controls
• Context Integration
– Contextual information like installed location, what is being measured
and controlled, also used in application resource discovery
• Using Web Linking, Relations, and Attributes
Hypermedia is Metadata
Web of Things Example
Hypermedia Web Applications
IPSO Objects + Hypermedia Annotation
OMA LWM2M
CoAP HTTP
6LowPAN IPV4/IPV6
MCU – 16KiB RAM MPU
802.15.4 WiFi, Ethernet
Hardware
HW Network
Routing
Application Protocol
API and Services
Data Models
Application
Web Server
• Thing Description models are high level abstractions for the
Actions, Events, and Properties of things
• Action, event, and property resources have defined bindings to
M2M APIs, either through common patterns or through
specialized interaction templates (like html forms)
• High level functional abstractions for controls (Actions in the
W3C thing model) map to machine operations at the (REST) API
level
• Example based on a set of controls for professional lighting
• Actions are mapped to operations on IPSO Lighting objects
(OnOff, Level, and Color actuators)
• Level control (Brightness) object is used as an example
Models and Bindings
Lighting Model - Control Actions
light
onOff
level
color
change
toggle
newState:
{enum:off,on}
HS
XY
temperature
change
step
move
targetValue:{units:%}
transitionTime
rate:{units:%/s}
stepSize
stop
transitionTime:{units:s}
change
step
move
targetValue:{units:K,range:2700-5500}
transitionTime
rate:{units:K/s}
stepSize
transitionTime:{units:s}
stop
light.onOff.change
{newState:on}
light.color.temperature.change
{targetValue:2900,transitionTime:10}
light.level.change
{targetValue:45,transitionTime:10}
thing actuators actions parameters application actions {parameters}
(colorspace)
IPSO Level Control – Resource Model
Example Resource Schema - IPSO
O
R
O
P
DT
O
LR
Object (1+)
Linked Object
Type=ObjLink
Resource
Operations
- GET, PUT, POST
- READ/WRITE/EXECUTE
Data Type
- Decimal, Integer, String,
Boolean, ObjLink
1
1+
1+
1+
1
Description => Protocol => Model
Protocol Binding
- name
- binding
- href
- datatype
- method
- mediatype
- expects
- returns
- statuscodes
Semantic Binding,
Thing Description
- Actions
- action
- binding
- datatype
- Events
- Subscribe
Bindings
- Properties
- Get/Set
Bindings
Resource
Model
Instances of
SchemaO
R
R
R
O
R
R
R
O
L
R
L
DT
Thing Description -TDL Fragment
{
“@context”: ”http://example.org/tdl/tdl.jsonld”,
“@type”: “thing”
{
“@context”: ”http://example.org/tdl/professionalLighting.jsonld”,
“@context”: ”http://schema.org/professionalLighting.jsonld”,
“_thing”:
{“type”:”light”},
“_actions”: {
“brightness”: {
“change”: {  indexed in context, reference by “light.brightness.change”
“parameters”: [
{“name”: “targetValue”:
“type”:”brightnessValueType”},  TDL abstract types
{“name”: “transitionTime”,
“type”: “timeValueType”},
“bindings”: [
{“type”: ”ipso+coap”,
“describedBy”: “protocols.ipso+coap#light.level.change”}]
} } }
} }
Binding for protocols.ipso+coap
“light”: {
“level”: {
“change”: {
“parameters”: [
{“name”: “targetValue”:
“datatype”:”decimal”,
“units”: “%”,
“range”: “0-100”},
{“name”: “transitionTime”,
“datatype”: “decimal”,
“units”: “s”} ],
“method”: ”post”,
“href”: “3001/0”,
“mediatype”: “application/senml+json”,
“expects”: {“template”: “{“e”:[
{“n”:“5001”,“v”:{targetValue}},
{“n”:“5002”,“v”:{transitionTime}}]}” },
“statusCodes”: [
{“code”: ”2.01”,
“status”: “success”},
{“code”: “4.04”,
“status” “failure”},
{“code”: “4.09”,
“status” “retry”} ]
} } }
Deployment with LWM2M Devices
Web Applications
Common Client
Constrained
Devices
Device Connector
Virtual Entity
Catalogs Brokers
Pub-SubDiscovery
M2M API
Pub-Sub
Hypermedia
Discovery
REST API
LWM2M
WoT Servient
• What do the hypermedia descriptions of events, actions, and
properties look like?
• What are the functional abstractions that will be used to
enable vertical specialization while still providing broad
interoperability?
• How does discovery integrate with API automation?
• What are the metadata constructs for connecting constrained
hypermedia to higher level abstractions?
• Prototype using constrained lighting objects with LWM2M and
IoT Toolkit open source python framework
• Reference WoT client using Node-RED + extensions
Questions and Follow On Work
Model-Based Information Architecture
ModelSchema
Web API
M2M API
Application
Physical Abstraction
Constrained Environments
Intrinsic Properties
Functional Abstractions
Instance of Schema
Compositional
Conceptual Abstraction
User Experience
Discovery
Autonomic Control
Hypermedia
Annotation
Templates
Code Generation
Gateway/Cloud API
Hypermedia Controls for
Events, Actions, Properties
Classes
Operations
Data Types
Construction
Annotation
Discovery
• Instance(s) of Schema(s) with annotation
• Enable composition of complex entities from simple ones
• Connect functional abstractions to concrete APIs
• Constructors for hypermedia controls
• Contain relations and attributes
– Provide a way to describe entities using semantic annotation
– Provide a structured way to introduce contextual annotation
• Can function as instance constructors for constrained devices,
e.g. server code generation
• Also provide for managed APIs and application code generation
Models
Deployment From Models
ModelSchema
Service Layer
Devices
Web Applications
Hypermedia
Code
Generation
Proxies, Web Servers,
Gateways, Catalogs
Embedded,
Mobile,
Local, Cloud
Connected and
Mobile Devices
Hypermedia-Capable Devices
Common Client
Semantic Binding
Protocol Binding
WoT Deployment Examples
Web Application
Common Client
WoT Device
Catalog Broker
Web Application
Common Client
WoT Device
Catalog
Pub-Sub
REST API
Discovery Discovery
WoT Thing to Thing Deployment
Control Application
Common Client
WoT Device
Catalog Broker
Pub-Sub
Discovery
WoT Device
WoT Device
REST
Orchestration
• Background
• Why Web to the Edge?
• CoAP
• OMA LWM2M
• IPSO Smart Objects
• Data model related tools and organizations
• References
Backup
Michael Koster – Current Work
• ARM
– IoT Architecture and Standards
– Application Level Interoperability
– Developer Enablement
• IETF
– Resource Directory
– CoRE Interfaces
– CoAP Pub-Sub
– T2TRG
• OMA LWM2M
– Peer-to-peer, firewall traversal, and M2M interface
• IPSO
– Smart Object Committee, Data Model and Schema
IoT Architecture – Problems to Solve
• Interoperability
– In the way in which software interacts with physical
resources
– Decouple IoT devices from the software that manages them
– Discovery, Management and Reporting, Security,
Authorization
• Scalability
– Large number of devices, users, interactions, connections
– Scale-less interaction
• Technology Reuse and Modularity
– Software, networks, protocols, data models
– Across vendors in a vertical application segment
– Across diverse vertical application segments
• Low Barrier to Innovation
– Anyone can participate and innovate
Internet/WWW Design Patterns
• Narrow Waist, endpoint oriented
– Innovation happens at the endpoints, enabled by common,
openly available network protocols (the narrow waist)
• Layered Protocols
– Common set of IP protocols (TCP, UDP) abstract the lower
communication layers
– Common Application Protocols (HTTP, REST) abstract
resources
• Uniform Addressing
– URIs and Hyperlinks point to resources
– IP Addresses, DNS names are globally unique
• Stateless Interaction
– Client-Server pattern
– Hypermedia As The Engine Of Application State
How Does it Apply to IoT?
• Internet Protocol (IP) on Constrained
Devices
• Machine to Machine (M2M) Application
Protocols
• Standard Object Models and Data Models
• Hypermedia for Machine APIs
IP for Constrained Environments
CoAP HTTP
6LowPAN IPV4/IPV6
MCU – 16KiB RAM MPU
802.15.4 WiFi, Ethernet
Hardware
HW Network
Routing
Application Protocol
CoAP Protocol
 Makes each device a
lightweight origin server that
exposes a REST API
 A CoAP endpoint may also
contain application client logic
 A CoAP endpoint can be both
client and server
 Peer to Peer interaction is
based on a duplex client-
server pattern
 Also supports asynchronous
notification, Pub-Sub pattern
RFC 6690 CoRE Link-Format
<4001/0/9002>;rt=“oma.lwm2m”;ct=50;obs=1
Resource Type
Content Type
Observability
Resource Discovery
See draft-ietf-core-resource-directory
• RFC 6690 CoRE Link Format
defines
– The link format media type
– Peer-to-peer discovery
• A directory approach is also useful
– Supports sleeping nodes
– No multicast traffic, longer battery life
– Remote lookup, hierarchical and
federated distribution
• CoRE Link Format is used in
Resource Directories
– Nodes register their resource links to an
RD
– Nodes refresh the RD periodically
– Nodes may unregister (remove) their RD
entry
Application
GET /rd-lookup/ep
</nodea/sensor/temp>
</nodeb/actuator/led>
Device Management and Application
Support
Application Software
IPSO Objects
OMA LWM2M
CoAP HTTP
6LowPAN IPV4/IPV6
MCU – 16KiB RAM MPU
802.15.4 WiFi, Ethernet
Hardware
HW Network
Routing
Application Protocol
API and Services
Data Models
Application
Web Server
OMA LWM2M Reference Architecture
 M2M Applications
 Application abstraction through
REST API
 Resource Discovery and Linking
 LWM2M Clients are Devices
 Device abstraction through CoAP
 LWM2M Clients are CoAP Servers
 Any IP network connection
 LWM2M Server
 CoAP Protocol persistent endpoint
 Supports Caching Proxy
 Resource Directory
 Gateway and Cloud deployable
OMA LWM2M Interfaces
• Bootstrap Interface
– Configure Servers & Keying
– Pre-Configured, Smart Card, or
Server Initiated Bootstrap
– CoAP REST API
• Registration Interface
– RFC6690 and Resource
Directory
• Management and Application
Interface Using Objects
– Device Management Objects
and Resources
– CoAP REST API
• Reporting Interface
– Object Instances and
Resources Report
– Asynchronous notification using
CoAP Observe
OMA LWM2M Object Model
• A Client has one or more Object
Instances
• An Object is a collection of Resources
• A Resource is an atomic piece of
information that can be Read, Written
or Executed
• Objects can have multiple instances
• Objects and Resources are identified
by 16-bit Integers
• Objects/Resources are accessed with
simple URIs:
/{Object ID}/{Object
Instance}/{Resource ID}
Example: /3/0/1
• Object Type=3 (Device)
• Instance=0
• Resource Type = 1 (Device Mfg.)
IPSO Smart Objects
• Plug and play data models between applications and
data sources
• Create a set of reusable objects and resources that
represent single points of interest and fundamental
concepts
– Temperature Sensor, On-Off Control Switch
– Current Value, Max Value, Min Value
• Make Objects and Resources Reusable across
application domains
• Build up models of complex things by composing
simple objects
– For example, an electric motor with temperature sensors,
rotation speed, power supply current, voltage, frequency,
vibration sensors
IPSO Smart Objects Support Modular
Internet Protocols
Application Software
IPSO Objects
LWM2M
CoAP HTTP
6LowPAN
/Thread
IPV4/IPV6
MCU – 16KiB
RAM
MPU
802.15.4 WiFi, Ethernet
Hardware
HW Network
Internet Protocol
Wire Protocol + REST
API – Data and Metadata
Data Models
Application
REST
Server
Device Management
Other IP
Based
Stacks:
MQTT,
XMPP, etc.
Non-IP
based
Transport -
BTLE
IPSO Smart Objects are based on
LWM2M Data Model
• REST API with a URI template
– 2 level Class Hierarchy and schema
– Objects, one or more instances
– Resources
• Reusable resource and object IDs
– Object ID determines gross concept
and object structure
– Resource ID determines what aspect
of the object is represented
– Semantic Consistency e.g.
Object=Temperature,
Resource=Current Value
– IDs are registered with the OMNA
• Data Types and Operations
– String, Decimal, Boolean, Time,
ObjLink
– Read, Write, Create, Delete, Execute,
Discover, Observe, Notify
3303/0/5700
Object ID, defines object type
Object Instance, one or more
Resource ID, defines resource type
3303 is Temperature
5700 is Current Value
3303/0/5700 refers to the current value
of temperature sensor instance 0
IPSO Smart Object Example
Semantic Annotation of Smart Objects
• Object annotation uses RFC 6690 links for associating additional
semantic descriptions with Smart Objects and Resources
• Can be used to add contextual metadata and dynamic link
relations
• Semantic connectors to web scale common data models
• Discovery by relation and attribute
– For example, using CoRE Resource Directory:
GET /rd-lookup?ep&rt=“urn:X-ipso:temperature”
Returns: </sensors/3303/0/5700>;obs;if=“urn:X-
ipso:sensor”;rt=“urn:X-
ipso:temperature”;ct=50;u=“ucum:degC”
Composite IPSO Smart Objects
• RESTful API Modeling Language (RAML) uses JSON Schema
• JSON Schema, JSON Hyper-schema
• Web API Description Language (WADL)
• XML Schema Definition language (XSD)
• URI Templates (RFC 6570)
• IETF CoRE Interfaces Function Set
• Schema.org – Vocabulary for RDFa, JSON-LD
• RESTdesc.org – uses Turtle (RDF based)
• Hypertext Application Language (HAL)
• Eclipse Vorto
• Hydra
• ALPS
• HAL
• Swagger
Modeling Tools and Frameworks
• XMPP – XEP-323, XEP-325
• Hypercat – Hypercat 3.0
• OneM2M – MAS
• Zigbee Alliance – ZCL-over-IP
• HGI - SDT
• IIC – Use Cases and Testbeds
• UPnP – Common Data
Model
• Cable Labs – Common Data
Model
Organizations and Initiatives
• W3C – WoT TF-TD, TF-DI
• OMA - GotAPI
• IETF – CoRE RD, Interfaces,
link-format
• IPSO – Smart Object
Guidelines
• IEEE – P2413
• OIC – SHP
• Allseen Alliance, Alljoyn
• Eclipse Foundation – Vorto,
IoT Backend
References
IPSO Smart Object Guideline
http://www.ipso-alliance.org/smart-object-guidelines
OMA LWM2M Specification
http://openmobilealliance.hs-sites.com/lightweight-m2m-
specification-from-oma
IETF CoAP and Related Specifications
CoAP (RFC 7252):
http://tools.ietf.org/html/rfc7252
CoRE Link-Format (RFC 6690):
http://tools.ietf.org/html/rfc6690
CoRE Resource Directory: http://tools.ietf.org/html/draft-ietf-
core-resource-directory
CoAP Community Site
http://coap.technology/

More Related Content

What's hot

A Modular Open Source Platform for IoT
A Modular Open Source Platform for IoTA Modular Open Source Platform for IoT
A Modular Open Source Platform for IoT
Michael Koster
 
Iottoolkit osiot
Iottoolkit osiotIottoolkit osiot
Iottoolkit osiot
Michael Koster
 
Object models for interoperability
Object models for interoperabilityObject models for interoperability
Object models for interoperability
Michael Koster
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminar
Michael Koster
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
Michael Koster
 
REST APIs for the Internet of Things
REST APIs for the Internet of ThingsREST APIs for the Internet of Things
REST APIs for the Internet of Things
Michael Koster
 
IP based standards for IoT
IP based standards for IoTIP based standards for IoT
IP based standards for IoT
Michael Koster
 
Research Topics in Machine Hypermedia
Research Topics in Machine HypermediaResearch Topics in Machine Hypermedia
Research Topics in Machine Hypermedia
Michael Koster
 
CCNA-Open-Platform-IoT
CCNA-Open-Platform-IoTCCNA-Open-Platform-IoT
CCNA-Open-Platform-IoT
Michael Koster
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
Michael Koster
 
OMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
OMA LwM2M Workshop - Michael Koster, IPSO Alliance ObjectsOMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
OMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
Open Mobile Alliance
 
Ipso application templates
Ipso application templatesIpso application templates
Ipso application templates
Michael Koster
 
Restful Asynchronous Notification
Restful Asynchronous NotificationRestful Asynchronous Notification
Restful Asynchronous Notification
Michael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
Michael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
Michael Koster
 
Designing an API for the Internet of Things
Designing an API for the Internet of ThingsDesigning an API for the Internet of Things
Designing an API for the Internet of Things
Kevin Swiber
 
[2015/2016] The REST architectural style
[2015/2016] The REST architectural style[2015/2016] The REST architectural style
[2015/2016] The REST architectural style
Ivano Malavolta
 

What's hot (17)

A Modular Open Source Platform for IoT
A Modular Open Source Platform for IoTA Modular Open Source Platform for IoT
A Modular Open Source Platform for IoT
 
Iottoolkit osiot
Iottoolkit osiotIottoolkit osiot
Iottoolkit osiot
 
Object models for interoperability
Object models for interoperabilityObject models for interoperability
Object models for interoperability
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminar
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
 
REST APIs for the Internet of Things
REST APIs for the Internet of ThingsREST APIs for the Internet of Things
REST APIs for the Internet of Things
 
IP based standards for IoT
IP based standards for IoTIP based standards for IoT
IP based standards for IoT
 
Research Topics in Machine Hypermedia
Research Topics in Machine HypermediaResearch Topics in Machine Hypermedia
Research Topics in Machine Hypermedia
 
CCNA-Open-Platform-IoT
CCNA-Open-Platform-IoTCCNA-Open-Platform-IoT
CCNA-Open-Platform-IoT
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
 
OMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
OMA LwM2M Workshop - Michael Koster, IPSO Alliance ObjectsOMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
OMA LwM2M Workshop - Michael Koster, IPSO Alliance Objects
 
Ipso application templates
Ipso application templatesIpso application templates
Ipso application templates
 
Restful Asynchronous Notification
Restful Asynchronous NotificationRestful Asynchronous Notification
Restful Asynchronous Notification
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
Designing an API for the Internet of Things
Designing an API for the Internet of ThingsDesigning an API for the Internet of Things
Designing an API for the Internet of Things
 
[2015/2016] The REST architectural style
[2015/2016] The REST architectural style[2015/2016] The REST architectural style
[2015/2016] The REST architectural style
 

Similar to Hypermedia for Machine APIs

Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
Michael Koster
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
Michael Koster
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
Michael Koster
 
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Michael Koster
 
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Michael Koster
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
Michael Koster
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
Michael Koster
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
Michael Koster
 
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Getting value from IoT, Integration and Data Analytics
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
webhostingguy
 
REST APIs for an Internet of Things
REST APIs for an Internet of ThingsREST APIs for an Internet of Things
REST APIs for an Internet of Things
Michael Koster
 
APITalkMeetupSharable
APITalkMeetupSharableAPITalkMeetupSharable
APITalkMeetupSharable
Obaidur (OB) Rashid
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
Michael Koster
 
RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...
RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...
RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...
Weijun Qin
 
IOT15_Unit6.pptx
IOT15_Unit6.pptxIOT15_Unit6.pptx
IOT15_Unit6.pptx
suptel
 
Approaches to machine actionable links
Approaches to machine actionable linksApproaches to machine actionable links
Approaches to machine actionable links
Stephen Richard
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
Rasan Samarasinghe
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & RestoreLadies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
gemziebeth
 
Building Software Backend (Web API)
Building Software Backend (Web API)Building Software Backend (Web API)
Building Software Backend (Web API)
Alexander Goida
 

Similar to Hypermedia for Machine APIs (20)

Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
 
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
Open Horizontal Platform - Web Scale Interoperability for the Internet of Thi...
 
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
 
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
REST APIs for an Internet of Things
REST APIs for an Internet of ThingsREST APIs for an Internet of Things
REST APIs for an Internet of Things
 
APITalkMeetupSharable
APITalkMeetupSharableAPITalkMeetupSharable
APITalkMeetupSharable
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
 
RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...
RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...
RestThing: A Restful Web Service Infrastructure for Mash-up Physical and Web ...
 
IOT15_Unit6.pptx
IOT15_Unit6.pptxIOT15_Unit6.pptx
IOT15_Unit6.pptx
 
Approaches to machine actionable links
Approaches to machine actionable linksApproaches to machine actionable links
Approaches to machine actionable links
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & RestoreLadies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
 
Building Software Backend (Web API)
Building Software Backend (Web API)Building Software Backend (Web API)
Building Software Backend (Web API)
 

More from Michael Koster

Osiot14 buildout
Osiot14 buildoutOsiot14 buildout
Osiot14 buildout
Michael Koster
 
Osiot13 IoT buildout
Osiot13 IoT buildoutOsiot13 IoT buildout
Osiot13 IoT buildout
Michael Koster
 
Ipso smart objects for iot
Ipso smart objects for iotIpso smart objects for iot
Ipso smart objects for iot
Michael Koster
 
MQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object APIMQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object API
Michael Koster
 
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki KeynoteThe Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
Michael Koster
 
Tools for the Open Source Internet of Things
Tools for the Open Source Internet of ThingsTools for the Open Source Internet of Things
Tools for the Open Source Internet of Things
Michael Koster
 
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Michael Koster
 
Personal Agency on the IoT
Personal Agency on the IoTPersonal Agency on the IoT
Personal Agency on the IoT
Michael Koster
 
Friend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOTFriend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOT
Michael Koster
 
MQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object APIMQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object API
Michael Koster
 

More from Michael Koster (10)

Osiot14 buildout
Osiot14 buildoutOsiot14 buildout
Osiot14 buildout
 
Osiot13 IoT buildout
Osiot13 IoT buildoutOsiot13 IoT buildout
Osiot13 IoT buildout
 
Ipso smart objects for iot
Ipso smart objects for iotIpso smart objects for iot
Ipso smart objects for iot
 
MQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object APIMQTT REST Bridge using the Smart Object API
MQTT REST Bridge using the Smart Object API
 
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki KeynoteThe Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
The Network Effect - Open Source and the Internet Of Things - Helsinki Keynote
 
Tools for the Open Source Internet of Things
Tools for the Open Source Internet of ThingsTools for the Open Source Internet of Things
Tools for the Open Source Internet of Things
 
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
Open Standards for IoT - GSM Workshop on IoT Standards Atlanta 2013
 
Personal Agency on the IoT
Personal Agency on the IoTPersonal Agency on the IoT
Personal Agency on the IoT
 
Friend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOTFriend Of A Thing and IoT Resource access control #OSIOT
Friend Of A Thing and IoT Resource access control #OSIOT
 
MQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object APIMQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object API
 

Recently uploaded

SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...
SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...
SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...
QingjieDu1
 
How God led me to DTS? Through many different signs and connections that I c...
How God led me to DTS? Through many different signs and connections that  I c...How God led me to DTS? Through many different signs and connections that  I c...
How God led me to DTS? Through many different signs and connections that I c...
AshishMohan57
 
Software Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical ImplementationsSoftware Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical Implementations
Bangladesh Network Operators Group
 
Understanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat IntelligenceUnderstanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat Intelligence
Lumiverse Solutions Pvt Ltd
 
Trump fist pump t shirts Trump fist pump t shirts
Trump fist pump t shirts Trump fist pump t shirtsTrump fist pump t shirts Trump fist pump t shirts
Trump fist pump t shirts Trump fist pump t shirts
exgf28
 
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
paridubey2024#G05
 
Saint Louis University diploma
Saint Louis University diplomaSaint Louis University diploma
Saint Louis University diploma
eufdev
 
Digital ethnography of the Polish darknet drug trade community
Digital ethnography of the Polish darknet drug trade communityDigital ethnography of the Polish darknet drug trade community
Digital ethnography of the Polish darknet drug trade community
Piotr Siuda
 
Rent remote desktop server mangohost .net
Rent remote desktop server mangohost .netRent remote desktop server mangohost .net
Rent remote desktop server mangohost .net
pdfsubmission50
 
Network Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptxNetwork Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptx
Infotainmentforall
 
Best CSS Animation Libraries for Web Developers
Best CSS Animation Libraries for Web DevelopersBest CSS Animation Libraries for Web Developers
Best CSS Animation Libraries for Web Developers
Shrestha Raaz
 
Portugal Dreamin 24 - How to easily use an API with Flows
Portugal Dreamin 24  - How to easily use an API with FlowsPortugal Dreamin 24  - How to easily use an API with Flows
Portugal Dreamin 24 - How to easily use an API with Flows
Thierry TROUIN ☁
 
Career Development Advice for Network Engineers across the Pacific, presented...
Career Development Advice for Network Engineers across the Pacific, presented...Career Development Advice for Network Engineers across the Pacific, presented...
Career Development Advice for Network Engineers across the Pacific, presented...
APNIC
 
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdfTop 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Krishna L
 
upgrade to zabbix-7 0 como atualiza lts1
upgrade to zabbix-7 0 como atualiza lts1upgrade to zabbix-7 0 como atualiza lts1
upgrade to zabbix-7 0 como atualiza lts1
diogolsew
 
UMN degree offer diploma Transcript
UMN degree offer diploma TranscriptUMN degree offer diploma Transcript
UMN degree offer diploma Transcript
cenocb
 
Study of international anticancer research trends.pdf
Study of international anticancer research trends.pdfStudy of international anticancer research trends.pdf
Study of international anticancer research trends.pdf
Preston University
 
Best Skills to Learn for Freelancing.pdf
Best Skills to Learn for Freelancing.pdfBest Skills to Learn for Freelancing.pdf
Best Skills to Learn for Freelancing.pdf
Million-$-Knowledge {Million Dollar Knowledge}
 
Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...
Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...
Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...
samyanvichadda
 
My President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodieMy President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodie
exgf28
 

Recently uploaded (20)

SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...
SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...
SisAi World - Software is AI - Providing AI as Software - Protecting the Inte...
 
How God led me to DTS? Through many different signs and connections that I c...
How God led me to DTS? Through many different signs and connections that  I c...How God led me to DTS? Through many different signs and connections that  I c...
How God led me to DTS? Through many different signs and connections that I c...
 
Software Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical ImplementationsSoftware Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical Implementations
 
Understanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat IntelligenceUnderstanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat Intelligence
 
Trump fist pump t shirts Trump fist pump t shirts
Trump fist pump t shirts Trump fist pump t shirtsTrump fist pump t shirts Trump fist pump t shirts
Trump fist pump t shirts Trump fist pump t shirts
 
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
 
Saint Louis University diploma
Saint Louis University diplomaSaint Louis University diploma
Saint Louis University diploma
 
Digital ethnography of the Polish darknet drug trade community
Digital ethnography of the Polish darknet drug trade communityDigital ethnography of the Polish darknet drug trade community
Digital ethnography of the Polish darknet drug trade community
 
Rent remote desktop server mangohost .net
Rent remote desktop server mangohost .netRent remote desktop server mangohost .net
Rent remote desktop server mangohost .net
 
Network Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptxNetwork Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptx
 
Best CSS Animation Libraries for Web Developers
Best CSS Animation Libraries for Web DevelopersBest CSS Animation Libraries for Web Developers
Best CSS Animation Libraries for Web Developers
 
Portugal Dreamin 24 - How to easily use an API with Flows
Portugal Dreamin 24  - How to easily use an API with FlowsPortugal Dreamin 24  - How to easily use an API with Flows
Portugal Dreamin 24 - How to easily use an API with Flows
 
Career Development Advice for Network Engineers across the Pacific, presented...
Career Development Advice for Network Engineers across the Pacific, presented...Career Development Advice for Network Engineers across the Pacific, presented...
Career Development Advice for Network Engineers across the Pacific, presented...
 
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdfTop 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
 
upgrade to zabbix-7 0 como atualiza lts1
upgrade to zabbix-7 0 como atualiza lts1upgrade to zabbix-7 0 como atualiza lts1
upgrade to zabbix-7 0 como atualiza lts1
 
UMN degree offer diploma Transcript
UMN degree offer diploma TranscriptUMN degree offer diploma Transcript
UMN degree offer diploma Transcript
 
Study of international anticancer research trends.pdf
Study of international anticancer research trends.pdfStudy of international anticancer research trends.pdf
Study of international anticancer research trends.pdf
 
Best Skills to Learn for Freelancing.pdf
Best Skills to Learn for Freelancing.pdfBest Skills to Learn for Freelancing.pdf
Best Skills to Learn for Freelancing.pdf
 
Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...
Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...
Vip Girls Call ServiCe Chennai X00XXX00XX Tanisha Best High Class Chennai Ava...
 
My President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodieMy President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodie
 

Hypermedia for Machine APIs

  • 1. Hypermedia for Machine APIs: An Example Michael J Koster August 15, 2015
  • 2. • Application Semantics and Discovery – Describes intrinsic resources and controls at the application level using physical concepts like temperature, light intensity – Enables applications to discover the proper resources to link to • API State Machine Automation – Enables Common Web Client to interact with any device or virtual entity, regardless of schema or model structure, or protocol used – Hypermedia controls work like HTTP links and forms, but for functional abstractions of physical world items like on/off light switch controls • Context Integration – Contextual information like installed location, what is being measured and controlled, also used in application resource discovery • Using Web Linking, Relations, and Attributes Hypermedia is Metadata
  • 3. Web of Things Example Hypermedia Web Applications IPSO Objects + Hypermedia Annotation OMA LWM2M CoAP HTTP 6LowPAN IPV4/IPV6 MCU – 16KiB RAM MPU 802.15.4 WiFi, Ethernet Hardware HW Network Routing Application Protocol API and Services Data Models Application Web Server
  • 4. • Thing Description models are high level abstractions for the Actions, Events, and Properties of things • Action, event, and property resources have defined bindings to M2M APIs, either through common patterns or through specialized interaction templates (like html forms) • High level functional abstractions for controls (Actions in the W3C thing model) map to machine operations at the (REST) API level • Example based on a set of controls for professional lighting • Actions are mapped to operations on IPSO Lighting objects (OnOff, Level, and Color actuators) • Level control (Brightness) object is used as an example Models and Bindings
  • 5. Lighting Model - Control Actions light onOff level color change toggle newState: {enum:off,on} HS XY temperature change step move targetValue:{units:%} transitionTime rate:{units:%/s} stepSize stop transitionTime:{units:s} change step move targetValue:{units:K,range:2700-5500} transitionTime rate:{units:K/s} stepSize transitionTime:{units:s} stop light.onOff.change {newState:on} light.color.temperature.change {targetValue:2900,transitionTime:10} light.level.change {targetValue:45,transitionTime:10} thing actuators actions parameters application actions {parameters} (colorspace)
  • 6. IPSO Level Control – Resource Model
  • 7. Example Resource Schema - IPSO O R O P DT O LR Object (1+) Linked Object Type=ObjLink Resource Operations - GET, PUT, POST - READ/WRITE/EXECUTE Data Type - Decimal, Integer, String, Boolean, ObjLink 1 1+ 1+ 1+ 1
  • 8. Description => Protocol => Model Protocol Binding - name - binding - href - datatype - method - mediatype - expects - returns - statuscodes Semantic Binding, Thing Description - Actions - action - binding - datatype - Events - Subscribe Bindings - Properties - Get/Set Bindings Resource Model Instances of SchemaO R R R O R R R O L R L DT
  • 9. Thing Description -TDL Fragment { “@context”: ”http://example.org/tdl/tdl.jsonld”, “@type”: “thing” { “@context”: ”http://example.org/tdl/professionalLighting.jsonld”, “@context”: ”http://schema.org/professionalLighting.jsonld”, “_thing”: {“type”:”light”}, “_actions”: { “brightness”: { “change”: {  indexed in context, reference by “light.brightness.change” “parameters”: [ {“name”: “targetValue”: “type”:”brightnessValueType”},  TDL abstract types {“name”: “transitionTime”, “type”: “timeValueType”}, “bindings”: [ {“type”: ”ipso+coap”, “describedBy”: “protocols.ipso+coap#light.level.change”}] } } } } }
  • 10. Binding for protocols.ipso+coap “light”: { “level”: { “change”: { “parameters”: [ {“name”: “targetValue”: “datatype”:”decimal”, “units”: “%”, “range”: “0-100”}, {“name”: “transitionTime”, “datatype”: “decimal”, “units”: “s”} ], “method”: ”post”, “href”: “3001/0”, “mediatype”: “application/senml+json”, “expects”: {“template”: “{“e”:[ {“n”:“5001”,“v”:{targetValue}}, {“n”:“5002”,“v”:{transitionTime}}]}” }, “statusCodes”: [ {“code”: ”2.01”, “status”: “success”}, {“code”: “4.04”, “status” “failure”}, {“code”: “4.09”, “status” “retry”} ] } } }
  • 11. Deployment with LWM2M Devices Web Applications Common Client Constrained Devices Device Connector Virtual Entity Catalogs Brokers Pub-SubDiscovery M2M API Pub-Sub Hypermedia Discovery REST API LWM2M WoT Servient
  • 12. • What do the hypermedia descriptions of events, actions, and properties look like? • What are the functional abstractions that will be used to enable vertical specialization while still providing broad interoperability? • How does discovery integrate with API automation? • What are the metadata constructs for connecting constrained hypermedia to higher level abstractions? • Prototype using constrained lighting objects with LWM2M and IoT Toolkit open source python framework • Reference WoT client using Node-RED + extensions Questions and Follow On Work
  • 13. Model-Based Information Architecture ModelSchema Web API M2M API Application Physical Abstraction Constrained Environments Intrinsic Properties Functional Abstractions Instance of Schema Compositional Conceptual Abstraction User Experience Discovery Autonomic Control Hypermedia Annotation Templates Code Generation Gateway/Cloud API Hypermedia Controls for Events, Actions, Properties Classes Operations Data Types Construction Annotation Discovery
  • 14. • Instance(s) of Schema(s) with annotation • Enable composition of complex entities from simple ones • Connect functional abstractions to concrete APIs • Constructors for hypermedia controls • Contain relations and attributes – Provide a way to describe entities using semantic annotation – Provide a structured way to introduce contextual annotation • Can function as instance constructors for constrained devices, e.g. server code generation • Also provide for managed APIs and application code generation Models
  • 15. Deployment From Models ModelSchema Service Layer Devices Web Applications Hypermedia Code Generation Proxies, Web Servers, Gateways, Catalogs Embedded, Mobile, Local, Cloud Connected and Mobile Devices Hypermedia-Capable Devices Common Client Semantic Binding Protocol Binding
  • 16. WoT Deployment Examples Web Application Common Client WoT Device Catalog Broker Web Application Common Client WoT Device Catalog Pub-Sub REST API Discovery Discovery
  • 17. WoT Thing to Thing Deployment Control Application Common Client WoT Device Catalog Broker Pub-Sub Discovery WoT Device WoT Device REST Orchestration
  • 18. • Background • Why Web to the Edge? • CoAP • OMA LWM2M • IPSO Smart Objects • Data model related tools and organizations • References Backup
  • 19. Michael Koster – Current Work • ARM – IoT Architecture and Standards – Application Level Interoperability – Developer Enablement • IETF – Resource Directory – CoRE Interfaces – CoAP Pub-Sub – T2TRG • OMA LWM2M – Peer-to-peer, firewall traversal, and M2M interface • IPSO – Smart Object Committee, Data Model and Schema
  • 20. IoT Architecture – Problems to Solve • Interoperability – In the way in which software interacts with physical resources – Decouple IoT devices from the software that manages them – Discovery, Management and Reporting, Security, Authorization • Scalability – Large number of devices, users, interactions, connections – Scale-less interaction • Technology Reuse and Modularity – Software, networks, protocols, data models – Across vendors in a vertical application segment – Across diverse vertical application segments • Low Barrier to Innovation – Anyone can participate and innovate
  • 21. Internet/WWW Design Patterns • Narrow Waist, endpoint oriented – Innovation happens at the endpoints, enabled by common, openly available network protocols (the narrow waist) • Layered Protocols – Common set of IP protocols (TCP, UDP) abstract the lower communication layers – Common Application Protocols (HTTP, REST) abstract resources • Uniform Addressing – URIs and Hyperlinks point to resources – IP Addresses, DNS names are globally unique • Stateless Interaction – Client-Server pattern – Hypermedia As The Engine Of Application State
  • 22. How Does it Apply to IoT? • Internet Protocol (IP) on Constrained Devices • Machine to Machine (M2M) Application Protocols • Standard Object Models and Data Models • Hypermedia for Machine APIs
  • 23. IP for Constrained Environments CoAP HTTP 6LowPAN IPV4/IPV6 MCU – 16KiB RAM MPU 802.15.4 WiFi, Ethernet Hardware HW Network Routing Application Protocol
  • 24. CoAP Protocol  Makes each device a lightweight origin server that exposes a REST API  A CoAP endpoint may also contain application client logic  A CoAP endpoint can be both client and server  Peer to Peer interaction is based on a duplex client- server pattern  Also supports asynchronous notification, Pub-Sub pattern
  • 25. RFC 6690 CoRE Link-Format <4001/0/9002>;rt=“oma.lwm2m”;ct=50;obs=1 Resource Type Content Type Observability
  • 26. Resource Discovery See draft-ietf-core-resource-directory • RFC 6690 CoRE Link Format defines – The link format media type – Peer-to-peer discovery • A directory approach is also useful – Supports sleeping nodes – No multicast traffic, longer battery life – Remote lookup, hierarchical and federated distribution • CoRE Link Format is used in Resource Directories – Nodes register their resource links to an RD – Nodes refresh the RD periodically – Nodes may unregister (remove) their RD entry Application GET /rd-lookup/ep </nodea/sensor/temp> </nodeb/actuator/led>
  • 27. Device Management and Application Support Application Software IPSO Objects OMA LWM2M CoAP HTTP 6LowPAN IPV4/IPV6 MCU – 16KiB RAM MPU 802.15.4 WiFi, Ethernet Hardware HW Network Routing Application Protocol API and Services Data Models Application Web Server
  • 28. OMA LWM2M Reference Architecture  M2M Applications  Application abstraction through REST API  Resource Discovery and Linking  LWM2M Clients are Devices  Device abstraction through CoAP  LWM2M Clients are CoAP Servers  Any IP network connection  LWM2M Server  CoAP Protocol persistent endpoint  Supports Caching Proxy  Resource Directory  Gateway and Cloud deployable
  • 29. OMA LWM2M Interfaces • Bootstrap Interface – Configure Servers & Keying – Pre-Configured, Smart Card, or Server Initiated Bootstrap – CoAP REST API • Registration Interface – RFC6690 and Resource Directory • Management and Application Interface Using Objects – Device Management Objects and Resources – CoAP REST API • Reporting Interface – Object Instances and Resources Report – Asynchronous notification using CoAP Observe
  • 30. OMA LWM2M Object Model • A Client has one or more Object Instances • An Object is a collection of Resources • A Resource is an atomic piece of information that can be Read, Written or Executed • Objects can have multiple instances • Objects and Resources are identified by 16-bit Integers • Objects/Resources are accessed with simple URIs: /{Object ID}/{Object Instance}/{Resource ID} Example: /3/0/1 • Object Type=3 (Device) • Instance=0 • Resource Type = 1 (Device Mfg.)
  • 31. IPSO Smart Objects • Plug and play data models between applications and data sources • Create a set of reusable objects and resources that represent single points of interest and fundamental concepts – Temperature Sensor, On-Off Control Switch – Current Value, Max Value, Min Value • Make Objects and Resources Reusable across application domains • Build up models of complex things by composing simple objects – For example, an electric motor with temperature sensors, rotation speed, power supply current, voltage, frequency, vibration sensors
  • 32. IPSO Smart Objects Support Modular Internet Protocols Application Software IPSO Objects LWM2M CoAP HTTP 6LowPAN /Thread IPV4/IPV6 MCU – 16KiB RAM MPU 802.15.4 WiFi, Ethernet Hardware HW Network Internet Protocol Wire Protocol + REST API – Data and Metadata Data Models Application REST Server Device Management Other IP Based Stacks: MQTT, XMPP, etc. Non-IP based Transport - BTLE
  • 33. IPSO Smart Objects are based on LWM2M Data Model • REST API with a URI template – 2 level Class Hierarchy and schema – Objects, one or more instances – Resources • Reusable resource and object IDs – Object ID determines gross concept and object structure – Resource ID determines what aspect of the object is represented – Semantic Consistency e.g. Object=Temperature, Resource=Current Value – IDs are registered with the OMNA • Data Types and Operations – String, Decimal, Boolean, Time, ObjLink – Read, Write, Create, Delete, Execute, Discover, Observe, Notify 3303/0/5700 Object ID, defines object type Object Instance, one or more Resource ID, defines resource type 3303 is Temperature 5700 is Current Value 3303/0/5700 refers to the current value of temperature sensor instance 0
  • 34. IPSO Smart Object Example
  • 35. Semantic Annotation of Smart Objects • Object annotation uses RFC 6690 links for associating additional semantic descriptions with Smart Objects and Resources • Can be used to add contextual metadata and dynamic link relations • Semantic connectors to web scale common data models • Discovery by relation and attribute – For example, using CoRE Resource Directory: GET /rd-lookup?ep&rt=“urn:X-ipso:temperature” Returns: </sensors/3303/0/5700>;obs;if=“urn:X- ipso:sensor”;rt=“urn:X- ipso:temperature”;ct=50;u=“ucum:degC”
  • 37. • RESTful API Modeling Language (RAML) uses JSON Schema • JSON Schema, JSON Hyper-schema • Web API Description Language (WADL) • XML Schema Definition language (XSD) • URI Templates (RFC 6570) • IETF CoRE Interfaces Function Set • Schema.org – Vocabulary for RDFa, JSON-LD • RESTdesc.org – uses Turtle (RDF based) • Hypertext Application Language (HAL) • Eclipse Vorto • Hydra • ALPS • HAL • Swagger Modeling Tools and Frameworks
  • 38. • XMPP – XEP-323, XEP-325 • Hypercat – Hypercat 3.0 • OneM2M – MAS • Zigbee Alliance – ZCL-over-IP • HGI - SDT • IIC – Use Cases and Testbeds • UPnP – Common Data Model • Cable Labs – Common Data Model Organizations and Initiatives • W3C – WoT TF-TD, TF-DI • OMA - GotAPI • IETF – CoRE RD, Interfaces, link-format • IPSO – Smart Object Guidelines • IEEE – P2413 • OIC – SHP • Allseen Alliance, Alljoyn • Eclipse Foundation – Vorto, IoT Backend
  • 39. References IPSO Smart Object Guideline http://www.ipso-alliance.org/smart-object-guidelines OMA LWM2M Specification http://openmobilealliance.hs-sites.com/lightweight-m2m- specification-from-oma IETF CoAP and Related Specifications CoAP (RFC 7252): http://tools.ietf.org/html/rfc7252 CoRE Link-Format (RFC 6690): http://tools.ietf.org/html/rfc6690 CoRE Resource Directory: http://tools.ietf.org/html/draft-ietf- core-resource-directory CoAP Community Site http://coap.technology/