construction d'applications dans la jungle de...

27
Construction d'applications dans la ungle de l'IOT DIVERSE : DIVERsity-centric Software Engineering

Upload: ngokhuong

Post on 01-Apr-2018

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Construction d'applications dans la jungle de l'IOT

DIVERSE : DIVERsity-centric Software Engineering

Page 2: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Software intensive systems

Page 3: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel
Page 4: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Context: Buidling services on top of the IoT Jungle

• Heterogeneous and Distributed Services • Heterogeneous: The infrastructure on which the service

runs is composed of a set of different nodes and networks. •  The “IOT Jungle" which ranges from microcontroller based

sensors and devices to cloud.

• Distributed: The implementation of the services is composed of a set of independent processes communicating asynchronously. •  Truly distributed services implementation is required in order to

provide useful and reliable services which take advantage of the infrastructure.

Page 5: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Examples n  Health domain and ambient assisted living n  Energy domain and smart grids n  Environmental monitoring and oil and gas n  Safety in hazardous environments n  Intelligent Transport Systems (ITS) n  ...

Page 6: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Heterogeneous infrastructure

Page 7: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

New Services on top of the IoT Jungle

Legacy Partner

Proprietary product

External service

System under development

Things

Page 8: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

8

Arduino RaspberryPi

IntelEdison STNucleo ESP8266

Cost $3-$30 ~$35 $40 $8 ~$3

Wifi Shield($60)orESP8266

USBDongle Built-in Shield($60)orESP8266

Built-in

Programming C/C++ Python/Java/C++,Javascript,…

C,C++,Javascript,Python,Java,..

C,C++ C++/Lua

CodedistribuAon

USB/SPI/Serial In-Situ In-Situ USB/SPI/Serial Serial/OTA

Storage Built-In SD-Card Built-In Built-In Built-In

I/O ArduinoUno:13GPIO/6ADC

17GPIO 20GPIO(PWM,SPI,one-wire) •6analoginputs. 1UART(Rx/Tx).

GPIO(50) 12-bitADCwith16 Timers(8) I2C(3),SPI(3) USART(3)

10GPIO/1ADC

PowerconsumpAon

12V 50mA Deepsleep?

1A5V peak:984mWusingWifi5GHzband:680mWusingserialport:346mW Idle88mW poweredoff45mW

128µA/MHz.InStopmode, thepower consumpeoncanbeaslowas9µA. 3,3V

3,3V Transmit802.11b,CCK11Mbps,POUT=+18.5dBm197mA Standby0.9mA Deepsleep 10uA

Page 9: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

9

Model-driven software engineering to handle

diversity

Page 10: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Our Main Objective

• Enable efficient exploitation of the broad diversity of the future computing continuum for rapid service innovation of advanced services, by providing service developers with new agile tool supported software engineering methods enabling short innovation cycles

10

Page 11: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Heads project outputs Two new modelling languages to tame the

IoT jungle

11

Page 12: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

What is ThingML ? n A DSL to model distributed reactive systems

n  IoT systems, embedded systems, sensor networks, ... n Components, State machines and action language

n  « Main stream » MDE n Contributions of ThingML

n  « Complete » action language n  Slots, Mixins and Aspects instead of Inheritance and Composites n  Enforced encapsulation and actors semantics

n  Target Platforms and Applications n  MDE for resource constrained systems (microcontrollers, IoT) n  Development of applications distributed across heterogeneous

hardware n  Other types of reactive systems?

Page 13: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Why ThingML ? n  Typical MDE benefits

n  Reduce development, maintenance and evolution costs n  Perform verifications and analysis on the models n  Model application at a platform independent level

n  No existing approach can deal with microcontrollers n  ThingML can run on hardware less than 1ko of RAM

n  No existing approach is really platform independent n  Since actions are written in the target language

Page 14: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

ThingML Goals

• Provide tools and methods • For each actor to concentrate on his task

• For decoupling the tasks of different actors

• Using state of the art software engineering practices • Modularity, reusability, runtime deployment, continuous

integration, validation, etc…

• Cost efficient and practically usable • No large overhead, integrated with legacy systems, etc…

Page 15: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Blink example state machine thingBlinkincludesLedMsgs,TimerMsgs{requiredportHW{sendsled_toggle,timer_startreceivestimer_timeout}statechartBlinkImplinitBlinking{stateBlinking{onentryHW!timer_start(1000)transition->BlinkingeventHW?timer_timeoutactionHW!led_toggle()}}}

Blink

Stopped ?timer_timeout !led_toggle()

on entry !timer_start(1000)

HW

<= timer_timeout() => led_toggle() => timer_start(delay:int)

Page 16: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Blink example and instance groups

Timer:Timer

do: DigitalOutput pin: IOPin

Arduino Board

app: BlinkApplication

led: Led

led group

Led HW

HW timer

io group

configurationBlinkArduino{groupled:LedArduinosetled.io.digital_output.pin=DigitalPin:PIN_13//Thetimerinstancetimer:TimerArduino//Theblinkapplicationinstanceapp:Blinkconnectorapp.HW=>led.led.Ledconnectorapp.HW=>timer.timer}

Page 17: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

The ThingML tools n  Based on Eclipse / EMF Metamodel n  Textual Syntax with EMFText

n  For good usability and productivity n  To keep the development cost of the editor(s) reasonable

n  Graphical exports (graphML, graphviz, …) n  Static well formedness and type checker n  Equivalent compilers for a set of platforms

n C/C++ for different microcontrollers, linux, embedded linux n  Java for computers, smartphones, … n  Javascript (NodeJS) n Maybe others if needed

n  Generators for communication channels n  Easy to distribute ThingML IDE

n Standalone and lightweight IDE n Eclipse plugins

Page 18: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

ThingML Editor

Page 19: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Kevoree: a DSML to drive software configuration and deployment

• Heterogeneous execution platforms • how to handle deployment?

• how to handle reconfiguration?

• how to verify system level properties?

• Effective support for runtime models •  limited resources

•  time constraints

• Distributed model dissemination

Page 20: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Models@runtime for distributed and heterogeneous systems

Page 21: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Lightweight M@R framwork for building Distributed Adaptive System

M@R Runtimes for Distributed and Heterogeneous adaptive systems

Extensible Virtual System Infrastructure

Resilient Software

infrastructure based on diversity

Kevoree in nutshell 1/3

Page 22: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Kevoree in nutshell 2/3

Page 23: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

•  Kevoree Abstraction model for architectural diversity

•  Model@Runtime eases the management of distributed systems

•  Homogeneous adaptation for heterogeneous CPS devices

•  Large scale adaptation dissemination (Gossip, Paxos, etc.)

•  Ready for cloud and elasticity algorithms development

•  Open source

•  lost, www.kevoree.org

Kevoree in nutshell 3/3

Page 24: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Current Works

24

Page 25: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

correctness envelop

Reasonable correctness envelop

25

P

P'

• Automatic synthesis of software diversity • sosies are different

programs that still belong to the correctness envelop

Page 26: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Automatic diversity synthesis

• Automatic synthesis of software diversity • sosies are different programs that still belong to the

correctness envelop

26

P

correctness envelop

PP'

correctness envelop

Page 27: Construction d'applications dans la jungle de l'IOTpeople.irisa.fr/Francois.Bodin/wp-content/uploads/2017/10/O-Barais... · Intel Edison ST Nucleo ... n Based on Eclipse / EMF Metamodel

Software intensive systems

27

Software intensive systems

Continuous design for

Heterogeneous, variable, adaptive within reasonable

correctness boundaries