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.

Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)

39 views

Published on

OSGi Community Event 2018 Presentation by Tim Ward (Paremus)

Abstract: The model of centralized cloud compute is changing. As large-scale IoT deployments have started to become real organizations are realizing that a single central cloud can’t cope with the data security, data volumes, latency or robustness that they need for their businesses. Centralizing in a single cloud also offers a huge operational risk – if the cloud fails, their business must continue!

This talk will introduce BRAIN-IoT, an EU Horizon 2020 funded project. BRAIN-IoT uses the latest OSGi R7 specifications to create an adaptive modular “Fog” environment with decentralized data processing and decision making. We’ll review the current design decisions made by the BRAIN-IoT team, including the issues concerning generic Edge Device discovery & integration, and see how they can be applied across different IoT use cases, including Smart Utilities and Industry 4.0 Factories of the Future.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)

  1. 1. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Tim Ward
 tim.ward@paremus.com Turtles all the way up - From OSGi bundles to Fog Computing
  2. 2. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Who is Tim Ward? Chief Technology Officer at Paremus 10 years developing OSGi specifications Co-chair of the OSGi IoT Expert Group Distributed Platform expert for the Brain IoT project Author of Manning’s Enterprise OSGi in Action http://www.manning.com/cummins @TimothyWard
  3. 3. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 What is Brain IoT?
  4. 4. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 An Intelligent Decentralised Fog Platform Part of the European Union Horizon 2020 program This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 780089.
  5. 5. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brian-IoT: Functional Objectives GOAL In plain English… TO1: to enforce interoperability across heterogeneous IoT devices autonomously cooperating in complex tasks. IoT devices from different vendors with different APIs using different protocols must still work together TO2: to enable dynamic smart autonomous behaviour involving actuation in IoT scenarios Live sensor data should trigger live responses without human intervention TO3: to enable the emergence of highly dynamic federations of heterogeneous IoT platforms able to support secure and scalable operations for future IoT use cases A decentralised “leaderless” system which can scale up or down at runtime and is resilient to failure TO4: to establish Authentication, Authorization and Accounting (AAA) in dynamic, distributed IoT scenarios The system must be secure and have an audit trail indicating who did what and when
  6. 6. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brian-IoT: Functional Objectives GOAL In plain English… TO5: to provide solutions to embed privacy- awareness and privacy control features in IoT solutions Allow users to limit/prevent personal information being collected and used. TO6: to facilitate rapid model-based development and integration of interoperable IoT solutions supporting smart cooperative behaviour Quick and easy to build smart systems using templates and tools TO7: to enable commissioning and reconfiguration of decentralized IoT-based applications Easy to start/expand/contract the IoT infrastructure. Provide a “marketplace” for Smart IoT Behaviours
  7. 7. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brian-IoT: Non Functional Objectives? • Scale - multiple physically distributed locations • Hundreds of manufacturing facilities globally • A Federated network of Smart Cities. • Independence - Each location can function stand-alone • Remote failures must not break local functions • Heterogenous - Locations can evolve / change independently • MUST avoid lockstep upgrades • Operational Simplicity - Cannot require a Nobel prize to operate • Must be simple to manage recover / re-form after failure
  8. 8. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brian-IoT: Non Functional Objectives? • Autonomous - No human in the loop for common processes • Rapid reactions to emergency scenarios • Reduced cost associated with common occurrences • Maintainable - Ability to cost effectively manage the system • Rapidly apply Security fixes, and 3rd party component updates • Substitute components that are no longer maintained • Adaptability - Ability to cost effectively change the system • Enhance existing function with new features • Remove services that are no longer required.
  9. 9. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brain IoT Use Cases
  10. 10. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brian-IoT: Mission Critical City Infrastructure • Mission Critical Water Utility Infrastructure: location A Coruña, Spain • Real Time Sensing, AI anomaly detection and Actuation across a sophisticated physical City Infrastructure. • Robustness and Security paramount.
  11. 11. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brain-IoT: Robotic Orchestration within Smart Environments • Orchestration of Robots in a Smart Factory environment. • Robots `learn` how to interaction with IoT enabled parts of the environment via dynamic deployments of Smart Behaviours. • Real time interactions and so low latency, local & Autonomous interactions required.
  12. 12. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Can’t we do this today?
  13. 13. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 The Smart Tech revolution - direct control “Alexa, decrease the temperature in the kitchen” … “The heat is now set to 19” “Hey Google, turn off the lights downstairs” … “Sure, turning 6 things off”
  14. 14. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Not so smart assistants • Smart assistants allow voice control over various smart devices • Features are enabled by installing “skills”/“apps” • These take in commands and do things as a result • The assistant itself doesn’t recognise words • Ok, so technically it does, in that it can recognise the “wake” word • Once a wake up is detected, the rest is recorded • The main voice processing and command triggering is done server side • Without a live internet connection it’s an expensive paperweight… • Assistants also don’t help with machine to machine commands • The only input is through the microphone
  15. 15. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 If This Then That… • IFTTT is a service for “connected everything” • Data is consumed from “services” (e.g. GMail, Twitter…) • Users can create “applets” encapsulating smart behaviours • An Applet is a combination of a “trigger” (this) and “action” (that) • Triggers are predicates which select data from a service • Once a trigger fires then the action can act on another service • IFTTT also provides an app for your phone • Support for Geofencing, or proximity detection (e.g. to a WiFi network)
  16. 16. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 If Not This Then What? • IFTTT looks like it can do everything we need… • Until you look more closely • We talked about how data streams are consumed from “services” • Effectively IFTTT logs in as you and polls these websites for changes • The latency between event and action can be 15 minutes or more! • There is also no support for local execution of triggers/actions • As with assistants, all the processing occurs in the cloud • IFTTT is therefore good at low priority “cloud service to cloud service” behaviour • Not good for rapid feedback loops • Not good for independent resilient systems
  17. 17. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 What’s the deal with Centralised Cloud? • In vogue since ~2005 • The business proposition - `Compute Resource Arbitraging` - Increase hardware utilisation by packing customer applications onto fewer boxes in large data centres. • Started using VM’s - more recently Container’s - that host your existing Applications - Configuration changes only • More recently - Cloud ‘Native’ applications e.g. Function as a Service. Thereby locking yourself to the PaaS or IaaS 🤔 • Cloud Infrastructure does Fail!
  18. 18. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Centralised Cloud & Smart Home? 1. Alexa: Play something suitable 2. Alexa 4. NPL - Music Context - AI < current affairs Fuzzy AI < Music Library 3. Play Something Suitable Great for Consumer Market • Minimal edge processing so devices are cheap • Forward everything so provider owns the data • Robustness? If Service not available - Oh well! • Latency. Not too much of a problem in a consumer setting
  19. 19. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Centralised Cloud & IoT 1.0 Cloud Core IoT Edge FLOW of DATA (Flow of Value!) Just Generalise Consumer Model — All Data Flows to the Cloud. • Won’t Scale • Latency. Is an issue for many IoT scenarios. • Robustness? We might have REAL PROBLEMS! • Data Privacy • Data is Commercial Value! • For a good % of IoT data - value is only w.r.t. context of environment it was generated in, and this value rapidly degrades with time.
  20. 20. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Centralised Cloud & IoT 1.0 Scaling Cloud Core IoT Edge FLOW of DATA (Flow of Value!) When we talk about scaling, most people say “the cloud is big and computers are fast”. • We don’t mean that you can’t process the events fast enough • Although that is a challenge • To process an event you have to get the data to the cloud • The UK has ~40 million cars, so 10 million in use at rush hour? • 100 bytes/s per car is 1GB/s • How fast is your cloud’s connection to the internet?
  21. 21. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Centralised Cloud & IoT 2.0 Cloud Core IoT Edge FLOW of DATA (Flow of Value!) ANALYTICS RUNTIME SERVICES Image Deployment Container or VM So Industry has realised that not everything should flow to / run within a Central Cloud. • The new `Big Thing`? Containers at the Edge 🙄 • Spoke and Hub with something like Kubernetes deployed to every location Rest or MQTT messaging back to a Core. • Shrink wrapped functionality • Rigid Homogenous Hierarchy
  22. 22. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018
  23. 23. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Complexity! 45 percent said their biggest deployment worry is that Docker is too complex to integrate into their environments - “Hope Versus Reality: Containers in 2016” Cloud Foundry report https://www.cloudfoundry.org/hope-versus-reality-containers-in-2016/
  24. 24. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 The Complexity Crisis We could talk A LOT about this - but we’ll spare you ;-) see - https://www.osgi.org/developer/modularity/ & https://www.osgi.org/complexity- modularity-and-business/
  25. 25. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 So how do we solve it?
  26. 26. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Brain-IoT - Approach? • Industry 4.0 facilities, Smart Cities, Mobile Edge Compute / 5G Edge Cloud • All Sophisticated, Adaptive, Distributed, Autonomous Environments. • Using `traditional approaches` in large heterogenous systems doesn’t work • Operation Complexity rises exponentially. Not economically sustainable! • Modularity encapsulates Complexity, Modularity enables Agility and Adaption. • Paremus - Modularity is what we do! Leverage OSGi Modularity through a Fog structural hierarchy.
  27. 27. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 A self-similar Hierarchy BRAIN-IoT Fabric A Service Fabric A Fabric comprised of a set of co-located OSGi Frameworks BRAIN-IoT Node An OSGi Framework BRAIN-IoT Federation A collection of Fabrics Requirements Capabilities Requirements Capabilities
  28. 28. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 A self-similar Hierarchy • What is a Brain-IoT Federation? • A dynamic collection of Brain-IoT Fabrics • Fabrics shield their internal structure from Federation - publish Capabilities. • What is a Brain-IoT Fabric? • A dynamic collection of Brain-IoT Nodes • Nodes shield internal structure from Fabric - publish Capabilities. • What is a Brain-IoT Node? • A dynamic collection of Brain IoT behaviours • Behaviours shield internal implementation detail from each other
  29. 29. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Appropriate Scope & Interactions `X` `X` `Y` µServices Bundles OSGi Remote Services Messaging Eventing BRAIN-IoT Fabric A Service Fabric A Fabric comprised of a set of co-located OSGi Frameworks BRAIN-IoT Node An OSGi Framework BRAIN-IoT Federation A collection of Fabrics Nodes are OSGi frameworks • Behaviours are bundles exposing services Fabrics are groups of nodes • OSGi Remote Services provide the links between Federations are groups of fabrics
  30. 30. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Appropriate Scope & Interactions Service Z (Public) REST Services `X` `X` `Y` `Y` µServices Bundles OSGi Remote Services Messaging Eventing OSGi Remote Services Messaging REST Services `U` `V` `W` BRAIN-IoT Fabric A Service Fabric A Fabric comprised of a set of co-located OSGi Frameworks BRAIN-IoT Node An OSGi Framework BRAIN-IoT Federation A collection of Fabrics Remote Service visibility is controlled by Topology • Services can be exposed beyond the fabric! • The OSGi equivalent of a public cloud API
  31. 31. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Dealing with devices - Eclipse sensiNact OSGi based IoT Agent • Rich set of Southbound IoT protocol adaptors • Zigbee, EnOcean, LoRa, XBee, MQTT, XMPP • Using OSGi Remote Services for Northbound communication • Innovate use of Service annotations for device API modelling • sensiNact Studio provides a rich IDE for smart behaviour development
  32. 32. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Dealing with distribution - Paremus Service Fabric The Service Fabric is an OSGi™ based Cloud / Platform runtime. Operationally Simple to Create, Manage and Update. Lightweight & Scalable: A Service Fabric may be created from a few IoT Edge Compute Nodes, or from 1000’s of data-centre resources. Independent: Each Service Fabric can operate in isolation from each other. Agile & Evolvable. Applications adapt to changing circumstances over time. Secure: including advanced discovery and automatic scoping of Services.
  33. 33. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Putting the Concepts Together • Individual Facility Fabrics can be managed as Autonomous Units • A Simple Operational Process to introduce a new Fabric to a Federation and share services • Edge nodes run sensiNact adapters to talk to the IoT devices • All nodes are capable of running smart behaviours • Smart Behaviours (OSGi Bundles) can be shared across the Federation. • Behaviours can operate at high levels (federation) if they need to coordinate over wide areas • Behaviours which need faster responses or better robustness can move closer to the edge • “Reflex” behaviours can run on the edge device itself, allowing safety critical decisions to be made even when the node loses network connectivity
  34. 34. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Ops Centre Facility IV Manufacturing Facility II Manufacturing Facility III Third Party Cloud IaaS Manufacturing Facility I An Modular Industry 4.0 `Fog` Environment
  35. 35. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 35
  36. 36. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 Evaluate the Sessions -1 0 +1 Sign in and vote at eclipsecon.org
  37. 37. Copyright © 2018 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Turtles all the way up October 2018 www.paremus.com @Paremus info@paremus.com Tim Ward tim.ward@paremus.com

×