api management and internet of things

33
API Management and Internet of Things Sumedha Rubasinghe Director, API Architecture

Upload: wso2

Post on 02-Jul-2015

1.073 views

Category:

Technology


0 download

DESCRIPTION

-

TRANSCRIPT

Page 1: API Management and Internet of Things

API Managementand

Internet of Things

Sumedha RubasingheDirector, API Architecture

Page 2: API Management and Internet of Things

**

Things, Devices, IoT

Source: http://www.control4.com/blog/2014/03/the-internet-of-things-and-the-connected-home

Page 3: API Management and Internet of Things

**

Anatomy of a Device

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

Page 4: API Management and Internet of Things

**

Anatomy of a Device (Functional)

● Functional Capabilities (Actuators)● Administration Capabilities (Management)● Monitoring Capabilities (Sensor Data)

Page 5: API Management and Internet of Things

**

Modeling Device as an API

● Example : HTTP API○ Temperature Sensor

■ http://{ip}/{locationid}/sensors/temperature1 - GET

○ Motor■ http://{ip}/{locationid}/actuators/motor1/rotate/{turns}/

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

Page 6: API Management and Internet of Things

**

Benefits - Devices as APIs

● APIs - Standard Integration Pattern○ Heterogenous devices■ protocols, access control mechanisms, data

formats● App Developers - Already familiar

programming paradigm● Seamless Integration with existing systems● Ability to re-user known Patterns for securing,

hardening APIs● API Economy

Page 7: API Management and Internet of Things

**

Drivers for API Economy

● Mobile Applications● Internal Innovation● Unleash External Developer Innovation● New Channels● New Business Models

Page 8: API Management and Internet of Things

**

Apps & APIs

Page 9: API Management and Internet of Things

**

Open APIs vs Managed APIs

● Dumb API -> Intelligent API● Authentication & Authorization○ Subscription Management○ Access Provisioning

● How to control access?○ Throttling

● Monitoring & SLA

Page 10: API Management and Internet of Things

**

Why Manage Device API?

● Why?○ Exposing raw device○ With no control

● Managed API○ proper access control○ subscription capabilities

Page 11: API Management and Internet of Things

**

Devices Need More Capabilities..

● Throttling● Caching● Request Routing● Buffering● Stats collection & monitoring● Alerting● Decision Making

Page 12: API Management and Internet of Things

**

OAuth

● Standard for Authorization● Provides client applications with secure,

delegated access to server resources on behalf of resource owner

● Authorization based on a Token

Page 13: API Management and Internet of Things

**

Using API Tokens to secure Device Access● Device capabilities can be represented as

resources● OAuth (2.0) tokens can be used to authorize

access to these resources● Tokens can be easily revoked, refreshed

Page 14: API Management and Internet of Things

**

OAuth2 Based Model for Securing Devices● Registering a new Device Type● Device Owner Registering a Device● Device Publishing Sensor Data● App Accessing Device (Controls)● Device Polling for Pending Actions

Page 15: API Management and Internet of Things

**

Registering a New Device Type

Page 16: API Management and Internet of Things

**

Owner Claiming a Device

Page 17: API Management and Internet of Things

**

Device Publishing Sensor Data

Page 18: API Management and Internet of Things

**

App Accessing Device

Page 19: API Management and Internet of Things

**

Device Polling for Pending Actions

Page 20: API Management and Internet of Things

**

API Management @ The Edge

● More closer to where device is● Or inside device itself● Several patterns

Page 21: API Management and Internet of Things

**

Pattern #1

App

End User

Device

Device is having full API Management capabilities.

Page 22: API Management and Internet of Things

**

Pattern #2

Authorization Manager

App

End User

Device

Device uses an authorization server to authorize access.

Page 23: API Management and Internet of Things

**

Pattern #3

Device Gateway

App

End User

Authorization Manager

Device

Having a Device gateway in front of device. Device gateway is exposed to outside world.

Page 24: API Management and Internet of Things

**

Pattern #4

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

Device gateway publishing device access statistics to a separate (scalable) processing engine.

Page 25: API Management and Internet of Things

**

Pattern #5

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

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

Routing helps to select the correct device.

Page 26: API Management and Internet of Things

**

Pattern #6

Device Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

Devices could be busy, unavailable.

Having a Queue helps to guarantee message delivery to/from device.

Page 27: API Management and Internet of Things

**

Pattern #7

Device Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

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

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

Device Hub

Device

DeviceDevice

Page 28: API Management and Internet of Things

**

Pattern #8

Device Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

Device Management helps to centrally manage large number of devices (common policies,etc)

Device Hub

Device

DeviceDevice

Device Management

Page 29: API Management and Internet of Things

**

Pattern #9

Device Queue

Mediation/ Routing

Device Gateway

App

End User

Authorization Manager

Statistics Processing

Device

Devices should also be connected to existing identity management systems.

Device Hub

Device

DeviceDevice

Device Management

Identity Management

Page 30: API Management and Internet of Things

**

API Traffic can be MASSIVESource : http://blog.programmableweb.com/2011/05/25/who-belongs-to-the-api-billionaires-club/

Source : http://blog.programmableweb.com/2011/05/25/who-belongs-to-the-api-billionaires-club/

Page 31: API Management and Internet of Things

**

Scaling for Billions of Devices

● Massive number of devices to be connected● Devices represented as APIs● Thus the need for scalable API Management

Page 32: API Management and Internet of Things

**

Barcelona Digital - Case Study

Page 33: API Management and Internet of Things

Contact us !