CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

  • Upload
    suchai

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    1/32

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

    Environment Monitoring Stations

    Marco Carrer, Eurotech

    Andrew Gilbert, Oracle

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    2/32

    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

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    3/32

    Gartner’s Hype Cycle

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    4/32

    IoT Challenges Where IoT projects most often fail! 

    M2MCommunication

    Infrastructure

    DeviceFirmware /

     Application

    Business Application

    Sensors &Device

    Hardware

    Business Application

    Integration

    1

    2 3

    46

    •  Selecting andintegrating sensors,devices, sensors,

    human machineinterfaces (HMI),

    Meters, legacy fieldbusses & actuators

    • 

    Ensuring long life

    support•  Meeting certification

    requirements

    • 

    Selecting andintegratingoperating system,

    device support /drivers

    •  Implementing thebusiness logic

    •  OptimumM2Mprotocols

    •  WAN costreduction

    • 

    Security

    • 

    Device data management•  Device life cycle management•  Security

    5

    • 

    Decoupling ofproducers andconsumers of

    data•  Write speeds

    •  Real-time datastreams

    • 

    Data storage

    •  Standard APIs•  Ready to use

    adapters for

    standardapplications

    • 

    CEP / ComplexEvent Processingcapabilities

    1 2 3

    4 6

    5

    7

    • 

     Application development & life cycle management•

     

    Dashboards, user interaction & interfacing•

     

    Integration (Big Data, social networks, enterprise IT)

    7

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    5/32

    Challenges inthe IoT Era

    Enabling

    New Services

    and faster

    time to

    market

    Real-time

    Data Data

    Analysis &Management

    Minimize

    Downtime –

    High

    Availability

    Cloud based

    Services key

    to reduce cost

    & complexity

    Common

    Development

    Environment

    across M2Msolutions

    Faster local

    decision

    making

    Devices in-

    market for longer

    duration

    Risk of

    opportunity

    lost or non

    compliance

    Improving

    operational

    efficiency

    Integration

    and

    Automation

    with existingsystems

    Portability,

    security with

    scalability

    Extracting

    value from

    large

    amounts of

    data

    Support for

    a wide

    variety

    of devices

    Intermittent

    connectivity

    Security of

    Devices and

    Data

    Protection

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    6/32

     

    “Today, 11% of data is machine generated. By 2020,that figure will rise to 40%, with a total of 20 billion

    devices.”

    IDC Enterprise WorldwideServer Predictions

    March 2013

    Volume of data is increasing rapidly 

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    7/32

    IoT Architecture

    BusinessApplications

    Sensors,Actuators,

    Displays,! 

    @

    Application

    Framework

    +Multi-Service

    Gateway

    M2M/IoT Integration Platform on CloudM2M

    Integration

    Platform

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    8/32

    IoT Gateway StackIncrease productivity and lower time to market

    OSGi

    on 

    Linux

    Hardware

    Java SE Embedded

    Code

    Code

    Code

     D e v e l o p e r ’ s  P

     r o d uc t i v i t y 

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    9/32

    Java TodayThe most popular programming language

    for Enterprise Applications

    9+ Million Java DevelopersStewardship & Innovation

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    10/32

    Java TomorrowThe most popular programming language

    for Enterprise & Embedded & IoT Applications

    3+ MILLIONJAVA DEVICES

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    11/32

      Linux OS

    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

    ESF, with Kura at its foundation, iscommercially supported, remotely managed,and optimized for industrial gateways and

    applications.

    Java / OSGi

    Open HWIndustrial

    HW

    Eclipse Kura

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    12/32

    Kura Services

    Java SE 7 (Oracle Java SE Embedded, OpenJDK)

    OSGi Application Container (Eclipse Equinox, Concierge)

    Device Abstraction

     javax.comm

    Basic Gateway Services

    DB Service

    Clock Service

    Device Profile

    Watchdog

    Network Configuration Network Configuration

    Field ProtocolsConnectivity and Delivery

    Data Services MQTT Paho

       A   d  m   i  n   i  s   t  r  a   t   i  o  n   G   U   I

    Applications

    Your Application

       R  e  m  o   t  e   M  a  n  a  g  e  m  e  n   t

       C  o  n   f   i  g  u  r  a   t   i  o  n

       M  a  n  a  g  e  m  e  n   t

     javax.usb / udev

    Cloud Services

    Your Application

    Firewall,

    Port ForwardingLink Monitors

    Cellular, Wi-Fi,

    Ethernet

    GPS Position GPIO / SPI / PWM / I2C

    Modbus

    CANBus

    Custom Protocols

       U  p   d  a   t  e  s

       M  a  n  a  g  e  m  e  n   t

       R  e  m  o   t  e   A  c  c  e  s  s

       (   V   P   N   )

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    13/32

    Kura Developers’ ExperienceDesigned from ground-up for developers

    Emulate on PC Deploy on Target Cloud Managed

    Start developing your M2M

    application in the comfort ofyour PC.

    •  Full Eclipse Integration

    •  Target Platform Definition

    •  Emulated Services

    •  Run/Debug from Eclipse

    • 

    Support Mac/Linux Hosts

    When you are ready, deploy

    your application on thegateway.

    •  One-click Deployment

    •  Eclipse Plugin

    •  Remote Debugging

    Provision your application to

    field devices from the Cloud.

    Manage your application

    configuration and lifecycle

    from a Cloud infrastructure.

    No more field visits!

    •  Web-based Console

    • 

    REST API Integration

    •  Smart Alerts

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    14/32

    Key Elements of Connected Intelligence

     Always-on

    devicesconnected to

    variety of

    sensors and

    running multiple

    software

    applications

    1

    High-frequency

    data analysis forinstant decision

    making and

    automation of

    information flows

    2

    Maximizing value

    from hi-velocitydata in real time

    3

    Fast DataReal-Time AnalyticsIntelligent Devices

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    15/32

    The value of data decreases over timeEnsuring Real-Time Accuracy, Efficiency, and Scale

    Business event

    Action Time

       B  u  s   i  n  e  s  s

       V  a   l  u  e

    Data captured

     Analysis completed

     Action taken

    Source: Richard Hackethorn’s Component’s of Action Time

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    16/32

    Complex Event Processing - CEP

    !  Method of tracking and analyzing

    data combined from multiple streams

    to infer events or patterns that

    suggest more complicated

    circumstances.

    !

     

    Goal is to identify business meaningof events (such as opportunities or

    threats) and respond to them as

    quickly as possible.

    Source: http://en.wikipedia.org/wiki/Complex_event_processing

    Event Patterns

    Event StreamFine-grained simple events from

    sensors and edge devices

    Complex Events

    Machine module non-functional, power outage,

    device tampering, etc.

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    17/32

    Complex Event Processing

    •  Filtering

     – 

    New stream filtered for specificcriteria, e.g. temperature > 200 F

    • 

    Correlation & Aggregation

     –  Scrolling, time-based windowmetrics, e.g. average heart pulserate in the last 3 days

    • 

    Pattern Matching

     – 

    Notification of detected eventpatterns, e.g. machine events A,B and C occurred within 15minute window

    •  Geospatial, Predictive Modelingand beyond

     – 

    Immediate recognition of

    geographical movement patterns,apply historical businessintelligence models using datamining algorithms

    Event Patterns

    Event Patterns

    Complex Events

    Machine module non-functional, power outage,

    device tampering, etc.

    Event StreamFine-grained simple events from

    sensors and edge devices

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    18/32

    CEP Engine

    Query 

    Query 

    Oracle Event Processing Embedded OEP-E: High-Level Architecture

       I  n  p  u   t   A

       d  a  p   t  e  r  s

       O  u   t  p  u   t

       A   d  a  p   t  e  r  sevent

    event

    event

    Real-time event dataContext-aware filtering, correlation,aggregation and processing of data

    Processed businessevents for downstream

    applications

    event

    event

    event

    Sensors

    Backend Applications

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    19/32

    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 patternmatching

     – 

    Window operator (e.g. RANGE 1 MINUTE) transforms stream into

    a relation

    • 

    Example:

     – 

    SELECT AVG(temperature) AS avgTemp, tempSensorIdFROM temperatureInputStream [RANGE 1 MINUTE]

    GROUP BY tempSensorId

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    20/32

    Efficient Handling of Streaming Data FlowEvent Processing Network (EPN) Example 

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    21/32

    Use Case: Environmental Monitoring

    21

    From this!

     !

     to this.

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    22/32

    Eurotech ReliaSENS 18-12

    Air Out Air In

    Connectivity•

     

    Cellular (3g, GRPS), WiFi

    •  Ethernet, GPS Positioning

    Environment Analysis

    • 

    Electromagnetic radiation•  Radioactivity

    • 

    Temperature, Humidity, Pressure

     Air Quality Measurements

    • 

    CO, CO2, NO, NO2, O3 

    • 

    SO2, H2S, VOC•

     

    PM10

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    23/32

    Eurotech ReliaSENS 18-12

    •  One data point every minute

    •  Aggregated averages every hour, 8 hours, and daily

    •  Configurable thresholds and remote re-calibration

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    24/32

    Java in the Air: Architecture

    CLOUD(device management and cloud analytics)

    Everyware Cloud

    MQTT

    DEVICE/GATEWAY(data collection

    and edge analytics)

    Linux

    Hardware

    Java SE Embedded

    OSGi

    ESF

    Bundles

    OEP-E

    Bundles

    DeviceConnectivity

    EUROTECHDEVICE CLOUD

    DeviceManagement

    Data

    Cache

     AccountManagement

    Oracle Cloud

    ORACLECLOUD

    Oracle 12c DB

    Oracle 12c OEP

    Oracle BI

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    25/32

     

    Linux

    Hardware

    Java SE Embedded

    OSGi

    ESF

    Bundles

    OEP-E

    Bundles

    Java in the Air: Gateway

    3. MQTT Output Adapter

    1. Sensor Input Adapters

    2. EventProcessing

    Network

    4. ConfigurationUpdates

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    26/32

    Input AdaptersPM10, 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

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    27/32

    Java in the Air: CQL Examples

    27

    Stats CQL Query Alerts CQL Query

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    28/32

    MQTT Topic Namespace

    Java1

    CO2

    RAW

    FILTERED

    DROPPED

    STATS

    30sec 60sec

     ALERTS

    CHANGE MISSING

    HF

    RAW

    FILTERED

    DROPPED

    STATS

    30sec 60sec

     ALERTS

    CHANGE MISSING

    VOC

    RAW

    FILTERED

    DROPPED

    STATS

    30sec 60sec

     ALERTS

    CHANGE MISSING

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    29/32

    Demo

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    30/32

    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

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    31/32

     You are important!

    • 

    Learn More - come visit us on the Exhibition Floor: –

     

    Eurotech Booth

     – 

    Oracle Booth

     – 

    Eclipse Booth

    • 

    Contribute!www.eclipse.org/kura

  • 8/18/2019 CON3993 Java in the Air - A Case Study for Java-Based Environment Monitoring Stations

    32/32

    www.eurotech.com

    Thank You!

    www.oracle.com