Bringing Web Services to IoTivity
Opportunities, Challenges & Approaches
Sanjeev BA Open Source Group Samsung Electronics
Bringing Web Services to IoTivity Opportunities, Challenges & - - PowerPoint PPT Presentation
Bringing Web Services to IoTivity Opportunities, Challenges & Approaches Sanjeev BA Open Source Group Samsung Electronics Background Vertical Domains (Health, Manufacturing, Education, Consumer) Consumer Services Enterprise Services
Sanjeev BA Open Source Group Samsung Electronics
Vertical Domains (Health, Manufacturing, Education, Consumer) Consumer Services Enterprise Services REST API SOAP based JSON XML
Cloud Solutions
* Source : VisionMobile™ Developer Economics Q1 2015: State of the Developer Nation
Healthcare Service User Context Location + Time
Smart Home + Retail
Developer. Tizen.org Developer. android.com Developer. apple.com developers.facebook .com developer.paypal. com dev.twitter.com Iotivity SDK AllJoyn SDK MQTT SDK
Platform SDK Web Service SDK IoT SDK
Store 1 Store 2 Store 3
Smart Things Flipkart Sonos Sphero Path Twitter Skype Hue
User
Service Integrator
Cloud Service
App
Cloud Service Web Service Plugin Web Service Profile Package Download Server
App
Service Integrator Backend
App
Distributed App Control
App
App
IoTivity Web Service Interface Web Services RESTful Services
IoTivity Device IoTivity Device
Service Access Auth Handling
App
SOAP Base Services
Users Web Service Provider Application Developer Device Manufacturers
Service Description WSI
"name":“Openweathermap", "id":“org.openweathermap", "description":“A service that has weather for more than 200,000 cities", “logo" : "http://openweathermap.org/images/OWM_logo32_32.png"
capabilities:[ {Capability1: }, {Capability2: }, … {CapabilityN: } ]
"tags":[ "search", “weather” ]
Service Description WSI Post Tweet Now Trending Timeline Status
capability:[ { id : org.openweathermap.findbycity, isauthrequired : true, endpoint : api.openweathermap.org/data/2.5/weather endpointtype : REST,
: GET, params :{ q : {{cityname}} }, headers :{ x-custom : {{cityname}} }, response :{ <response JSON body format> }
auth:{ type :oauth2.0, subtype :application-only, appcredentials: { cust_key :{{cust_key}} cust_sec :{{cust_secret}}
:{{oauth_key}}
:{{oauth_secret}} } }
Brew my coffee based
Thin Device
Weather Service
Alarm Event WSI Web Service IoT Device IoT App
IoT Alarm App
Smart Phone with WSI Initialization
Open WeatherMap WSI
RESTful endpoint
IoTivity Coffee Maker
JSON Response
Service Description (Offline / Download)
Smart Alarm App (w/ IoTivity)
WSI_Capability_Request
(“Weather”, “Time”, “Location”) WSI_Connect()
App Logic Hot Cappuccino Result From Service Description Find List of Providers : Tag = Weather
Smart Phone with WSI Initialization
Accuweather WSI
RESTful endpoint
IoTivity Coffee Maker
JSON Response
Service Description (Offline / Download)
Smart Alarm App (w/ IoTivity)
WSI_Capability_Request
(“Weather”, “Time”, “Location”) WSI_Connect()
App Logic Hot Cappuccino Result from Service Description Find List of Providers : Tag = Weather
Coffee recipe Thin Device Sharing Service
IoT Alarm App
Smart Phone with WSI Configuration Phase
Twitter WSI Post Recipe to Twitter IoTivity Coffee Maker IoT Alarm App “Share” To Twitter Hot Cappuccino With Cream Recipe
Check Service Description & local cache
Twitter Auth Flow Update AuthCache Report Status Cust Key + Secret {MSG} User Auth If required
Platform Adaptation Linux Android Web
WSI API Interface Web Services Manager Service Handler Config & Caching Auth Manager WSI Daemon / Service
Tizen
Service Description
Send Tweet Get Sentiment
WebService Manager
IoTivity Network
IoTivity SDK (C++) Auth Cache WSI C++ Library WSI DBus Or Service App
WSI C++ Library
Service Description
Send Tweet Get Sentiment
WebService Manager
IoTivity Network
IoTivity SDK (Android) Auth Cache WSI Android Library WSI Android Service
WSI Config App
WSI Android Library
App Overload ? SDK Overload ? Siloed Ecosystems ? Enable Web Services Integration?
Developer. Tizen.org Developer. android.co m Developer. apple.com developers.f acebook.co m developer.p aypal. com dev.t w itter. com Iot ivity SDK AllJoy n SDK M QTT SDK App Developers ( Ex. Streaming Music) P l a t fPartial No OIC & IoTivity Yes
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
OpenWeatherMap WSI IoT Alarm App
Service Description
http://api.openweathermap.org/data/2.5/forecast/city Params id={Location} APPID={APIKEY}
Get Weather
Location ID : 443742 APIKey : 833e2f1ded3644f180c6d724fekjsdfsdkj
Register to get APPID/APIKEY : 833e2f1ded3644f180c6d724fekjsdfsdkj Cache APIKEY
http://api.openweathermap.org/data/2.5/forecast/city Params id=443742 APPID=833e2f1ded3644f180c6d724fekjsdfsdkj
Response JSON { city : {name}, LIST : { date : {d}, temp : {t}, unit : {units}, humidity : {h},
Get_Capability(“Weather”) List of “Weather” Services
Params : {Location}, {APIKey} Response : {name}, list <{date}, {temp}> Callback {name}, list <{date}, {temp}>
Twitter WSI IoT Alarm App Twitter User
Client Key + Secret
Service Description
REQUEST TOKEN
POST https://api.twitter.com/1.1/statuses/update.json
auth:{ … } Params status={msg} Header Authorization: {Oauth} ACCESS TOKEN
https://api.twitter.com/1.1/statuses/update.json
auth:{ … } Params status={msg} Header Authorization: {Oauth} STATUS
POST https://api.twitter.com/1.1/statuses/update.json
auth:{ … } Params status={msg} Header Authorization: {Oauth}
Cust Key + Secret POST /oauth/request_token Req token and secret Authenticate User + Authorize App
Authorize App Req Token + Verifier Oauth Token + Secret
Post {msg} to twitter Post {msg} to twitter