bringing web services to iotivity
play

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


  1. Bringing Web Services to IoTivity Opportunities, Challenges & Approaches Sanjeev BA Open Source Group Samsung Electronics

  2. Background Vertical Domains (Health, Manufacturing, Education, Consumer) Consumer Services Enterprise Services REST API SOAP based JSON XML Cloud Solutions

  3. Opportunities

  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

  5. Critical Contextual User Context Healthcare Service Location + Time Consumer Centric Smart Home + Retail

  6. Services in the IoT Context Critical • Legacy system integration • Regulatory Contextual • Sensor + service integration Enriched Consumer Experience • Smart Shopping Cart • Tap device to order

  7. Challenges

  8. SDK Overload for Developers App Developers ( Ex. Streaming Music) Web Service SDK IoT SDK Platform SDK Developer. developers.facebook Iotivity SDK Tizen.org .com Developer. AllJoyn SDK dev.twitter.com android.com Developer. developer.paypal. MQTT SDK apple.com com

  9. Siloed Ecosystems THING MAKERS ARE LOOKING TO DIFFERENTIATE WITH THE HELP OF WEB SERVICES Store 1 Store 2 Store 3

  10. App Overload For Users Smart Flipkart Things User != Twitter Sphero Service Integrator Sonos Path Skype Hue

  11. Current Approaches

  12. Dedicated Hub + Cloud Service Model IoT Network Cloud Service App

  13. Service Plugin Model Package Web Service Plugin Download Web Service Profile Server Cloud Service App IoT Network

  14. Distributed App Control Model IoT Network Distributed App Control App Service Integrator App Backend App

  15. Web Service Interface

  16. Web Service Interface (WSI)  Enabler of interactions  IoTivity applications & Web Services  Web service abstraction RESTful Service Access Services Auth Handling Device IoTivity IoTivity Web Web App Services Service Device Interface IoTivity SOAP Base Services

  17. Key Concepts  Roles  Web Service Provider  WSI  IoT Device Manufacturer  IoT App Developer  Users  Service Description  Services  Capabilities  Authentication and Authorization

  18. Roles Web Service Users Provider Application Device Manufacturers Developer

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

  20. Service Block Example META DATA "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" CAPABILITY LIST TAGS capabilities:[ "tags":[ {Capability1: }, "search", {Capability2: }, “weather” … ] {CapabilityN: } ]

  21. Capability  What is a capability  Represents different API offered by the Service  Capability Block (JSON)  Metadata block  Headers  Responses  TAGS Post Tweet Now Trending Service WSI Description Timeline Status

  22. Capability Example CAPABILITY DESCRIPTION capability:[ { id : org.openweathermap.findbycity, isauthrequired : true, endpoint : api.openweathermap.org/data/2.5/weather endpointtype : REST, operation : GET, params :{ q : {{cityname}} }, headers :{ x-custom : {{cityname}} }, response :{ <response JSON body format> }

  23. Authorization Example auth:{ type :oauth2.0, subtype :application-only, appcredentials: { cust_key :{{cust_key}} cust_sec :{{cust_secret}} oauth_key :{{oauth_key}} oauth_sec :{{oauth_secret}} } }

  24. Applying Service Description - A Use Case

  25. Use Case #1: Web Service + IoT Device Web IoT WSI IoT App Service Device Alarm Event Thin Device IoT Weather Alarm Service App Brew my coffee based on weather

  26. Use Case #1 Open IoTivity Smart Alarm App WSI WeatherMap Coffee Maker (w/ IoTivity) Service Description WSI_Connect() (Offline / Download) obServeResource() Initialization onObserve() WSI_Capability_Request (“Weather”, “Time”, “Location”) Find List of Providers : Tag = Weather RESTful endpoint JSON Response Result From Service Description App Logic Hot Cappuccino Smart Phone with WSI

  27. Use Case #1 : Adding Service Provider IoTivity Smart Alarm App Accuweather WSI Coffee Maker (w/ IoTivity) Service Description WSI_Connect() (Offline / Download) obServeResource() Initialization onObserve() WSI_Capability_Request (“Weather”, “Time”, “Location”) Find List of Providers : Tag = Weather RESTful endpoint JSON Response Result from Service Description App Logic Hot Cappuccino Smart Phone with WSI

  28. Use Case #2 : Share with friends Coffee recipe IoT Sharing Alarm Service App Thin Device

  29. Use Case #2 : Tweet The Recipe IoTivity Twitter WSI IoT Alarm App Coffee Maker Check Service Description & local cache Cust Key + Secret {MSG} Configuration Phase Twitter Auth Flow User Auth If required Update AuthCache Hot Cappuccino With Cream Recipe “Share” To Twitter Post Recipe to Twitter Report Status Smart Phone with WSI

  30. Putting it all together Web Services Interface WSI Configuration App WSI API Interface Web Services Auth Manager Manager WSI Daemon / Service Config Service Handler & Caching Platform Linux Android Web Tizen Adaptation

  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

  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)

  33. Configuration App  Provides frontend for users to configure web services.  Enabling and disabling individual capabilities  Helps with Auth flows involving a browser.

  34. Deployment View : Linux, Tizen IoTivity Application Web WSI Config Service App WSI C++ WSI C++ IoTivity SDK Library Library (C++) Service Description Send Tweet WebService Get Manager WSI Sentiment DBus Or Service App Auth Cache IoTivity Network Web Service Interface

  35. Deployment View : Android IoTivity Application Web WSI Config Service App WSI Android WSI Android IoTivity SDK Library Library (Android) Service Description Send Tweet WebService Manager Get Sentiment WSI Android Service Auth Cache IoTivity Network Web Service Interface

  36. Challenges Addressed By WSI SDK Overload ? App Overload ? App Developers ( Ex. Streaming Music) S m F a l r i t T p h k a i r n t g s P T l w S a p I t i h o f t e T W eb Service t S o SDK e r D r r o m K S D K developers.f S P Iot ivity Developer. o SDK Tizen.org acebook.co n a m o t h s Developer. AllJoy android.co dev.t w itter. n SDK m com S k H y u p e e M QTT Developer. developer.p apple.com aypal. SDK com No Partial Enable Web Services Siloed Ecosystems ? Integration? H e a l t h c U ser a Cont ext Store 1 r Locat ion + Store 2 Store 3 e S Time e r v i c e Smart Home + Ret ail OIC & IoTivity Yes

  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

  38. Demo

  39. Q & A

Recommend


More recommend