class of services whose logic and value emerges from a set of communicating software components distributed on a heterogeneous computing continuum from clouds to mobile devices, sensors and/or smart‐objects." 2
Provided by TellU • Continuous monitoring of patrolling guards Body sensors (heart‐rate, activity, etc) Geo‐location GSM‐WiFi connectivity • In case of aggression Alert to a central and/or nearby guards Act on devices in the building (alarms, lights, etc) • Centralized approach in the Cloud is not suitable Loss of connectivity No alert can be sent Sensors generates a lot of data (up to 500Hz) Sending raw data to the cloud, will drain the battery (radio chips are power‐ thirsty) 3
Some Java, Node.js, Go and/or Scala in the Cloud o Not to mention a plethora of frameworks to choose among and interoperate with Some headless Java in gateways, or maybe C/C++? Some Java/Android in smartphones, what about iOS? Some JavaScript in the browsers Some C in sensors, interacting with good‐old legacy APIs o Bare metal, or maybe with a lightweight OS? Some scripts in a proprietary language to program sensors Some VHDL in FPGAs Some "glue" (a.k.a magic) to connect everything o "Just" need to bridge IP, ZigBee, Z‐Wave, Bluetooth/BLE, custom RF, NFC, RFID, etc (not to mention the tricky encoding of the packets across protocols and languages) • …or not! I would never hire an engineer pretending to master all these technologies… He might be a genius… or most likely a crook! How to test, deploy, operate and maintain this mess?! 4
Language • Open‐source, on GitHub • Abstract syntax based on EMF • Textual syntax based on EMFText • Standalone (JNLP) and Eclipse editor • Set of compilers in Scala, targeting (currently) C/C++ for Linux, Arduino (2KB RAM!) Scala (JVM‐based) for larger nodes • Provides (de)serialization: ThingML message byte[] Common concepts between C, Java and most language What transit through wires or over‐the‐air 5
your system 1. Messages and ports 2. What is platform‐specific/independent 2. Mock‐up your system (Fake it*) 3. Implement (Make it*), step by step 1. Using ThingML State Machines and action language for the platform‐independent logic 2. By wrapping existing APIs using the ThingML template language to link to platform‐specific APIs (calls and callbacks) 7 *using the Atlassian kick‐ass method
Java API that wraps Arduino lib Control your Arduino from PC, Android via serial, bluetooth Generated from ThingML • ArduPi project on GitHub Weather station (different versions) o on Arduino (in C) and Raspberry Pi (in C) o on Arduino (in C) and PC (in Java) o Possibly pushing data into a MongoDB (on the RaspberryPi) Generated from ThingML 8
interfaces Definition of ports Behavior: ‐ State machine à la UM ‐ Functions ‐ Action language Extend platform‐independent timer To implement a C Timer, based on the existing system API
modeling language for IoT/M2M Rely on Eclipse technologies Compile to C/C++ (down to 2KB RAM!), JVM, etc Open‐source Enables the co‐development of HD‐services • Future Work Dynamic management of HD‐Services, by wrapping ThingML component into Kevoree Provide higher‐level concepts in ThingML e.g. CEP Target lighter JVMs (Java8 SE/ME instead of Scala) To be done within the HEADS project 10