Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

WP3 – AGILE Sw Architecture

415 views

Published on

AGILE 2nd F2F MEETING, 14-15 April 2016, Athens, GR

Published in: Technology
  • Be the first to comment

  • Be the first to like this

WP3 – AGILE Sw Architecture

  1. 1. WP3 – AGILE Sw Architecture FABIO ANTONELLI, LUCA CAPRA CREATE-NET AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  2. 2. Agenda qPlanning of Architecture Definition & Main Milestones qPlan for RoadmappingFirst AGILE Sw Stack Implementation qAGILE Sw Architecture: vFunctional Architecture vAGILE Micro Modules vLibraries and Tools vExample: BLE Discovery workflow vUI Concepts vSoftware packaging & Runtime deployment AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  3. 3. Planning of Architecture Definition & Main Milestones •Next Milestones: •M6 : •D1.1: AGILE Gateway architecture specifications and initial design (EUTROTECH) - Report •D2.1: Core requirements specification and IoT protocol integration (Rulemotion) - Demonstrator •D3.1: Req. specification & Sw Architecture (CREATE-NET) - Report •M9: •D3.1: Initial version of Gateway Selfconfiguration, IoT Device discovery & Remote gateway management (Rulemotion) - Report •D3.2: Application Interfaces (Gateway, Data Management & Developer’s Interface) – initial implementation (CREATE-NET) – Report •Demonstrator for First Project Review AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  4. 4. Phases from Architecture Definition to AGILE Fw Roadmappingand Implementation Architecture Definition Architectural Pattern Prototyping Use Case (Discovery of BLE Devices) Analysis and Integration of IoT Standards Prioritization Of IoT Std/protocols O.S. Frameworks and Libraries s OS Components Selection Mapping AGILE Fw Roadmap for Implementation Validation M09 Review Demo • What • When • Who Timeline M09M04 M05 1st Activity After Athens Plenary Meeting
  5. 5. AGILE Architecture: Makers vs. Industrial Version Preliminary Clarifications •Maker’s Version: •Definition addressednin the following slides •Industrial version: •Initial discussion with WP1 partners started •Rationale: •Need to share a Reference Architecture with Maker’s Version •May deviate from Maker’s version one due to different requirements linked to industrial application •Starting component for reuse: Kura •Needs analysis for identification of common sw components to be integrated AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  6. 6. AGILE Gateway Functional Reference Architecture
  7. 7. (Container OS) IoT App Developers UI Workflow Recommender Collaboration Tool Gateway Management UI Remote Gateway & Fleet Management System Device Management UI IoT Data Management UI Data Storage (User) IoT Apps (Snapps..) IoT App IoT App IoT App Some Data Cloud Data Communication, Application Cloud Deployment & Management, etc... Gateway Operating System IoT Device & HW module Discovery IoT Device Communication KNX ZWave ... Security Security Security Security Security
  8. 8. Gateway Management (Modules for Power, Network, ...) IoT Device & HW module Discovery Abstraction IoT Device Comunication (Modules for Bluetooth, ZWave, others) Data Storage Gateway OS Remote Gateway & Fleet Management System IoT App Development Workflow Recommender IoT Device Mgm UI Iot GW Mgm UI Agile Device API Collaboration Tool Bluetooth Device Mgm ZWave Iot Data MgmUI Agile Data API DBCloud Storage Discovery API Agile Device API IoT Device Mgm UI Device Mgm Agile Device API Network handler Agile Mgm API Dev / Power mgm Agile Mgm API IoT Device Management UI Iot GW Mgm UI IoT Apps App1 App2 App3 App4 App runtime Runtime impl. Bus AGILE Restful API / Broker / Proxy & Static Server Iot App Developers UI AGILE IO API AGILE Cloud Services & Cloud Integration AGILE Gateway AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  9. 9. Gateway Management (Modules for Power, Network, ...) IoT Device & HW module Discovery Abstraction IoT Device Comunication (Modules for Bluetooth, ZWave, others) Data Storage Gateway OS Remote Gateway & Fleet Management System IoT App Development Workflow Recommender IoT Device Mgm UI Iot GW Mgm UI Agile Device API Collaboration Tool Bluetooth Device Mgm ZWave Iot Data MgmUI Agile Data API DBCloud Storage Discovery API Agile Device API IoT Device Mgm UI Device Mgm Agile Device API Network handler Agile Mgm API Dev / Power mgm Agile Mgm API IoT Device Management UI Iot GW Mgm UI IoT Apps App1 App2 App3 App4 App runtime Runtime impl. Bus AGILE Restful API / Broker / Proxy & Static Server Iot App Developers UI AGILE IO API AGILE Gateway Not explicitly represented here: • Security • Recommendation Mapping of Functional Architecture on “Micro-Modules” Architecture AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  10. 10. AGILE IO APIAgile Data API Agile Device APIAgile Mgm API APIs offer abstraction over Bus and modules communication and a convenient package of common functionality Agile Modules are autonomous and pluggable components which interacts over IPC with other modules and expose an UI and API to allow configuration and control from the user. UI AGILE API Library / 3rdy Party Software AGILE impl. External API IPC The Agile implementation involve the actual system integration of an existing library or software with the GW APIs and UI to reuse existing software with minimal overhead UIs allow for user interactions with specific configurations or management tools for the module. Module UIs will be able to interact with the main UI container via triggers and routes/namespaces A API groups a set of “functional interfaces” to comply with service features inter-communication. Ideally SDK may be generated out of a schema definition to enforce multi language interoperability and offer an unified integration documentation and development experience. The External API Offers an unique point of access properly namespaced and security-aware to internal functionalities offered by modules. This can happen via IPC or other methods, like an HTTP Proxy “Micro Modules” Architecture : Legenda AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  11. 11. Gateway Management (Modules for Power, Network, ...) IoT Device & HW module Discovery Abstraction IoT Device Comunication (Modules for Bluetooth, ZWave, others) Data Storage Gateway OS Remote Gateway & Fleet Management System IoT App Development Workflow Recommender IoT Device Mgm UI Iot GW Mgm UI Agile Device API Collaboration Tool Bluetooth Device Mgm ZWave Iot Data MgmUI Agile Data API DBCloud Storage Discovery API Agile Device API IoT Device Mgm UI Device Mgm Agile Device API Network handler Agile Mgm API Dev / Power mgm Agile Mgm API IoT Device Management UI Iot GW Mgm UI IoT Apps App1 App2 App3 App4 App runtime Runtime impl. Bus AGILE Restful API / Broker / Proxy & Static Server Iot App Developers UI AGILE IO API Micro Services Architecture : Components & APIs Remote Gateway & Fleet management System Operating System AGILE Gateway Micro Services AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  12. 12. Libraries and tools AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  13. 13. Libraries and tools: IoT Apps (based on node red) IoT Apps App1 App2 App3 App4 App runtime Runtime impl. • redzilla: A node-red as-a-service instance launcher supporting custom authentication and instance management api https://github.com/muka/redzilla Developed by CREATE-NET for a previous project. Manage node-red instances in docker containers and offers a convenient HTTP API. AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  14. 14. Libraries and tools: IoT App development • OS.js: OS.jsis a JavaScript web desktop implementation for your browser with a fully-fledged window manager, Application APIs, GUI toolkits and filesystem abstraction. https://os.js.org/ • Node Red: A visual tool for wiring the Internet of Things http://nodered.org/ • Collaboration Tool • Workflow Recommender IoT App Development Workflow Recommender Collaboration Tool Iot App Developers UI AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  15. 15. Libraries and tools: Gateway Management • Kuraimplementation (OSGI service) http://www.eclipse.org/kura/ • Custom implementation, taking advantage of the DBus exposed services like NetworkManager, PowerManager and other. PoC at https://github.com/muka/node-dbus-network-manager Gateway Management Iot GW Mgm UI Network handler Agile Mgm API AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  16. 16. Libraries and tools: Data Storage • rethinkdbor influxdb (or either unqlite, sqlite, ...) • google drive SDK https://developers.google.com/drive/ • ... Data Storage Iot Data MgmUI Agile Data API DBCloud Storage AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  17. 17. Libraries and tools: IoT Device Communication • Bluetooth (Official linux protocol stack) bluez.org • Openzwave openzwave.com • ZigBee (depend on chip/hw impl) • More on “Protocols and Standards” doc IoT Device Comunication IoT Device Mgm UI Agile Device API Bluetooth Device Mgm AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  18. 18. Libraries and tools: IoT Device Communication • Ponte http://www.eclipse.org/ponte/ • MQTT, Mosquitto http://mosquitto.org/ • CoAP, Californium http://www.eclipse.org/californium/ • Dbus client(s)(dbus.freedesktop.org/.../dbus-java/, sidorares/node-dbus)Bus AGILE Restful API Broker / Proxy & Static Server AGILE IO API AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  19. 19. Discovery API Gateway Management (Modules for Power, Network, ...) IoT Device & HW module Discovery Abstraction IoT Device Comunication (Modules for Bluetooth, ZWave, others) Data Storage Gateway OS Remote Gateway & Fleet Management System IoT App Development Workflow Recommender IoT Device Mgm UI Iot GW Mgm UI Agile Device API Collaboration Tool Bluetooth Device Mgm ZWave Iot Data MgmUI Agile Data API DBCloud Storage Agile Device API IoT Device Mgm UI Device Mgm Agile Device API Network handler Agile Mgm API Dev / Power mgm Agile Mgm SDK IoT Device Management UI Iot GW Mgm UI IoT Apps App1 App2 App3 App4 App runtime Runtime impl. Bus AGILE Restful API / Broker / Proxy & Static Server Iot App Developers UI AGILE IO API Node Red BlueZ OpenZwave Ponte rethinkdb AWS, GDriveNetworkManager UDev/UPower UDev D-Bus redzilla AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR Mapping of Libraries and toolson AGILE Architecture
  20. 20. Example: BLE Discovery Workflow AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  21. 21. Example workflow User Story: Jane search for Bluetooth devices and proceed to pairing in order to register and use her device into the AGILE gateway AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  22. 22. Discovery UI Discovery API BLE adapter Device Management Search scan() 1. Discover devices 2. check is new 3. sync device info isRegistered() updateDevice() {device list} Display Pair(dev ID) connect (dev ID) pair () Enter PIN OK Device connected BLE Discovery BLE Pairing AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  23. 23. Example workflow User Story: A thermostat app connects to a compatible device to gather data and control temperature dimmer AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  24. 24. BLE adapter {device list} Bootstrap BrokerThermostat App Device Management find() connect(dev ID) subscribe(dev ID) Data received Device New data New data New data Data received Thermostat App AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  25. 25. Security GET /api/device/find Agile BUS User Request: Discover devices Proxy object call DeviceManager.find() Publish [ns: DeviceManger.devices] Found device! Device management Listen [ns: DeviceManger.devices] 2 3 5 6 BLE module LWM2M module find(foo) { actual impl } find(foo) { actual impl } 4 7 AGILE apps get the new device info, show notification Listen [ns: agile.devices.create] 1
  26. 26. UI concepts AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  27. 27. “Common” OS-like UI for easier understanding and usage Client based limited overhead on the gateway as runs completely in the browser. Virtual Filesystem support eg export and save data to Google Drive or MS Cloud Packages and a package manager is available UI concept: OS-like proposal Online demo at https://osjsv2.0o.no/ AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  28. 28. Panels to contain modules UI Generic configurations are grouped and managed in an unified UI Bindings are offered to provide widget out of Apps, eventually either from autonomus / pre- existing UIs Notifications will use templates to drive the user to the right UI Modules and Apps have default handling and binding to the main UI Devices can be listed and grouped in folder-like views. Default action from the UI allow to interact directly with a device
  29. 29. Software packaging & Runtime deployment AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  30. 30. Software packaging & Runtime deployment AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR Gateway Management (Modules for Power, Network, ...) IoT Device & HW module Discovery Abstraction IoT Device Comunication (Modules for Bluetooth, ZWave, others) Data Storage Gateway OS Remote Gateway & Fleet Management System IoT App Development Workflow Recommender IoT Device Mgm UI Iot GW Mgm UI Agile Device API Collaboration Tool Bluetooth Device Mgm ZWave Iot Data MgmUI Agile Data API DBCloud Storage Discovery API Agile Device API IoT Device Mgm UI Device Mgm Agile Device API Network handler Agile Mgm API Dev / Power mgm Agile Mgm API IoT Device Management UI Iot GW Mgm UI IoT Apps App1 App2 App3 App4 App runtime Runtime impl. Bus AGILE Restful API / Broker / Proxy & Static Server Iot App Developers UI AGILE IO API Remote Gateway & Fleet management System Operating System AGILE Gateway Micro Modules What about, with reference to previous architecture definition?
  31. 31. Software packaging & Runtime deployment Debian packages Debian packages as common approach for both Industrial and Makers version. Enables immediate compatibilty with common release like Debian ARM, Raspbian Potential convergence to other platforms with community effort on packaging (ArchLinux, Fedora, OpenWRT) AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  32. 32. MAKER version: Packaging & Runtime options Snappy apps With packages in the marketplace Containerized apps eg CLI /registry wrapping Docker APIs AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  33. 33. $ snappy install app-fitbit.agile MAKER version: Packaging & Runtime options Gateway Management IoT Device & HW module IoT Device Comunication Data Storage Ubuntu Core IoT App Development IoT Apps (Node Red) Native Apps AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  34. 34. $ agile install jdoe/fitbit MAKER version: Packaging & Runtime options Gateway Management IoT Device & HW module IoT Device Comunication Data Storage Docker Engine IoT App Development IoT Apps (Node Red) Native Apps Operating System AGILE Apps Registry AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  35. 35. AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR Back-up Slides
  36. 36. Java VM Hardware + Gateway OS Communication bus (OSGi Declarative Services, Event Admin and Wires) Hardware Abstraction Basic Gateway Services Field Protocols Network Management Remote Management Connectivity and Delivery App 1 App n… Hardware Abs UI Gateway Services UI Network Management UI Remote Management UI Connect. and Deliv. UI App 1 UI App n UI Main UI AGILE Kura Architecture AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  37. 37. AGILE modules: questions and doubts. • Bus concept: a bus is typically intended as a communication channel that allows the communication between different components. Regarding the high level bus, we have a bit of confusion on the concept of bus: 1. the REST API represents an endpoint that exposes a protocol to be used when exchanging information in a point-to-point model. 2. A broker is a “concentrator” and dispatcher of events and information. The complexity of a broker, in terms of implementation depends generally on the adopted communication protocol. Generally, a broker is more complex than what is required for a simple bus. 3. Are we referring to a specific solution for the proxy & static server? Are there any reference example? • More in general, these three implementation of the high level bus are heterogeneous, both in terms of functionalities, objectives, abstraction level, etc.. • A similar solution could have a strong negative impact on performances. AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  38. 38. 1) GW manages object and services as Object with methods and properties (as per DBus specs) 2) Client issue a request to a structured endpoint. Eg GET /device/fridge1/temperature?unit=C 3) Restful HTTP API route request and params calling the managed object 4) Response is delivered. Eg. -4 Restful API methods map to GW managed objects / services Callable methods of abstract objects allows to interact with GW managed devices. Example: A fridge device instance Questions and doubts (1): Restful HTTP API example { name: “fridge1”, int temperature(string unit) void setPower(bool on) } AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  39. 39. 1) 2) Client register on broker topic(s) to receive updates for a device or device property http.POST /fridge1/subscribe/temperature mqtt.subscription >> /fridge1/temperature 3) Bridge receive properties updates from objects 4) Client get updated of the updated value(s) mqtt.subscription << -8 Questions and doubts (1): Broker example { name: “fridge1”, onChange(temperature) } DBus supports DBus.Properties to receive asyncronous updates on properties Broker topic can be per property or object wise to group messages Register to DBus PropertiesChanged for property (one or more) and publish once updates flows AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  40. 40. AGILE modules: questions and doubts (2) • High level bus: three implementations are proposed (AGILE Restful API / Broker / Proxy & Static Server). • Will only one implementation be selected and fixed? Will only one implementation be selected depending on the requirements, vertical application, etc.? Are the three implementations available at the same time and integrated? • If the implementations are integrated, what is the relation between them? • Low level bus: why are we considering a low level bus? • Considering that, independently from the SDK, all the apps have access to both busses, wouldn’t be better to use and manage only one bus, the high level bus? • SDK: can you provide an example of SDK? • Which components the SDK must include? • In which way the SDK abstracts the low level bus (DBUS) in order to provide functionalities to the high level bus? AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  41. 41. High level bus: • Intended for end users / apps and UI over common protocols and connections like WiFi, Ethernet, HTTP or Websocket • A public HTTP API, with eventually further level of security enforcement • Offers three main services to interact with internal services in a normalized way (single API and entry point) 1. RESTful API + Broker will serve as request based & evented data source/ action trigger 2. HTTP Proxy is used to pipe to app/services which exposes HTTP APIs. Eg online APIs or 3rd party software 3. Static server serve static content like html, js or files Questions and doubts (2): High level bus AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  42. 42. Low level bus • DBus is available in most linux distribution (within systemd) with kernel services exposed (NetworkManager, Bluez, PowerManager, PolicyKit). • Allows for GW internal service abstraction and interaction. SDK example • A java based class set to interact with “object proxies” (our APIs) like Device Communication, Device Management or Storage. • A use case may be to have an OSGI module to map Kura GPIO component to the Device Communication API of AGILE and have it exposed to other GW components Questions and doubts (2): Low level Bus and SDK AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  43. 43. Questions and doubts (3): Low Level Bus • Low level bus: how the UI components compose the main UI? • “Specific application UI” stands for a graphical UI or for a set of API used by the Main UI to compose the graphical UI? • How adding or removing an app influences the main UI? AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
  44. 44. Low level bus • UI is a webapp composed of static resources (js,html) and an API • Connection to internal GW events happens via the internal APIs and dedicated plugin hooks • UIs will be composed of interfaces structured as parent container where pluggable child UIs will be attached. Examples: • A Control Panel allows to “attach” extensions like NetworkManager or User Management • A Data visualization interface allow to inject data visualization subcomponent based on data type or source Questions and doubts (3): Low Level Bus & UIs AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR

×