java technology in the small iot devices -...

24
© IS2T S.A. 2017. All rights reserved. Java Technology in the Small IoT Devices Eclipse IoT Day, Grenoble, March 9 th 2017 hps://projects.eclipse.org/projects/iot.edje

Upload: vanhanh

Post on 07-Mar-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

© IS2T S.A. 2017. All rights reserved.

Java Technology in theSmall IoT DevicesEclipse IoT Day, Grenoble, March 9th 2017

https://projects.eclipse.org/projects/iot.edje

Page 2: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

Laurent Lagosanto

Senior Architect at MicroEJ®

18 years of “in the Small” activities, mostly about Java Technology

[email protected]

ABOUT THE PRESENTER

March 9th, 2017 Eclipse IoT Day Grenoble

The information contained herein is not warranted to be error-free.

MicroEJ® and all relative logos are trademarks or registered trademarks of IS2T S.A. in France and other Countries.

Java™ is Sun Microsystems’ trademark for a technology for developing application software and deploying it in cross-platform, networkedenvironments. When it is used in this site without adding the “™” symbol, it includes implementations of the technology by companies other thanSun. Java™, all Java-based marks and all related logos are trademarks or registered trademarks of Sun Microsystems Inc, in the United States andother Countries.

Other trademarks are proprietary of their respective owners.

2

Page 3: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

ECLIPSE IOT : THREE VERTICALS

Checkout Eclipse IoT Whitepaper from 2016 Q4

Page 4: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

Java Web Services

Java EE Engines

Java IoT Protocol Stacks

Eclipse IDEs

JAVA TECHNOLOGIES ARE PERVASIVE, REALLY ?

Java Applications

Java OSGi Containers

Java IoT Protocol Stacks

Eclipse IDEs

Monolithic Firmwares

RTOS + Apps

Native Protocol Stacks

Eclipse IDEs

March 9th, 2017 Eclipse IoT Day Grenoble 4

Page 5: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

« Too big »

JAVA TECHNOLOGIES IN THE SMALL, WHY NOT?

« Too slow »

« Too complex »

« Not secure »

« I don’t need dynamic loading »

« I don’t need a Java Virtual Machine, I have Linux »

March 9th, 2017 Eclipse IoT Day Grenoble 5

Page 6: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

LET’S DEBUNK SOME MYTHS…

Size can be controlled, if you pick the right features & APIs (ever heard of Java Card ?)

You are NOT forced to interpret bytecodes, you know !

Linux cannot go NOT everywhere ! (Cortex-M anyone ?)

No dynamic loading ? So your product software will never be updated ?

A Virtual Machine provides sandboxing, even if you don’t have an MMU

Bytecodes can be downloaded safely : they can be verified

An automatically managed memory is safer, more efficient, than if statically allocated

March 9th, 2017 Eclipse IoT Day Grenoble 6

Page 7: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

AND SOME OTHER ADVANTAGES:

Java Language is Object Oriented and helps build Services Oriented architectures

(think about what you can do with Class.forName(…) or, instanceof …)

Java APIs are well defined, and cover a wide functional range

(Language level APIs, I/Os, Collections, Net, TLS, Junit, Crypto, …)

Java Technologies are part of a huge ecosystem : developers, tools, trainings, opensource projects and communities

March 9th, 2017 Eclipse IoT Day Grenoble 7

Page 8: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

MICROEJ AND ECLIPSE : THE EDJE PROJECT

Sensors/ActuatorsSensors/Actuators

Local NetworkLocal Network

InternetInternet

A Java library at the edge of the IoTfor sensor hubs and devices

Page 9: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

Edje focuses on the following aspects

EDJE API INITIAL FOCUS : PERIPHERALS AND I/O

Eclipse IoT Day Grenoble

ControllerCommunication

Interfaces

Serial Port

CAN

Digital andAnalog I/O

GPIO

PeripheralManagement

LCD

USB Devices

Analog Input

March 9th, 2017 9

Page 10: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

JavaSE

List of minimum Java API

The minimum execution environment provided by an Edje-compatible device

Intersection between Java SE, Java SE Embedded, MicroEJ and Android

EDJE IS ALSO ABOUT DEFINING A COMMON API

March 9th, 2017 Eclipse IoT Day Grenoble 10

JavaSEEmbedded

Android

EDC

Page 11: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

List of minimum Java API

The minimum execution environment provided by an Edje-compatible device

Intersection between Java SE, Java SE Embedded, MicroEJ and Android

EDJE DEVICE CONFIGURATION (EDC)

March 9th, 2017 Eclipse IoT Day Grenoble 11

Edje Device Configuration

Edje API

Edje Application

Library

ExecutionEnvironment

ApplicationFramework

OtherAPIsOtherAPIsOtherAPIs

Page 12: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

How do you define such an API set:

- By looking at what customer applications need

- By trying to run useful open source libraries / services(Eclipse Paho, Eclipse Leshan, Eclipse Californium, cf the next presentation)

- By looking at other APIs on the market

- Android (Things)

- JDK Device I/O (Kura)

- It’s an ongoing effortMicroEJ 4.1 is due next month, Embedded World is next week, EclipseConverge isnext…. expect some news…

EDJE DEVICE CONFIGURATION (EDC)

March 9th, 2017 Eclipse IoT Day Grenoble 12

Page 13: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

Independent Software Vendor, global player in the embedded IoT industry

• http://www.microej.com/about

• Software tool & runtime licenses

• Professional services, training & consulting

KEY FINANCIALS

• $5M Series B funding end 2011 – $20M R&D total investment

Offices in France, Germany, USA

Expertise in embedded, virtualization, software engineering & process

Partnerships with key IoT, silicon, embedded SW and HW (EMS) vendors

ABOUT MICROEJ

March 9th, 2017 Eclipse IoT Day Grenoble 13

Page 14: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

PARTNERS & CONSORTIA – STRONG BUSINESSPARTNERS

14

SERVICES

SOFTWARE CLOUD

ALLIANCES

HARDWARE

Page 15: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

OPERATING SYSTEMS FOR ENABLING THE IOT

March 9th, 2017 Eclipse IoT Day Grenoble 15

RTOS Linux

Vo

lum

e

75%IoT = “sub-gig” things:• Processor < GHz• Memory < GB

25%

SW Foundation

MPU (>$10 ASP)MCU ($1-6 ASP)

Page 16: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

AN EXAMPLE OF FOOTPRINT REDUCTION

March 9th, 2017 Eclipse IoT Day Grenoble 16

James BauerJames Bauer James Bauer

Reply

Call me later

James Bauer

Reply

Call me later

AlexJackson

Hi there! I’llbe late, sorry.

RTOS (Linux) + Java platform RTOS (Any/None) + Java platform

Power 410 mAh – batteries recharge every day Batteries recharge every two or three weeks

Processor Qualcomm Snapdragon 400 MSM8226,ARM based Quadcore 1.2 GHz

ARM Cortex-M4 based MCU, 100 MHz

RAM (data) 256 MB Less than 0.5 MB

FLASH (Code + Resources) 2,000 MB 2 MB

Boot Time 35,000 ms 50 ms

63% Bill of Materials savings

87% power consumption savings

Page 17: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

March 9th, 2017 17

MICROEJ FLAGSHIP PRODUCT LINE

STOREFOR

APPLICATIONDEPLOYMENT

STUDIOFOR

APPLICATIONDEVELOPMENT

SDK: OS & TOOLSFOR

DEVICESOFTWARE

DEVELOPMENT

Page 18: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

MICROEJ SDK COMPONENTS

18March 9th, 2017

Page 19: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

SINGLE-APP DEVELOPMENT WORKFLOW

March 9th, 2017 19

MicroEJ Studio

• App development

MicroEJ SDK

• Firmware development

MicroEJ OS+ Libraries

+ BSPPla

tfo

rm

App App App

MicroEJFirmware

MicroEJFirmware

App App

App App App

Sandboxed App binaries(built for a specific firmware)

Deploymentto

Infrastructure

Program

DynamicLoad & Install

Resident App

MicroEJFirmware

Link

MicroEJ Store

MULTI-APP DEVELOPMENT WORKFLOW

ExecutableBinary

MicroEJ SDK

•Platform development

•App development

StandaloneApplication

MicroEJ OS+ Libraries

+ BSPPla

tfo

rm

ExecutableBinary

ProgramAp

p

MonolithicMicroEJ

Firmware

MonolithicMicroEJ

Firmware

Link

Page 20: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

WHAT TYPES OF PRODUCTS CAN YOU BUILD ?

Eclipse IoT Day GrenobleMarch 9th, 2017 22

Sowee was announced by EDF at CES 2017

The offer includes a remote controller that runs a mixof MicroEJ and Eclipse IoT Java Technologies:

Page 21: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

MicroEJ & Eclipse IoT Java Technologies:

• running on Renesas PEACH(Cortex A9, 10MB RAM, Arduino connector, Ethernet)

• a LWM2M client connected to leshan.microej.com

• a MQTT client connected mqtt.microej.com

• an example app playing with Leds and publishes on a topic

• a heartbeat service that publishes uptime on a topic

LET’S SEE THIS IN ACTION : LIVE DEMO

March 9th, 2017 Eclipse IoT Day Grenoble 23

Page 22: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

THANK YOU FOR YOUR ATTENTION!

https://projects.eclipse.org/projects/iot.edje

24March 9th, 2017

https://developer.microej.com/

Page 23: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

• Get a MicroEJ Compatible boarde.g. STM32F746G-DISCO board from ST Microelectronics (~50€)(more boards are listed on developer.microej.com)

• Get a free copy of MicroEJ Studio at https://developer.microej.comfollow the instructions in https://developer.microej.com/getting-started.html

• Clone the developer branch at https://github.com/MicroEJ/edje(it will be soon in https://github.com/eclipse/edje)

• Build Edje libraries from MicroEJ Studio(right-click « build with EasyAnt » on the two libraries projects you’ll get from github)

• Run the sample applications from MicroEJ Studio(right click « Run As MicroEJ Application » and the app will be remotely installed and startedon the board)

HOW DO YOU TEST OUT EDJE ?

Eclipse IoT Day GrenobleMarch 9th, 2017 25

Page 24: Java Technology in the Small IoT Devices - Eclipsewiki.eclipse.org/images/6/6f/EdjeIoTDaysGrenoble.pdf · Java Technology in the Small IoT Devices Eclipse IoT Day, ... A Virtual Machine

• Get a free copy of MicroEJ Studio at https://developer.microej.comfollow the instructions in https://developer.microej.com/getting-started.html

• MicroEJ Foundation Libraries:http://developer.microej.com/javadoc/microej_4.0/foundation/index.html

• MicroEJ Addon Libraries:http://developer.microej.com/javadoc/microej_4.0/foundation/index.html

• MicroEJ GitHub: (for examples, libraries, tools)https://github.com/MicroEJ

NEED MORE THAN JUST EDJE ?

Eclipse IoT Day GrenobleMarch 9th, 2017 26