Bringing Web Services to IoTivity Opportunities, Challenges & - - PowerPoint PPT Presentation

bringing web services to iotivity
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Bringing Web Services to IoTivity

Opportunities, Challenges & Approaches

Sanjeev BA Open Source Group Samsung Electronics

slide-2
SLIDE 2

Background

Vertical Domains (Health, Manufacturing, Education, Consumer) Consumer Services Enterprise Services REST API SOAP based JSON XML

Cloud Solutions

slide-3
SLIDE 3

Opportunities

slide-4
SLIDE 4

IoT & The App Conundrum

  • Developers looking for niche areas
  • Direct revenues from apps slowing down
  • 52% make < $1000 / month
  • 53% working on IoT related apps already.
  • Estimated 5.5 Million mobile app devs.
  • Smart Home and Wearables
  • Users already have app fatigue

* Source : VisionMobile™ Developer Economics Q1 2015: State of the Developer Nation

slide-5
SLIDE 5

Critical Contextual

Healthcare Service User Context Location + Time

Consumer Centric

Smart Home + Retail

slide-6
SLIDE 6

Critical

  • Legacy system integration
  • Regulatory

Contextual

  • Sensor + service integration

Enriched Consumer Experience

  • Smart Shopping Cart
  • Tap device to order

Services in the IoT Context

slide-7
SLIDE 7

Challenges

slide-8
SLIDE 8

SDK Overload for Developers

Developer. Tizen.org Developer. android.com Developer. apple.com developers.facebook .com developer.paypal. com dev.twitter.com Iotivity SDK AllJoyn SDK MQTT SDK

App Developers ( Ex. Streaming Music)

Platform SDK Web Service SDK IoT SDK

slide-9
SLIDE 9

Siloed Ecosystems

THING MAKERS ARE LOOKING TO DIFFERENTIATE WITH THE HELP OF WEB SERVICES

Store 1 Store 2 Store 3

slide-10
SLIDE 10

App Overload For Users

Smart Things Flipkart Sonos Sphero Path Twitter Skype Hue

User

!=

Service Integrator

slide-11
SLIDE 11

Current Approaches

slide-12
SLIDE 12

Dedicated Hub + Cloud Service Model

Cloud Service

IoT Network

App

slide-13
SLIDE 13

Service Plugin Model

Cloud Service Web Service Plugin Web Service Profile Package Download Server

IoT Network

App

slide-14
SLIDE 14

Distributed App Control Model

Service Integrator Backend

App

IoT Network

Distributed App Control

App

App

slide-15
SLIDE 15

Web Service Interface

slide-16
SLIDE 16

Web Service Interface (WSI)

  • Enabler of interactions
  • IoTivity applications & Web Services
  • Web service abstraction

IoTivity Web Service Interface Web Services RESTful Services

IoTivity Device IoTivity Device

Service Access Auth Handling

App

SOAP Base Services

slide-17
SLIDE 17

Key Concepts

  • Roles
  • Web Service Provider
  • WSI
  • IoT Device Manufacturer
  • IoT App Developer
  • Users
  • Service Description
  • Services
  • Capabilities
  • Authentication and Authorization
slide-18
SLIDE 18

Roles

Users Web Service Provider Application Developer Device Manufacturers

slide-19
SLIDE 19

Service Description

  • What is service description
  • A way to represent web services to WSI
  • Service Block (JSON)
  • Metadata
  • Authorization
  • Capability List
  • TAGS

Service Description WSI

slide-20
SLIDE 20

Service Block Example

"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"

META DATA

capabilities:[ {Capability1: }, {Capability2: }, … {CapabilityN: } ]

CAPABILITY LIST

"tags":[ "search", “weather” ]

TAGS

slide-21
SLIDE 21

Capability

  • What is a capability
  • Represents different API offered by the Service
  • Capability Block (JSON)
  • Metadata block
  • Headers
  • Responses
  • TAGS

Service Description WSI Post Tweet Now Trending Timeline Status

slide-22
SLIDE 22

Capability Example

capability:[ { id : org.openweathermap.findbycity, isauthrequired : true, endpoint : api.openweathermap.org/data/2.5/weather endpointtype : REST,

  • peration

: GET, params :{ q : {{cityname}} }, headers :{ x-custom : {{cityname}} }, response :{ <response JSON body format> }

CAPABILITY DESCRIPTION

slide-23
SLIDE 23

Authorization Example

auth:{ type :oauth2.0, subtype :application-only, appcredentials: { cust_key :{{cust_key}} cust_sec :{{cust_secret}}

  • auth_key

:{{oauth_key}}

  • auth_sec

:{{oauth_secret}} } }

slide-24
SLIDE 24

Applying Service Description

  • A Use Case
slide-25
SLIDE 25

Use Case #1: Web Service + IoT Device

Brew my coffee based

  • n weather

Thin Device

Weather Service

Alarm Event WSI Web Service IoT Device IoT App

IoT Alarm App

slide-26
SLIDE 26

Smart Phone with WSI Initialization

Use Case #1

Open WeatherMap WSI

RESTful endpoint

  • nObserve()

IoTivity Coffee Maker

  • bServeResource()

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

slide-27
SLIDE 27

Smart Phone with WSI Initialization

Use Case #1 : Adding Service Provider

Accuweather WSI

RESTful endpoint

  • nObserve()

IoTivity Coffee Maker

  • bServeResource()

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

slide-28
SLIDE 28

Use Case #2 : Share with friends

Coffee recipe Thin Device Sharing Service

IoT Alarm App

slide-29
SLIDE 29

Smart Phone with WSI Configuration Phase

Use Case #2 : Tweet The Recipe

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

slide-30
SLIDE 30

Putting it all together

Web Services Interface

Platform Adaptation Linux Android Web

WSI API Interface Web Services Manager Service Handler Config & Caching Auth Manager WSI Daemon / Service

Tizen

WSI Configuration App

slide-31
SLIDE 31

Web Service Interface Daemon

  • Web Services Manager
  • Parses the service description
  • Provides representation of the description
  • Service Handler
  • Invokes requested API
  • Processes the response
  • Uses Auth Manager to delegate Auth flows.
  • Uses platform HTTP stack
  • Auth Manager
  • Performs Auth related flows
  • Manages application specific auth cache.
  • Token Refresh Handling
  • Config & Caching
slide-32
SLIDE 32

WSI API Interface

  • Provides a simple set of API to discover and utilize services
  • API overview
  • WSI_Connect() Connect to the WSI Daemon / Service Application
  • List<Service> WSI_Get_Services(“User Action Tag”)
  • List<Capability> WSI_Get_Capabilities(Service)
  • Request_Handle WSI_Capability_Request(Capability, Callback)
  • Callback(Request_Handle, Capability_Result)
slide-33
SLIDE 33

Configuration App

  • Provides frontend for users to configure web

services.

  • Enabling and disabling individual capabilities
  • Helps with Auth flows involving a browser.
slide-34
SLIDE 34

Deployment View : Linux, Tizen Web Service Interface

Service Description

Send Tweet Get Sentiment

IoTivity Application

WebService Manager

IoTivity Network

IoTivity SDK (C++) Auth Cache WSI C++ Library WSI DBus Or Service App

Web Service

WSI Config App

WSI C++ Library

slide-35
SLIDE 35

Deployment View : Android Web Service Interface

Service Description

Send Tweet Get Sentiment

IoTivity Application

WebService Manager

IoTivity Network

IoTivity SDK (Android) Auth Cache WSI Android Library WSI Android Service

Web Service

WSI Config App

WSI Android Library

slide-36
SLIDE 36

Challenges Addressed By WSI

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 f
  • r
m S D K W eb Service SDK I
  • T
S D K S m a r t T h i n g s F l i p k a r t S
  • n
  • s
S p h e r
  • P
a t h T w i t t e r S k y p e H u e Store 1 Store 2 Store 3 H e a l t h c a r e S e r v i c e U ser Cont ext Locat ion + Time Smart Home + Ret ail

Partial No OIC & IoTivity Yes

slide-37
SLIDE 37

Development Plan & Status

  • Phase 1 (Oct ‘15)
  • Schema definitions for popular services
  • Schema Parsing, Data models
  • Demo Web Service Use Cases
  • Linux, Android and Tizen support
  • Phase 2 (Nov ‘15)
  • Schema improvement (new features)
  • Multiuser support
slide-38
SLIDE 38

Demo

slide-39
SLIDE 39

Q & A

slide-40
SLIDE 40

License Attribution For Images

  • “simpleicon social media” is an icon pack by SimpleIcon under License: CC BY 3.
  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/rami-mcmin" title="Rami McMin">Rami McMin</a> from <a href="http://www.flaticon.com"

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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/situ-herrera" title="Situ Herrera">Situ Herrera</a> from <a href="http://www.flaticon.com"

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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/anton-saputro" title="Anton Saputro">Anton Saputro</a> from <a href="http://www.flaticon.com"

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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" 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>

  • <div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://ww.flaticon.com" 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>

slide-41
SLIDE 41

Role : IoT Device Manufacturer

  • Function
  • Makers of ‘Things’
  • Spec Compliance
  • Expectations
  • Increased user adoption
  • Feature Differentiation
slide-42
SLIDE 42

Roles : App Developers / Integrators

  • Function
  • New breed of “apps”
  • {Web services & IoT devices} Apps
  • IFTTT, Uber, Makerspace
  • Expectations
  • Maximize Asset Reuse
  • Simpler development
  • “What to” not “How to”
  • New revenue streams
  • Monetization opportunity
slide-43
SLIDE 43

Users

  • Function
  • Consume web service & IoT Devices
  • Provide required credentials
  • Authorizing apps to use web services
  • Expectations
  • Zero/Minimal Setup overhead
  • Retain existing workflow
  • Enable new use cases.
slide-44
SLIDE 44

Role : Web Service Provider

  • Function
  • Hosts the web service
  • Maps, Photos, Music Streaming
  • Provides access via API and Apps.
  • Expectations
  • Extending service into the IoTivity network
  • Minimal/No changes in existing workflows
  • More user engagement from multiple

sources

slide-45
SLIDE 45

Use Case #1 : Auth Flow

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}>

slide-46
SLIDE 46

Use Case #2 : Auth Flow

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