You are on page 1of 32

Java in the Air: A Case Study for Java-Based

Environment Monitoring Stations


Marco Carrer, Eurotech
Andrew Gilbert, Oracle

Agenda

IoT Present and Challenges


Java, OSGi and Eclipse Kura: IoT Gateway Services
Embedded Data Streams: Edge Analytics
Use Case: Environment Monitoring Stations
Q&A

Gartners Hype Cycle

IoT Challenges
Where IoT projects most often fail
5
7
1

4
2

Sensors &
Device
Hardware
1

Selecting and
integrating sensors,
devices, sensors,
human machine
interfaces (HMI),
Meters, legacy field
busses & actuators
Ensuring long life
support
Meeting certification
requirements

3
M2M
Communication
Infrastructure

Device
Firmware /
Application
2

Selecting and
integrating
operating system,
device support /
drivers
Implementing the
business logic

Optimum
M2M
protocols
WAN cost
reduction
Security

Business
Application

Device data management


Device life cycle management
Security

Decoupling of
producers and
consumers of
data
Write speeds
Real-time data
streams
Data storage

Business
Application
Integration
6

Standard APIs
Ready to use
adapters for
standard
applications
CEP / Complex
Event Processing
capabilities

Application development & life cycle management


Dashboards, user interaction & interfacing
Integration (Big Data, social networks, enterprise IT)

Minimize
Downtime
High
Availability

Improving
operational
efficiency

Common
Development
Environment
across M2M
solutions

Real-time
Data Data
Analysis &
Management

Enabling
New Services
and faster
time to
market

Support for
a wide
variety
of devices

Security of
Devices and
Data
Protection

Cloud based
Services key
to reduce cost
& complexity

Intermittent
connectivity

Integration
and
Automation
with existing
systems

Extracting
value from
large
amounts of
data

Devices inmarket for longer


duration

Portability,
security with
scalability

Faster local
decision
making

Risk of
opportunity
lost or non
compliance

Challenges in
the IoT Era

Volume of data is increasing rapidly

Today, 11% of data is machine generated. By 2020,


that figure will rise to 40%, with a total of 20 billion
devices.
IDC Enterprise Worldwide
Server Predictions
March 2013

IoT Architecture
@

M2M/IoT Integration Platform on Cloud

Business
Applications

M2M
Integration
Platform
Application
Framework
+
Multi-Service
Gateway
Sensors,
Actuators,
Displays,

IoT Gateway Stack


Increase productivity and lower time to market
tivity
c
u
d
o
r
per s P
o
l
e
v
e
D

Code
on

Code
Code

OSGi

Java SE Embedded

Linux
Hardware

Java Today
The most popular programming language
for Enterprise Applications

Stewardship & Innovation

9+ Million Java Developers

Java Tomorrow
The most popular programming language
for Enterprise & Embedded & IoT Applications
3+ MILLION
JAVA DEVICES

Eclipse Kura
Embedded App

Modular software for IoT Gateway Service


Manage cloud connectivity
Network configuration and administration
Support for different protocols
Remote management and access
Integrated development environment
Application portability
Open sourced in Eclipse IoT

Java / OSGi
Linux OS
Open HW

ESF, with Kura at its foundation, is


commercially supported, remotely managed,
and optimized for industrial gateways and
applications.

Industrial
HW

Kura Services
Your Application

Your Application

Connectivity and Delivery


Cloud Services

Data Services

Field Protocols
MQTT Paho

Modbus

Network
Configuration
Network Configuration
Cellular, Wi-Fi,
Ethernet

Firewall,
Port Forwarding

CANBus
Link Monitors

Basic Gateway Services


DB Service

Device Profile

Clock Service

Watchdog

Custom Protocols

Administration GUI

Updates
Management
Configuration
Management

Remote Management

Remote Access
(VPN)

Applications

Device Abstraction
javax.comm

javax.usb / udev

GPS Position

GPIO / SPI / PWM / I2C

OSGi Application Container (Eclipse Equinox, Concierge)


Java SE 7 (Oracle Java SE Embedded, OpenJDK)

Kura Developers Experience


Designed from ground-up for developers
Emulate on PC

Deploy on Target

Cloud Managed

Start developing your M2M


application in the comfort of
your PC.

When you are ready, deploy


your application on the
gateway.

Provision your application to


field devices from the Cloud.

Full Eclipse Integration


Target Platform Definition
Emulated Services
Run/Debug from Eclipse
Support Mac/Linux Hosts

One-click Deployment
Eclipse Plugin
Remote Debugging

Manage your application


configuration and lifecycle
from a Cloud infrastructure.
No more field visits!
Web-based Console
REST API Integration
Smart Alerts

Key Elements of Connected Intelligence

Intelligent Devices Real-Time Analytics

Always-on
devices
connected to
variety of
sensors and
running multiple
software
applications

High-frequency
data analysis for
instant decision
making and
automation of
information flows

3
Fast Data

Maximizing value
from hi-velocity
data in real time

The value of data decreases over time


Ensuring Real-Time Accuracy, Efficiency, and Scale

Business Value

Business event

Data captured

Analysis completed

Action taken

Action Time

Source: Richard Hackethorns Components of Action Time

Complex Event Processing - CEP


! Method of tracking and analyzing

Event Stream
Fine-grained simple events from
sensors and edge devices

data combined from multiple streams


to infer events or patterns that
suggest more complicated
circumstances.
! Goal is to identify business meaning

of events (such as opportunities or


threats) and respond to them as
quickly as possible.

Event Patterns

Complex Events
Machine module nonfunctional, power outage,
device tampering, etc.
Source: http://en.wikipedia.org/wiki/Complex_event_processing

Complex Event Processing


Event Patterns

Filtering
New stream filtered for specific
criteria, e.g. temperature > 200 F
Correlation & Aggregation
Scrolling, time-based window
metrics, e.g. average heart pulse
rate in the last 3 days
Pattern Matching
Notification of detected event
patterns, e.g. machine events A,
B and C occurred within 15
minute window
Geospatial, Predictive Modeling
and beyond
Immediate recognition of
geographical movement patterns,
apply historical business
intelligence models using data
mining algorithms

Event Stream
Fine-grained simple events from
sensors and edge devices

Event Patterns

Complex Events
Machine module nonfunctional, power outage,
device tampering, etc.

Oracle Event Processing Embedded


OEP-E: High-Level Architecture

event

event

event

Query

event

event

event

Output Adapters

Sensors

Input Adapters

CEP Engine

Query

Real-time event data

Context-aware filtering, correlation,


aggregation and processing of data

Processed business
events for downstream
applications

Backend
Applications

Continuous Query Language - CQL


CQL is based on standard SQL with extensions for streaming data
CQL queries support filtering, partitioning, aggregation, correlation
(joins across streams), and pattern matching on streaming and
relational data
Extends standard SQL by adding notion of Stream, operators for
mapping between relations and streams, and extensions for pattern
matching
Window operator (e.g. RANGE 1 MINUTE) transforms stream into
a relation
Example:
SELECT AVG(temperature) AS avgTemp, tempSensorId
FROM temperatureInputStream [RANGE 1 MINUTE]
GROUP BY tempSensorId

Efficient Handling of Streaming Data Flow


Event Processing Network (EPN) Example

Use Case: Environmental Monitoring


From this

to this.

21

Eurotech ReliaSENS 18-12


Connectivity
Cellular (3g, GRPS), WiFi
Ethernet, GPS Positioning

Environment Analysis
Electromagnetic radiation
Radioactivity
Temperature, Humidity, Pressure

Air Quality Measurements

Air Out

Air In

CO, CO2, NO, NO2, O3


SO2, H2S, VOC
PM10

Eurotech ReliaSENS 18-12

One data point every minute


Aggregated averages every hour, 8 hours, and daily
Configurable thresholds and remote re-calibration

Java in the Air: Architecture

OEP-E
Bundles

ESF
Bundles

OSGi
Java SE Embedded

Linux
Hardware

Device
Connectivity

Oracle BI

MQTT
Device
Management

Data
Cache

Oracle 12c OEP

Everyware Cloud
Oracle 12c DB

Oracle Cloud

Account
Management

ORACLE
CLOUD

EUROTECH
DEVICE CLOUD
DEVICE/GATEWAY
(data collection
and edge analytics)

CLOUD

(device management and cloud analytics)

Java in the Air: Gateway


3. MQTT Output
Adapter
2. Event
Processing
Network

1. Sensor Input
Adapters

OEP-E
Bundles

ESF
Bundles

OSGi
Java SE Embedded

Linux
Hardware

4. Configuration
Updates

Input Adapters
PM10, ELF, TPU, CO2, GEIGER, HF, NO2,
CO, O3, VOC

Sensor Malfunctioning Detection


Raw Data Filtering

Stats

Alerts
Raw Data Publisher

Java in the Air: EPN

Java in the Air: CQL Examples


Stats CQL Query

Alerts CQL Query

27

MQTT Topic Namespace

Java1

CO2

RAW

FILTERED

DROPPED

HF

STATS

30sec

ALERTS

60sec

CHANGE

MISSING

RAW

FILTERED

DROPPED

VOC

STATS

30sec

ALERTS

60sec

CHANGE

MISSING

RAW

FILTERED

DROPPED

STATS

30sec

ALERTS

60sec

CHANGE

MISSING

Demo

Lesson Learned and Next Steps


EPN for modelling Embedded Business Logic
Great Synergies with Remote Management
More things to be explored:
Reduced OEP-E footprint
Out-of-the-box ESF/Kura OEP-E Components

You are important!


Learn More - come visit us on the Exhibition Floor:
Eurotech Booth
Oracle Booth
Eclipse Booth
Contribute!
www.eclipse.org/kura

Thank You!
www.eurotech.com

www.oracle.com

You might also like