User Tools

Site Tools


iotivity_cloud

IoTivity Cloud

This project is for extending accessibility of IoTivity devices and scenarios using some techniques like HTTP to CoAP proxy, OAuth 2 over CoAP and so on. Users can access their devices under their prefer accounts through cloud. Also when user share credential to other services, they can access to user devices for automated control. More informations are here, https://wiki.iotivity.org/iotivity_cloud_-_programming_guide

Architecture

Resource Server/Client: IoTivity enabled devices that initiate session using CoAP over TCP/TLS to Cloud Interface server which scattered over the world.

Region Cloud/Cloud Interface: Region based server that accepts connection from clients, receive notification data and send RESTful message through connected pipelines. They are clustered by global cloud.

Global Cloud: This main cloud clusters region clouds using provided API like publish/discover resources. The account server supports interfaces that other OAuth2.0 enabled authentication providers can extend their user’s identity to OIC cloud. OIC resource server/client can guide user that they can register their devices using one of authentication providers which registered to account server.

3rd Party Cloud (TBD): Service provider that control to, receive data from region cloud and global cloud.

Scenario

Easy-Setup: Most of IoT devices is hard to setup the network due to lack of input devices. IoTivity Easy Setup is one of technique that make devices connected. IoTivity Cloud supports Easy-Setup scenario using OAuth2 credential.

Remote Control: Once the resource servers has published, resource client can see and access them even they are not co-located. They can communication over the area/region.

Service Integration(TBD): 3rd Party service provider also sees and controls the resource server. Users can handle access control to each devices that service providers can access or not.

Feature

Contribution approach

Cloud side

  • Server base stack
    • Use Netty framework ( http://netty.io )
    • CoAP over TCP encoder/decoder
    • Part of Cloud Interface and Resource Directory server
  • Cloud Interface server
    • Server side OAuth2.0 handshake protocol implementation
    • Keep-Alive resource server that client can check TCP session.
    • Relay handler that clients can communicate when they are connected different CI server.
  • Resource Directory server
    • Provides resource registration, discovery, update and delete to CI server.
    • Stores resource information to physical database.
  • Account server
    • Manage user and access tokens.
    • (TBD) Scattered or centralized
  • MQ(Message Queue) Broker

Device side

  • Sample client application
    • Client side OAuth2.0 handshake protocol implementation
    • Keep-Alive resource client
    • Send resource registration/discovery request

References

  • Keep-Alive

To ensure that the TCP connection between device and cloud is still alive, device or cloud should send application level Keep-Alive messages. (Please refer the Core Specification Project B documents ( 12.6. CoAP serialization over TCP ))

  • The reason to support application layer Keep-Alive are as follows :
    • Kernel level TCP KeepAlive only guarantees that a connection is alive at the network layer, but not at the application layer.
    • Interval of TCP KeepAlive is configurable only using kernel parameters and is OS dependent. ( eg. 2 hours by default in Linux )
  • Detailed Features
    • Use Fixed Ping resource
      • URI: /oic/ping, Type ID: oic.wk.ping, Interfaces: oic.if.rw
    • Fixed Interval Time
      • Start from 2 minutes and increases in multiples of 2 up to 64 minutes.
    • Disconnect logic
      • OIC Client does not receive the response with 1 minutes.
      • OIC Server does not receive a PUT request within interval time.
  • Base Layer Changes
    • Support a resource of type oic.wk.ping
    • Maintain the OIC Device Information connected by CoAP over TCP to send KeepAlive message.
  • Netty Framework
  • Netty is an asynchronous event-driven application/framework making it easy for users to write network socket programs. Originally It was developed by JBoss, and now being developed and maintained by the Netty Project Community. It supports HTTP, websocket, SSL/TLS and so on.
  • Official home page : http://netty.io/
iotivity_cloud.txt · Last modified: 2017/01/14 02:46 by Phil Coval