Osgi based architecture for iot gateways
This presentation is the property of its rightful owner.
Sponsored Links
1 / 53

OSGi-Based Architecture for IoT Gateways PowerPoint PPT Presentation


  • 133 Views
  • Uploaded on
  • Presentation posted in: General

OSGi-Based Architecture for IoT Gateways. About the Presenter. Dr. Dimitar Valtchev – CTO of ProSyst Software Responsible for the development of embedded middleware and management software at ProSyst for 15 years

Download Presentation

OSGi-Based Architecture for IoT Gateways

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Osgi based architecture for iot gateways

OSGi-Based Architecture for IoT Gateways


About the presenter

About the Presenter

  • Dr. Dimitar Valtchev – CTO of ProSyst Software

  • Responsible for the development of embedded middleware and management software at ProSyst for 15 years

  • Been involved in numerous residential, automotive and industrial engineering projects using the OSGi technology

  • Participating in standardization activities like those driven by OSGi Alliance and Home Gateway Initiative. Deputy Chair of Smart Home Task Force at Home Gateway Initiative


About prosyst

About ProSyst

A software vendor offering middleware and management solution for the Internet of Things. 

We are focused on open standards and open and neutral software platforms for service providers and device manufacturers to deploy applications and services.

mBS

OSGi-Based Gateway Middleware

mBS SDK

Software Development Kit for IoT Solutions

mPRM

Remote Device Management & Software Provisioning System


Agenda

Agenda

  • Gateway centric IoT solutions

  • OSGi runtime for IoT gateways

    • General architecture

    • Resource management

    • Realization of device abstraction

    • Providing automation rules and actions

    • OSGi gateways as a service delivery platform

  • Interaction of the OSGi runtime with IoT integration and management systems


Gateway centric iot architecture

Gateway centric IoT architecture


Osgi based architecture for iot gateways

Gateway Centric IoT


What is an iot gateway

What is an IoT Gateway?

  • Provides connectivity to the edge devices when they can not be directly connected to Internet

  • Runs local logic (from simple logic for data collection, filtering and propagation, to complex automation and application logic)

  • Is manageable


Advantages of using gateways in iot

Advantages of Using Gateways in IoT

  • Facilitates the support of heterogeneous protocols for connecting edge devices

  • Enables the realization of local automation and application logic

  • Provides autonomy of the solution when needed

  • Decreases the latency and allows real-time behavior

  • Allows optimization of the data traffic by applying local data analysis, optimization algorithms and analytics

  • Improved resource sharing and security


Gateway sw requirements

Gateway SW Requirements

Availability of standard services

Device abstraction

Automation engine

Event history and data logging

User Interface

  • Support of (heterogeneous) device protocols

  • Ability to run application logic

  • Remote management

  • Modularity

  • Life cycle management of the SW

  • Dependency management

  • Dynamical behavior

  • Application isolation

  • Resource management


Osgi based runtime for iot gateways

OSGi based runtime for IoT gateways


Osgi modular system for java

OSGi - Modular System for Java


Osgi specification w ork

OSGi Specification Work

  • OSGi specifies a horizontal service platform which has a wide acceptance in many areas from enterprise to embedded

  • It defines a set of important and very convenient system services such as user admin, configuration admin, log service, etc.

  • Recently there was a major progress in the work on IoT relevant services such as Resource Management and Device Abstraction


Osgi based iot end to end solution

OSGi-Based IoT End-to-End Solution

End-User Devices

Cloud Services

etc.

SMS

3rd Party

(Service)

Applications

ProSyst mBS

OSGi Applications

ProSyst mPRM

Other

Applications

Automation Layer

Data Collection

User and Role Management

Device Protocols

Management

Agent

Device Abstraction Layer

Device & Software Management

System Services

Software Repository

IoT Backend

OSGi Framework

Others

IoT Gateway


Impact of java evolution on osgi

Impact of Java Evolution on OSGi

  • Java SE Embedded 8 is anideal platform for running OSGi that can scale using introducednew concept called, Compact Profiles, which enable reduced memory footprint for applications that do not require the entire Java SE Embedded 8 platform. Currently three profiles are defined.

  • Integrated script engines like Nashorn (lightweight high-performance JavaScript runtime in Java 8) allows easily development of an automation engine conditions, rules and commands using script languages.


Java me embedded 8

Java ME Embedded 8

  • Not enough to run OSGi but a perfect platform for edge devices. Two options for integration in IoT:

    • Connected directly to the backend

    • Connected to the OSGi gateway (reason being security, authentication, automation, data aggregation, control

  • Java ME 8 is much more powerful then the older Java ME versions keeping the resource usage low

  • Java ME 8 is fully manageable and recently ProSyst added support for it in its backend system (a management agent of only 30kB)


Prosyst s iot runtime mbs

ProSyst‘s IoT Runtime (mBS)

mBS has a lot of non-functional characteristics which are crucial for building reliable solutions!

  • A low-footprint OSGi-Based IoT Gateway implementation

  • Enhanced runtime robustness and reliability

  • Intelligent, extensible native watchdog agent

  • Support for many JVMs and OS

  • SDK and tooling available


Resource management

Resource Management


Application isolation

Application Isolation

  • Why is it important in OSGi?

  • Must be implemented efficiently

  • Possible solutions

    • Multiple JVM instances

    • Java Security in OSGi

    • Multiple class loaders

    • Resource management


Requirements to resource management

Requirements to Resource Management

  • Identify critical system resources

  • Define usage limits (quota)

  • Trackresource creation, destruction

    • e.g. memory, CPU usage, network sockets, threads, disk space

  • Act on information available

  • Objective: Prevent system stall


Corrective and preventive actions

Corrective and Preventive Actions

  • Preventive

    • Warning threshold

    • Notification mechanism

  • Corrective

    • Stop or uninstall the bundles

    • Kill/disable the associated threads

    • Forcefully free the taken resources


Resource usage limits cpu

Resource Usage Limits - CPU


Resource usage limits sockets

Resource Usage Limits - Sockets


Osgi rfc 200 resource monitoring

OSGi RFC 200 – Resource Monitoring

  • https://github.com/osgi/design/blob/master/rfcs/rfc0200/rfc-0200-ResourceMonitoring.pdf

  • Entities:

    • ResorceMonitoring Service

    • ResourceContext

    • ResourceContextListener

    • ResourceListener

    • ResourceMonitor

    • ResourceMonitorFactory


Osgi rfc 200 resource monitoring1

OSGi RFC 200 – Resource Monitoring

  • Specifies:

    • API for explicit thread mapping

    • API for configuration

    • Notifications

  • Does not specify:

    • The method for determining the resource ownership

    • A resource configuration format (policy file)

    • Actions


Connectivity to the edge devices and abstracting the device interface

Connectivity to the edge devices and abstracting the device interface


Osgi based architecture for iot gateways

Connecting to Edge Devices

OSGi Middleware/Stack

Local Logic & (Web) Apps

APIs (Java & JSON-RPC / local and remote)

OSGi

Gateway

Automation Manager

(Scenes, Rules, Conditions)

Data Collection (Event History)

Device Abstraction(Devices, Zones)

DLNA / UPnP

Remote Management

SW+FW Update

Security

Connected

Devices

EnOcean

IP Cams

ZigBee

Z-Wave

wMBus

DECT ULE

UPnP

BT LE

Managed

Devices


Osgi based architecture for iot gateways

IoT Protocol Example: Smart Home

proprietary

non-proprietary

IP-Device(s)

(Discovery)

Wireless Protocols

Wired Protocols

IEEE 802.15.4

mDNS

Bonjour

IEEE 802.3

IEEE 802.11

EHS/Konnex

non-IP-based

IP-based

IPv6-capable

IPv4-capable


Abstraction layer concepts hgi reference

Abstraction Layer Concepts (HGI Reference)

RP7

  • RP1 – Abstraction Layer Interface

    • The local interface that applications on the gateway use

  • RP2 – Device Driver Interface

    • The interface to integrate HAN technologies

  • RP4 – Remote Interface

    • The interface between an operator cloud platform and the gateway

  • RP7 – Cloud API

    • The interface provided to third parties from the operator cloud platform

  • OSGi deals with RP1!

Remote Access Middleware

RP4

HOME GATEWAY

Remote Access Agent

App 1

App N

Abstraction Layer

RP2

RP1

D1

D2

D3

Dx


Working together

Working together …

HAN technology owners

and vendors

Edit and align a SDT

Liaise SDT to domain specific organizations

Joint work on SDT

Map ontology template to OSGi technology

Jointly approaching domain specific organizations (verticals)

Application and platform

developers

Operators

OEMs and vendors

Semiconductors

Instantiates SDT with their respective device characteristics

Any unification effort needs to accommodate the end to end value chain of Smart Home services to gain maximum impact

Joint work on SDT

Map SDTto BBF TRs (if needed)

Jointly approaching domain specific organizations (verticals)

Instantiates SDT with their respective device characteristics

  • Joint work on SDT

  • Map SDT to specific technologies:

  • ETSI M2M REST APIs

  • EEBus APIs

  • Jointly approaching domain specific organizations (verticals)

Application and platform

Developers

OEMs and vendors

Operators

OEMs and vendors

Semiconductors

Application and platform

Developers

OEMs and vendors

This figure is not at all comprehensive; it only shows a possible starting point.


Basic functions of a device abstraction api

Basic functions of a Device Abstraction API

  • Discovery: Notification mechanism when adding or removing smart appliances

  • Control and query: Set and retrieve state values of appliances

  • Eventing: Notification mechanism upon change of state values

  • Management: Inclusion/exclusion of appliances, key management, firmware upgrades etc.


Osgi based architecture for iot gateways

OSGi RFC 196 – DAL

  • https://github.com/osgi/design/tree/master/rfcs/rfc0196

  • API applicable for all relevant device protocols

  • General device data model

  • Device operations

  • Access control based on user and application permissions

    • Fine-grained security control

    • Full flexibility of OSGi security model

  • A notification mechanism is needed for:

    • Device state monitoring

    • Device data model monitoring

    • Device operations monitoring


Osgi based architecture for iot gateways

Device Abstraction Layer – Entities – Device

  • org.osgi.service.dal.Device

  • Represents the device in the OSGi service registry

  • It’s possible to map a few OSGi device services to one physical device

  • Provides an access to rich set of device properties: status, name, description, types, model, firmware version and vendor, hardware version and vendor, etc.

  • A set of functions can be assigned to the device

  • There can be a relationship between the devices


Osgi based architecture for iot gateways

Device Abstraction Layer – Online Device Status

  • Device online status – indicates that the device is currently available for operation. Possible transitions from and to that status are:


Osgi based architecture for iot gateways

Device Abstraction Layer – Entities – Function

  • org.osgi.service.dal.Function

  • Represent a specific device functionality in the OSGi service registry like MultiLevelSwitch, BooleanSensor, etc.

  • Can provide a set of properties with:

    • Access type – eventable, writable and readable

    • Additional metadata – description, min and max value, measurement unit, etc.

  • Can provide a set of operations with:

    • Metadata – description, parameters/return value min and max, parameters/return value measurement unit, etc.

  • Can be clarified with version, reference functions, type and description


Osgi based architecture for iot gateways

Device Abstraction Layer – Function Property

  • Function property metadata:

    • access type – represents the access to the function property

      • eventable – the property value is reported with an event

      • writable – the property value can be changed

      • readable – the property value can be read

    • unit – represents the value unit

    • min and/or max value – the property value cannot cross a given minimum or maximum value

    • description – human readable description

    • values – contains a set of predefined values, which can be assigned to the property

    • resolution – difference between two values in series


Osgi based architecture for iot gateways

Device Abstraction Layer – Function Operation

  • Function Operation metadata:

    • parameters – they are using the same metadata as Function property from the previous slide

    • return value – it’s using the same metadata as Function property from the previous slide

    • description – human-readable operation description


Osgi based architecture for iot gateways

Practical Realization of Device Abstraction

Events / Web Sockets

JSON RPC or REST

RP4(s)

RP2

JSON Remote Handler

RP1

Device Abstraction Layer

SPI

get, invoke

update

DAL Adapter

get, invoke

update

Methods

Events

ProtocolAPI

events

methods

ProtocolImpl

RS232/RS485

TCP/IP


Providing automation rules and actions

Providing Automation Rules and Actions


Osgi based architecture for iot gateways

Automation Manager Architecture

3rd Party Extenders

Condition Provider

Command Provider

Build-in Modules

Your Application

Conditions

Commands

Scene Command

Rule

Automation Manager

Event Admin


Using osgi gateways as a service delivery platform

Using OSGi Gateways as a service delivery platform


Enabling the open ecosystem

Enabling the Open Ecosystem

Develop

ISVs /

Developers

Publish Apps

App

Store

SDK & Dev

Program

Run

Apps

Distribute

OSGi IoT

Gateway

Many Edge Devices

Many Services

Many Apps

Find &

Download

Manage

Monitor

Single IoT Gateway

Simple, Efficient, Cost-effective Solution

Edge Devices


Osgi based architecture for iot gateways

APIs for Application Development

OSGi IoT Solution Stack

Local Logic (OSGi Apps)

Web Apps (HTML5)

iOS/Android Apps

APIs (Java & REST for local host, local network and remote access)

Automation Manager

(Scenes, Rules & Conditions for Automation)

Data Collection

(Local Event History and Data Logging)

Device Abstraction Layer

(Devices: Actions, Properties and Zones; User-specific Rights Management)

Security

TLS / X.509

Remote Management

Backend Agent

Software Update

Remote and Local

Diagnostics

Monitoring

EnOcean

IP Cams

. . .

ZigBee

Z-Wave

DECT ULE

wMBus

. . .

UPnP

BT LE


Osgi based architecture for iot gateways

IoT User Interfaces

ProSyst mBS

Gateway

Connection

Tunneling

ProSyst mPRM

Web & Native Apps

Local

Network

(HTTP)

Internet

(HTTPS)

REST API for Generic Service Access

Secure

Always-on

Connection

Applications & System Services

OSGi Framework

IoT Gateway


Osgi based architecture for iot gateways

OSGi-based HomeKit Bridge Accessory

Apple

iCloud

ProSyst mBS

iCloud

Sync

HAP

Pairing & Security

Bonjour

Discovery

HAP

Device

Events

HAP REST API

Device Protocols

Apple iOS

Device

Local

Network)

HAP-DAL

Device

Bridge

OSGi HTTP Server

Device Abstraction Layer (DAL)

OSGi Framework

etc.

IoT Gateway


Iot backend integration

IoT Backend Integration


Osgi based iot end to end solution1

OSGi-Based IoT End-to-End Solution

End-User Devices

Cloud Services

etc.

SMS

3rd Party

(Service)

Applications

ProSyst mBS

OSGi Applications

ProSyst mPRM

Other

Applications

Automation Layer

Data Collection

User and Role Management

Device Protocols

Management

Agent

Device Abstraction Layer

Device & Software Management

System Services

Software Repository

IoT Backend

OSGi Framework

Others

IoT Gateway


Osgi based architecture for iot gateways

Remote Device Management


Osgi based architecture for iot gateways

Application Provisioning


Osgi based architecture for iot gateways

Infrastructure and Services For Backend IoT Apps


Prosyst s iot backend building blocks

ProSyst’s IoT Backend Building Blocks

mPRM API

JSON-RPC

Java, JMS

Groovy

REST

M2M Platform

Device Management

Software Management

Device Inventory

Software/Content Repository

Device Data Collection

Remote Configuration

Application & Lifecycle Management

Real-time Readings

Historical Data

Device Monitoring

Firmware & Application Update

Remote Device Control

SW Dependency Management

Rmt Diagnostic & Troubleshooting

Remote Network Access

Backup & Recovery

SW Compatibility Management

Rule-based Automation

Scripting

Event/Audit & Data Logging

Alert/Alarm Management

Core Platform

Performance Statistics

Security/Access Control

mPRM Messaging

HTTP(S) Tunnel

MQTT

TR069

Device Connectivity

CoAP

OMA DM

OMA Download

LWM2M

XMPP


Summary

Summary

  • An architecture based on the usage of IoT gateways is the best approach in a significant number of IoT use cases

  • Java and OSGi are perfectly suitable to be used as a software runtime in IoT gateways and do not have serious alternatives currently

  • The software stack of IoT gateways must be designed from the very beginning by taking into account the requirements for interaction with the backend

  • ProSyst offers a very complete and mature commercial solution for IoT based on OSGi which includes a powerful backed system


More information

More Information

For more information on our company:

www.prosyst.com

For an evaluation of our Cloud IoT Platform:

cloud.prosyst.com

For an evaluation of our gateway and backend stack:

dz.prosyst.com


Osgi based architecture for iot gateways

Thank You!

Dr. Dimitar Valtchev

CTO, ProSyst

+ 49 221 6604-501

[email protected]


  • Login