2015 06-api days-sf-apis-dbridge2iot-asanka

36
APIs : The Bridge to IoT Asanka Abeysinghe Vice President, Solutions Architecture - WSO2,Inc

Transcript of 2015 06-api days-sf-apis-dbridge2iot-asanka

APIs : The Bridge to IoT

Asanka Abeysinghe

Vice President, Solutions Architecture - WSO2,Inc

2

Trip to Sri Lanka

3

Connect everything to anything.

4

5

Connecting the new/old world

6Picture Credit : Flicker – Sam Valadi

Smart basketball

7Picture Credit : http://www.94fifty.eu/

Nike running app

8Picture Credit : https://secure-nikeplus.nike.com/plus/running/home

Aggregated view

9

Anatomy of a device : isolated

- Piece of hardware- Built for a purpose- Capable for a limited functionality - Control interface - Input/output - Consumes power

10

{API}s to avoid isolation.

11

Anatomy of a device : functional

- Functional capabilities (actuators)- Administration capabilities (management)- Monitoring capabilities (sensor data)

12

{API}s to enable the device functionality.

13

{API}s at the edge

14

Inside device itself

Closer to the device

{API}s and devices

15

TO FROM

FUNCTIONAL

SYSTEM

Modeling device as an {API}

- HTTP API- Temperature sensor

- http://{ip}/{locationid}/sensors/temperature -GET

- Motor - http://{ip}/{locationid}/actuators/motor1/rotate/{turns}/{direction} -POST

- http://{ip}/{locationid}/actuators/motor1/status -GET

16

*

App

End User

Device

Device has full API Management capabilities.

Pattern #1

{API}

*

Authorization Manager

App

End User

Device

Device uses an authorization server to authorize access.

Pattern #2

{API}

{API}

*

Device Gateway

App

End User

Authorization Manager

Device

Having a Device gateway in front of the device.

Pattern #3

{API}

{API}

{API}

*

Device Gateway

App

End User

Authorization Manager

Analytics

Device

Device gateway publishes events to an external (scalable) event processing engine.

Pattern #4

{API}

{API}

{API}

{API}

Analytics

21

*

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Analytics

Device

Having mediation & routing capabilities help to transform the messages going back and forth from the device.

Routing helps to select the correct device.

Pattern #5

Device

{API}

{API}

{API} {API}

{API}

{API}s and Mediation as the protocol to connect

with the ecosystem.

E.g. Systems of record/engagement/automation

23

*

Event Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Analytics

Device

Devices could be busy/ unavailable. Having a Queue helps to guarantee message delivery to/from device.

(pub/sub api)

Pattern #6

{API}

{API}

{API}

{API}

{API}

{API}

*

Event Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Analytics

Device

Some devices are not built with sufficient processing capabilities. They could be low powered ones.

A Device hub will help such devices connect to the rest of the world.

Device Hub

Device

DeviceDevice

Pattern #7

{API}

{API}

{API}

{API}

{API}

{API}

{API}{API}

*

Event Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

Device Management helps a large number of devices (common policies,etc) to be managed centrally.

Device Hub

Device

DeviceDevice

Device Management

Pattern #8

{API}

{API}

{API}

{API}

{API}

{API}

{API}

Reference architecture

27

SenseBot

28A robotic car, built around the Arduino Uno and WSO2 Platform.

How SenseBot works

29

SenseBot APIs

/controller/{direction} - POST

/sensordata/ldrstats – POST/sensordata/motionStats – POST/sensordata/sonarStats – POST/sensordata/tempreatureStats – POST/sensordata/humidityStats - POST

30

Device cloud

31

Hackathon in London

32

IoT reference architecture

33

Enterprise middleware and cloud platform from systems of record to

systems of engagement

( data to consumer )

Summary

35

- Integrate the IoT and the IT world- Developer productivity & go to market- Events management- QoS

- Security- Scalability- Reliability

- Device management & governance- Be prepared to adapt to the future

{API

}s

36

b : http://asanka.abeysinghe.orgt : @asankamae : asankaa AT wso2.comw : http://wso2.com