JavaScript for IoTivity Sakari Poussa, Intel @spoussa Topics - - PowerPoint PPT Presentation

javascript for iotivity
SMART_READER_LITE
LIVE PREVIEW

JavaScript for IoTivity Sakari Poussa, Intel @spoussa Topics - - PowerPoint PPT Presentation

JavaScript for IoTivity Sakari Poussa, Intel @spoussa Topics Vision JavaScript for Everything Cloud HTML5 REST Apps Web API REST Server Server JavaScript GW Engine(s) Applica'on developer can use only web


slide-1
SLIDE 1

JavaScript for IoTivity

Sakari Poussa, Intel

@spoussa

slide-2
SLIDE 2

Topics

slide-3
SLIDE 3

Vision

GW Smart Devices

REST REST CoAP, MQTT, 6LowPAN, BLE

JavaScript Engine(s) Web Server API Server Resources Connectivity HTML5 Apps Storage

Cloud JavaScript for Everything

Applica'on ¡developer ¡can ¡use ¡

  • nly ¡web ¡technologies ¡to ¡create ¡

end-­‑to-­‑end ¡solu'ons. ¡ ¡ Not ¡the ¡only ¡op'on ¡but ¡focus ¡of ¡ this ¡talk. ¡

slide-4
SLIDE 4

Gold ¡ Diamond ¡ Pla,num ¡

slide-5
SLIDE 5
  • Specifications
  • Data models
  • Certification
  • Marketing
  • Open Source implementation
  • QA
  • API bindings

No ¡JavaScript ¡

slide-6
SLIDE 6
  • JavaScript API for OIC
  • Web IDL specification
  • Single API – Multiple Implementations
  • All open source
  • Travis, sample code, demos
  • IoTivity 1.0
slide-7
SLIDE 7

API Highlights

Promise findResources(); Events: resourcefound Promise<resource> register(data); Events: retrieverequest updaterequest

  • bserverequest

Client ¡ Server ¡ Promise retrieve(); Promise update(data); Promise observe(); Events: update Resource ¡

slide-8
SLIDE 8

OIC ¡Client ¡ OIC ¡Server ¡ Request: ¡DISCOVER ¡ Response: ¡URI, ¡Type, ¡ID ¡

Discovery

slide-9
SLIDE 9

OIC ¡Client ¡ OIC ¡Server ¡ Request: ¡RETRIEVE ¡ Response: ¡DATA ¡

Retrieve, Update

Request: ¡UPDATE ¡ Response: ¡OK ¡

slide-10
SLIDE 10

Cloud

OIC and Cloud REST API CoAP over TCP XMPP

slide-11
SLIDE 11

Cloud

API ¡ ¡ SERVER ¡ REST ¡ HTTP(S) ¡and ¡JSON ¡ OIC ¡Device ¡Network ¡ (local) ¡

Remote Access with REST APIs

slide-12
SLIDE 12

Sensor ¡ ¡ (OIC ¡server) ¡

HTTP ¡GET ¡/oic/res ¡ Request: ¡DISCOVER ¡ Response: ¡URI, ¡Type, ¡ID ¡

{"href":"/a/light,"rt":"core.light","if":"oc.mi.def"} ¡

HTTP ¡200 ¡OK ¡

{"href":"/a/light,"rt":"core.light","if":"oc.mi.def"} ¡

HTTP ¡GET ¡/a/light ¡ Request: ¡RETRIEVE ¡(/a/light) ¡ Response: ¡DATA ¡

{"href":"/a/light","proper'es”:{”on":false}} ¡

HTTP ¡200 ¡OK ¡

{"href":"/a/light","proper'es":{”on":false}} ¡

HTTP ¡PUT ¡/a/light ¡

{"href":"/a/light","proper'es":{”on":true}} ¡

Request ¡UPDATE ¡(/a/light) ¡

{"href":"/a/light","proper'es":{”on":true}} ¡

Response: ¡OK ¡ ¡ HTTP ¡200 ¡OK ¡ Discovery ¡ Read ¡ Update ¡

API ¡Server ¡ (REST) ¡ Cloud/Mobile ¡

slide-13
SLIDE 13

REST API SERVER

  • All JavaScript
  • Node.js, Express, and iotivity-node
  • Open source https://github.com/01org/iot-rest-api-server
  • RAML API documentation
  • Features
  • OIC discovery (/oic/res and /oic/d)
  • OIC RETRIEVE and UPDATE
  • Observing

Cloud REST ¡API ¡ ¡ SERVER ¡

slide-14
SLIDE 14

Next Steps

Security – Sandbox Small devices – V8 is big JS Engine API ?

slide-15
SLIDE 15

Demo

Visit Intel Booth for Demo Iotivity-node in Action No Native Application Code JavaScript, HTML, WebGL and CSS

slide-16
SLIDE 16

Questions ?