+ All Categories
Home > Documents > OCF Fundamentals - Open Connectivity Foundation (OCF) · 2016. 4. 7. · 4 • Legacy vertical...

OCF Fundamentals - Open Connectivity Foundation (OCF) · 2016. 4. 7. · 4 • Legacy vertical...

Date post: 21-Oct-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
46
OCF Fundamentals Ravi Subramaniam Principal Engineer, Intel Corporation 1
Transcript
  • OCF FundamentalsRavi Subramaniam

    Principal Engineer, Intel Corporation

    1

  • 2

    Fundamental Fundamentals

    OCF Resource Model

    Mapping onto Comms Transports

  • Many kinds of devices …

    33

    service #2domain

    service #1domain

    Local Remote Server to Server

    Controller

    Controller

    Cloud Servers Cloud Servers

    Things

    Controller App

    OIC Scope(current)

    OIC Scope(anticipated)

    http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=2So_hLof1wWKtM&tbnid=ociOFqVzKe6iQM:&ved=0CAUQjRw&url=http://pixgood.com/cloud-png.html&ei=DoDXU4q3Fonr8AWMt4LQCw&bvm=bv.71778758,d.dGc&psig=AFQjCNF5qEWaD5LpHgmvL2G239qqMRVgyQ&ust=1406718272788032http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=2So_hLof1wWKtM&tbnid=ociOFqVzKe6iQM:&ved=0CAUQjRw&url=http://pixgood.com/cloud-png.html&ei=DoDXU4q3Fonr8AWMt4LQCw&bvm=bv.71778758,d.dGc&psig=AFQjCNF5qEWaD5LpHgmvL2G239qqMRVgyQ&ust=1406718272788032http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=aJ0VogEb73WSUM&tbnid=-1EdSDyKWeuCeM:&ved=0CAUQjRw&url=http://www.123rf.co.kr/photo_29578078_%EC%8A%A4%EB%A7%88%ED%8A%B8-%ED%99%88%EA%B3%BC-%EC%8A%A4%EB%A7%88%ED%8A%B8-%ED%95%98%EC%9A%B0%EC%8A%A4-%EC%95%84%EC%9D%B4%EC%BD%98-%ED%99%88-%EC%9E%90%EB%8F%99%ED%99%94-%EC%A0%9C%EC%96%B4-%EC%8B%9C%EC%8A%A4%ED%85%9C-simplus-%EC%8B%9C%EB%A6%AC%EC%A6%88-%EB%9E%98%C3%AC.html&ei=PH3XU6rkOYHo8AXihILAAQ&bvm=bv.71778758,d.dGc&psig=AFQjCNE96wEAwCm3uU0UMLhXx-VKTaLEog&ust=1406717612939548http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=aJ0VogEb73WSUM&tbnid=-1EdSDyKWeuCeM:&ved=0CAUQjRw&url=http://www.123rf.co.kr/photo_29578078_%EC%8A%A4%EB%A7%88%ED%8A%B8-%ED%99%88%EA%B3%BC-%EC%8A%A4%EB%A7%88%ED%8A%B8-%ED%95%98%EC%9A%B0%EC%8A%A4-%EC%95%84%EC%9D%B4%EC%BD%98-%ED%99%88-%EC%9E%90%EB%8F%99%ED%99%94-%EC%A0%9C%EC%96%B4-%EC%8B%9C%EC%8A%A4%ED%85%9C-simplus-%EC%8B%9C%EB%A6%AC%EC%A6%88-%EB%9E%98%C3%AC.html&ei=PH3XU6rkOYHo8AXihILAAQ&bvm=bv.71778758,d.dGc&psig=AFQjCNE96wEAwCm3uU0UMLhXx-VKTaLEog&ust=1406717612939548http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=1LzAh3Tlch8TwM&tbnid=LQmd-LOzkk6QDM:&ved=0CAUQjRw&url=http://engineering.vcnc.co.kr/2014/05/hbase-schema-in-between/&ei=JYHXU8GrCoLp8AX7jYLwCg&bvm=bv.71778758,d.dGc&psig=AFQjCNEq-rsGv4GNTRWGLEiAxje8SFgmLQ&ust=1406718584387534http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=1LzAh3Tlch8TwM&tbnid=LQmd-LOzkk6QDM:&ved=0CAUQjRw&url=http://engineering.vcnc.co.kr/2014/05/hbase-schema-in-between/&ei=JYHXU8GrCoLp8AX7jYLwCg&bvm=bv.71778758,d.dGc&psig=AFQjCNEq-rsGv4GNTRWGLEiAxje8SFgmLQ&ust=1406718584387534http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=L0mnxnEmYZOZOM&tbnid=7dsNAAdIc2aV9M:&ved=0CAUQjRw&url=http://www.morrolinux.it/creare-access-point-thomson-technicolor-tg788vn/&ei=in7XU-2cC4yk8AXS7IIw&bvm=bv.71778758,d.dGc&psig=AFQjCNHJCyr9M9fO8081RMknPNMrDdXB0A&ust=1406717900042716http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=L0mnxnEmYZOZOM&tbnid=7dsNAAdIc2aV9M:&ved=0CAUQjRw&url=http://www.morrolinux.it/creare-access-point-thomson-technicolor-tg788vn/&ei=in7XU-2cC4yk8AXS7IIw&bvm=bv.71778758,d.dGc&psig=AFQjCNHJCyr9M9fO8081RMknPNMrDdXB0A&ust=1406717900042716http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=2So_hLof1wWKtM&tbnid=ociOFqVzKe6iQM:&ved=0CAUQjRw&url=http://pixgood.com/cloud-png.html&ei=DoDXU4q3Fonr8AWMt4LQCw&bvm=bv.71778758,d.dGc&psig=AFQjCNF5qEWaD5LpHgmvL2G239qqMRVgyQ&ust=1406718272788032http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=2So_hLof1wWKtM&tbnid=ociOFqVzKe6iQM:&ved=0CAUQjRw&url=http://pixgood.com/cloud-png.html&ei=DoDXU4q3Fonr8AWMt4LQCw&bvm=bv.71778758,d.dGc&psig=AFQjCNF5qEWaD5LpHgmvL2G239qqMRVgyQ&ust=1406718272788032http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=1LzAh3Tlch8TwM&tbnid=LQmd-LOzkk6QDM:&ved=0CAUQjRw&url=http://engineering.vcnc.co.kr/2014/05/hbase-schema-in-between/&ei=JYHXU8GrCoLp8AX7jYLwCg&bvm=bv.71778758,d.dGc&psig=AFQjCNEq-rsGv4GNTRWGLEiAxje8SFgmLQ&ust=1406718584387534http://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&docid=1LzAh3Tlch8TwM&tbnid=LQmd-LOzkk6QDM:&ved=0CAUQjRw&url=http://engineering.vcnc.co.kr/2014/05/hbase-schema-in-between/&ei=JYHXU8GrCoLp8AX7jYLwCg&bvm=bv.71778758,d.dGc&psig=AFQjCNEq-rsGv4GNTRWGLEiAxje8SFgmLQ&ust=1406718584387534

  • Many vertical/domains …

    4

    • Legacy vertical services usually designed as silos No common way to communicate among them

    • A common platform provides a foundationfor vertical services to collaborate and interwork by providing common services and data models

    Insulin level low! Need Help!

    Home Health Domain

    Smart Home Domain

    Health Home Industrial

    Common Platform

    Health Home Industrial

    …DiscoveryAddressingMessagingSecurity…

    Health Home Industrial

    OIC Scope

  • Interoperability …• Full interoperability from the connectivity layer up to the service layer

    is the only way to truly guarantee a satisfactory UX • Interoperability at the Connectivity and/or Platform layer only

    provides partial interoperability which can ultimately lead to fragmentation

    5

    Vertical Services

    Platform

    Connectivity

    Vertical Services

    Platform

    Connectivity

    ① Connectivity LevelInteroperability

    ③ Service LevelInteroperability

    Vertical Services

    Platform

    Connectivity

    Vertical Services

    Platform

    Connectivity

    ② Platform LevelInteroperability

    Vertical Services

    Platform

    Connectivity

    Vertical Services

    Platform

    Connectivity

    OIC Scope

  • Today … Transport Oriented …

    64/7/2016

    Applications & Services

    Transports

    Data & Control Points

    Transports

  • Transports Transports

    Protocol Abstraction

    Applications & Services

    Protocols

    Data & Control Points

    Protocols

    4/7/2016 7

  • Transports* Transports*

    OCF Framework

    Data & Control Points

    OCF Protocols

    OCF Resource Model

    Data & Control Points

    OCF Protocols

    OCF Resource Model

    *Transports not defined by OCF

    ApplicationOCF Framework• Interoperability

    at protocol, data model and information model levels

    • P2P

  • Apps & Services

    OCFFramework

  • Apps & Services

    Resources

    Context

    Behaviours

  • Ah … a light bulb !!

    11

  • 12

    Device

    Power

    My Description

    Manufacturer Description

    Main Living Room Light

    LED-Light-Co, 40W Equivalent Bulb

    Off

    “Client”

    “Need light”

    “Server”

  • 13

    Device

    Power

    My Description

    Manufacturer Description

    Main Living Room Light

    LED-Light-Co, 40W Equivalent Bulb

    “Client”

    Done

    OffOn

    “Server”

  • 14

    • Declarative: By declaring expected outcomes and intent on state i.e. what

    14

    • Imperative: By defining functions of and operations on things i.e. how

    e.g., Light bulb

    BinarySwitch

    Dimming

    Brightness

    - true(on), false(off)

    - dimmingSetting (int)- step (int)- range [0-100]

    - brightness (int)

    Resources- properties

    SetSwitch

    SetDimmingLevel

    SetBrightness

    - Power(in)

    - brightness (in)

    - step(in), range(in)Functions

    - Input & Output Parameters

    - State + Objects*Fixed set of verbs (CRUDN)

    - Resource oriented in RESTful Architecture

    - (Verbs + Objects)- RPC model

    OIC Scope

    http://www.google.co.kr/url?sa=i&rct=j&q=&esrc=s&frm=1&source=images&cd=&cad=rja&uact=8&ved=0CAcQjRw&url=http://basiliskus.blogspot.com/2011/11/cambiando-focos-xd-4.html&ei=mHo_VcXIFqT3mQXfjIGIBA&bvm=bv.91665533,d.dGY&psig=AFQjCNE1FwOSb_uAzxkZWnPKC0dEtcxqyQ&ust=1430309860587581http://www.google.co.kr/url?sa=i&rct=j&q=&esrc=s&frm=1&source=images&cd=&cad=rja&uact=8&ved=0CAcQjRw&url=http://basiliskus.blogspot.com/2011/11/cambiando-focos-xd-4.html&ei=mHo_VcXIFqT3mQXfjIGIBA&bvm=bv.91665533,d.dGY&psig=AFQjCNE1FwOSb_uAzxkZWnPKC0dEtcxqyQ&ust=1430309860587581

  • 15

    Device

    Power

    My Description

    Manufacturer Description

    Main Living Room Light

    LED-Light-Co, 40W Equivalent Bulb

    Off/switch

    /oic/d

    /oic/p

    false

    Resource & Uniform Resource Identifier (URI)

  • 16

    DevA

    /switch

    /oic/d

    /oic/p

    Property

    Property Name Property Value

    Main Living Room Light

    LED-Light-Co, 40W Equivalent Bulb

    Off

    Main Living Room Light

    LED-Light-Co, 40W Equivalent Bulb

    Offfalse

    “name”: “Main Living Room Light”

    “mnmn”: “LED-Light-Co”, “mnmo”: “40W-EB”

    “value”: false

  • Device A

    Device B

    Client

    Server

  • Device A

    Device B

    Server

    Client

    Client

    Server

    Client and Server as Roles

  • 19

    Light

    /switch

    /oic/d

    /oic/p

    /oic/res

    “name”: “Main Living Room Light”

    “mnmn”: “LED-Light-Co”, “mnmo”: “40W-EB”

    /light/oic/d/oic/p

    oic.r.switch.binaryoic.wk.doic.wk.p

    Client

    false“value”: false

    RETRIEVE oic:///oic/res

    “Discovery”

    Resource Type• Resource Template

  • 20

    Light

    /switch

    /oic/d

    /oic/p

    /oic/res

    “name”: “Main Living Room Light”

    “mnmn”: “LED-Light-Co”, “mnmo”: “40W-EB”

    /light/oic/d/oic/p

    oic.r.switch.binaryoic.wk.doic.wk.p

    Client

    response

    false“value”: false

  • 21

    Light

    /switch

    /oic/d

    /oic/p

    /oic/res

    “name”: “Main Living Room Light”

    “mnmn”: “LED-Light-Co”, “mnmo”: “40W-EB”

    “value”: false

    /light/oic/d/oic/p

    oic.r.switch.binaryoic.wk.doic.wk.p

    Client

    UPDATE oic:///switch{ “value”: true }

    “Control”

  • 22

    Light

    /switch

    /oic/d

    /oic/p

    /oic/res

    “name”: “Main Living Room Light”

    “mnmn”: “LED-Light-Co”, “mnmo”: “40W-EB”

    /light/oic/d/oic/p

    oic.r.switch.binaryoic.wk.doic.wk.p

    Client

    200{ “value”: true }

    falsefalse“value”: true

  • 23

    Light

    /dimming

    /oic/d

    /oic/p

    /oic/res

    “name”: “Main Living Room Light”

    “mnmn”: “LED-Light-Co”, “mnmo”: “40W-EB”

    /light/oic/d/oic/p

    oic.r.switch.binaryoic.wk.doic.wk.p

    false“value”: 100

    /light “value”: true

    /dimming oic.r.light.brightness

  • 24

    R Uetr

    pdate

    e

    iev

  • 25

    Entity Handler

    Client CRUDN

  • 26

    Entity Handler

    Client

    Transport Transport

    Protocols Protocols

    Mapped

  • 27

    Entity Handler

    Client

    CoAPDTLSUDP

    IP

    CoAPDTLSUDP

    IPTransportSpecific

  • Putting it all together …

    28

    • Information Model• Resource oriented• RESTful architecture• Semantics• Physical abstraction

    • Data Model• For vertical and device

    • Data connectivity abstraction• Protocol and layer agnostic• Dynamic and late binding

    OICClient

    OICServer

    OIC Resource

    Entity(sensor / actuator interface)

    ConnectivityConnectivity

    OICRoles

    OICAbstractionInterfaces

    RESTfulResource

    Model Layer

    Implem-entationSpecific Protocol

    Layer

    OICDevice

    OICDevice

  • 29

    Expanding on the preliminary examples ….

  • Uniform Resource Identifier (URI)Relative Reference

    Form: /?Example: /oic/p

    URIForm: oic:///?Example: oic:///oic/p

    • “oic” is the scheme for constructing and parsing the main parts• Path: is a segmented name (used opaquely by recipient); not to be

    interpreted as hierarchy; case sensitive• Query: Separator is ‘;’, order of query is significant (when URI is used

    as index in proxy, caches etc), ‘filter’ is a reserved key

    30

  • 31

    C R U D Nreate

    etr

    pdate

    elete

    otify

    Five Methods

    e

    iev

  • Let’s look deeper at a Resource …

    32

    Server - DevA

    /dimming

    /oic/d

    /oic/res

    Main Living Room Light

    /switch/oic/d/oic/p

    oic.r.switch.binaryoic.wk.doic.wk.p

    false100

    /switch true

    /dimming oic.r.light.brightness

    /oic/p LED-Light-Co, 40W Equivalent Bulb

  • There can be more Properties …

    33

    /oic/pmnml

    mnmn

    pi

    http://ledlight.com/gg3-40

    Led-Light-Co

    GoGlow III - 40W

    mnmo GG3-40

  • Resource Type

    34

    jSON Schema*

    • Describes the Properties and Representation

    ReSTful API Modelling Language (RAML)*

    • Describes the Request and Response

    *jSON Schema and RAML are normative and also can be used for code generation

    "oic.r.switch.binary": {"type": "object","properties": {

    "value": { "type": "boolean","description": "Status of the switch"

    }}

    }

    get:responses :

    200:body:

    application/json:schema: |

    { }

    Defined by:(see OIC_Resource_Type_Specification)

  • 35

    OCF Specification defines “oic.wk.p” Resource Type for platform and its list of Properties

  • 36

    And …

    Additional core resources

    CR: conditionally required (i.e. if capability is supported)

  • Structure

    37

    Complexity

    Context

    Behaviours

  • How to represent …• Lights in a room• All the devices in a room• Rooms on a floor• All floors in a building

    • Devices in a group• Members in a family

    • A star topology

    38

    Living Room

    Main Light

    Table Light

  • Link

    {

    “href”: “/switch”,

    “rel”: “contains”,

    “anchor”: “/a/room”,

    “rt”: “oic.r.switch.binary”,

    “if”: “oic.if.a”,

    “bif”: “oic.if.baseline”

    }

    39

    /a/room /switchRoom contains a device

    with binary switch

    Target

    Relation

    Context

    Parameters

    How to define the connection between two resources?

  • Collections

    40

    DevD

    /room

    “name”

    “href”: “oic:///oic/d”,“rel”: “contains”,“rt”: “oic.d.light”

    “href”: “oic:///oic/d”,“rel”: “contains”,“rt”: “oic.d.light”

    “links”

    “Living Room”

    • A Resource that also has Links• Links declared in value of the “links” Property

  • Collections … example

    41

    {“rt”: “acme.room”,“if”: [“oic.if.r”, “oic.if.rw”],“color”: “blue”,“dimension”: “15bx15wx10h”,“links”: [

    {“href”:“/the/light/1”, “rel”:”contains”, “rt”:“acme.light”, “if”:[“oic.if.a”, “oic.if.baseline”]},{“href”:”/the/light/2”, “rel”:”contains”, “rt”=“mycorp.light”, “if”:[“oic.if.s” , “oic.if.baseline”]},{“href”:“/the/fan/1”, “rel”:”contains”, “rt”:“hiscorp.fan”, “if”:[“oic.if.baseline”]}

    ]}

    Common Properties

    Link

    Read-Write PropertyRead-only Property

    Link ParametersLink Target

    “Room” collection – room has lights and fan

    /my/room/1

  • Interfaces

    42

    “Room” collection – room has lights and fan

    “oic.if.ll”

    “oic.if.r”“oic.if.rw”

    “oic.if.s”oic.if.baseline”

    Interface views

    /my/room/1{“rt”: “acme.room”,“if”: [“oic.if.r”, “oic.if.rw”],“color”: “blue”,“dimension”: “15bx15wx10h”,“links”: [

    {“href”:“/the/light/1”, “rt”:“acme.light”, “if”:[“oic.if.a”, “oic.if.baseline”{“href”:“/the/light/2”, “rt”:“mycorp.light”, “if”:[“oic.if.s” , “oic.if.baseli{“href”:“/the/fan/1”, “rt”:“hiscorp.fan”, “if”:[“oic.if.baseline”]}

    ]}

    • Interface provides a “view” into a Resource or Collection• Interface defines allowed methods and semantics on that “view”

    • OCF has predefined Interfaces

    “oic.if.a”

  • Other InterfacesBatch – “oic.if.b”• Request forwarded to Link targets• Single Response with aggregated “target” responses

    Link Modify – “oic.if.lm” (under review)

    Factory – “oic.if.lf” (under review)

    Parameter – “oic.if.p” and “oic.if.rp” (under review)

    43

  • Complexity, Context & Behaviours• Also have

    • Scenes – Pre-defined settings for a number of resources(more details in subsequent presentation)

    • Rules – If This Then That• Scripts – A piece of code

    44

  • Navigating the Specs• Covered in this presentation

    • Core• Resource Type Specification (SmartHome)• SmartHome Device Specification

    • Not covered in this presentation• Security• Remote Access

    45

  • Thank You

    46

    OCF FundamentalsSlide Number 2Many kinds of devices …Many vertical/domains …Interoperability …Today … Transport Oriented …�Protocol Abstraction�OCF Framework�Slide Number 9Slide Number 10Ah … a light bulb !!Slide Number 12Slide Number 13Slide Number 14Slide Number 15Slide Number 16Slide Number 17Slide Number 18Slide Number 19Slide Number 20Slide Number 21Slide Number 22Slide Number 23Slide Number 24Slide Number 25Slide Number 26Slide Number 27Putting it all together …Slide Number 29Uniform Resource Identifier (URI)Slide Number 31Let’s look deeper at a Resource …There can be more Properties …Resource TypeSlide Number 35Slide Number 36Slide Number 37How to represent …LinkCollectionsCollections … exampleInterfacesOther InterfacesComplexity, Context & BehavioursNavigating the SpecsThank You


Recommended