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.

Building Internet of Things Apps with PrismTech Vortex and the Intel Edison Starter Kit

646 views

Published on

Whilst there is not universal agreement on what exactly the Internet of Things (IoT) is, nor on the line that separates Consumer and Industrial IoT (IIoT), everyone unanimously agrees that unconstrained access to data is the game changing dimension of IoT. PrismTech's Vortex is positioned as the best data sharing platform for IoT, enabling data to flow unconstrained across devices and at any scale.

This webcast, will demonstrate how quickly and effectively you can build real-world IoT applications that scale using Vortex and the Intel Edison Starter Kit. Specifically, you will learn how to leverage Vortex to virtualize devices, integrate different protocols, flexibly execute analytics where it makes the most sense and leverage Cloud Computing as well as Fog Computing architectures.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Building Internet of Things Apps with PrismTech Vortex and the Intel Edison Starter Kit

  1. 1. Building IoT Apps with Vortex and the Intel Edison Starter Kit Angelo Corsaro, PhD Chief Technology Officer angelo.corsaro@prismtech.com
  2. 2. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryIoT Architectures
  3. 3. CopyrightPrismTech,2015
  4. 4. CopyrightPrismTech,2015 Cloud Cloud Centric Architectures
  5. 5. CopyrightPrismTech,2015 Cloud Fog Fog Fog Fog
  6. 6. CopyrightPrismTech,2015
  7. 7. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryVortex Intro
  8. 8. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary Vortex is a standard technology for efficient, ubiquitous, interoperable, secure and platform independent data sharing across network connected devices in151 Characters
  9. 9. Applications can autonomously and asynchronously read and write data enjoying spatial and temporal decoupling DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Virtualised Data Space
  10. 10. Temporal Decoupling Four different levels of temporal decoupling allow to control the trade-off between full temporal decoupling, performances and resource usage t Source t t Sink Sink Volatile Durability t Source t t Sink Sink Transient Durability
  11. 11. Built-in dynamic discovery isolates applications from network topology and connectivity details DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Dynamic Discovery
  12. 12. Failure Detection Vortex provides mechanism for detecting traditional crashes as well as performance failures Source tSink Fault Notification TD Source t Sink Performance Failure Notification P t P P
  13. 13. Fault Masking A built-in fault-masking mechanism transparently controls and switches between sources of data Source tSink Source t
  14. 14. Fault Masking Vortex provides mechanism for detecting traditional crashes as well as performance failures Source tSink Source t
  15. 15. QoS policies allow to express temporal and availability constraints for data DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS QoS - Enabled
  16. 16. A collection of policies that control non- functional properties such as reliability, persistence, temporal constraints and priority QoS HISTORY LIFESPAN DURABILITY DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA OWENERSHIP OWN. STRENGTH LIVELINESS ENTITY FACTORY DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER RxO QoS Local QoS
  17. 17. QoS Policies controlling end-to-end properties follow a Request vs. Offered QoS Domain Participant DURABILITY OWENERSHIP DEADLINE LATENCY BUDGET LIVELINESS RELIABILITY DEST. ORDER Publisher DataWriter PARTITION DataReader Subscriber Domain Participant offered QoS Topic writes reads Domain Id joins joins produces-in consumes-from RxO QoS Policies requested QoS
  18. 18. No single point of failure or bottleneck Decentralised Data Space Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS TopicD QoS TopicD QoS TopicA QoS
  19. 19. Connectivity is dynamically adapted to chose the most effective way of sharing data Adaptive Connectivity Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS TopicD QoS TopicD QoS TopicA QoS The communication between the DataWriter and matching DataReaders can be peer-to- peer exploiting UDP/IP (Unicast and Multicast)or TCP/IP The communication between the DataWriter and matching DataReaders can be “brokered” but still exploiting UDP/IP (Unicast and Multicast)or TCP/IP
  20. 20. A domain-wide information’s class A Topic defined by means of a <name, type, qos> Topic DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Topic Type Name QoS
  21. 21. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary Topic Types — Language Independent Declaration—
  22. 22. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type struct CarDynamics { string cid; long x; long y; float dx; long dy; } #pragma keylist CarDynamics cid IDL
  23. 23. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type message CarDynamics { option (.omg.dds.type) = {name: "CarDynamics"}; required string cid = 0 [(.omg.dds.member).key = true]; required long x = 1; required long y = 2; required float dx = 3; required long dy = 4; } ProtoBuf
  24. 24. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary Topic Types — Language Dependent Declaration—
  25. 25. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type class CarDynamics: constructor: (@cid, @x, @y, @dx, @dy) -> CoffeeScript
  26. 26. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type public struct CaDynamics {
 public string cid { get; set; }
 public int x { get; set; }
 public int y { get; set; }
 public int dx { get; set; }
 public int dy { get; set; }
 
 public CaDynamics (string cid, int x, int y, int dx, int dy)
 {
 this.cid = cid;
 this.x = x; this.y = y;
 this.dx = dx; this.dy = dy;
 }
 }
 C#
  27. 27. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type @KeyList ( topicType = "CarDynamics", keys = {"cid"})
 public class CarDynamics {
 public String cid;
 public int x; public int dx;
 public int y; public int dy;
 
 public CarDynamics(String s, int a, int b, int c,int d) {
 this.cid = s;
 this.x = a; this.dx = b;
 this.y = c; this.dy = d;
 }
 
 @Override
 public String toString() { …
 }
 
 }
 Java
  28. 28. Vortex “knows” about application data types and uses this information provide type- safety and content-based routing Content Awareness struct CarDynamics { @key string cid; long x; long y; float dx; long dy; } cid x y dx dy GR 33N GO 167 240 45 0 LO 00V IN 65 26 65 0 AN 637 OS 32 853 0 50 AB 123 CD 325 235 80 0 “dx > 50 OR dy > 50” Type CarDynamics cid x y dx dy LO 00V IN 65 26 65 0 AB 123 CD 325 235 80 0
  29. 29. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryProgramming Model
  30. 30. CopyrightPrismTech,2014 Anatomy of a DDS Application
  31. 31. CopyrightPrismTech,2015 Writing Data in Python import dds import time
 
 if __name__ == '__main__':
 topic = dds.Topic("SmartMeter", "Meter")
 dw = dds.Writer(topic)
 
 while True:
 m = readMeter()
 dw.write(m)
 time.sleep(0.1) enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  32. 32. CopyrightPrismTech,2015 Reading Data in Python import dds
 import sys
 
 def readData(dr): 
 samples = dds.range(dr.read())
 for s in samples:
 sys.stdout.write(str(s.getData()))
 
 if __name__ == '__main__':
 t = dds.Topic("SmartMeter", "Meter")
 dr = dds.Reader(t)
 dr.onDataAvailable = readData enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  33. 33. CopyrightPrismTech,2014 Writing Data in Scala import dds._
 import dds.prelude._
 import dds.config.DefaultEntities._
 object SmartMeter {
 
 def main(args: Array[String]): Unit = {
 val topic = Topic[Meter](“SmartMeter”)
 val dw = DataWriter[Meter](topic) while (!done) { val meter = readMeter()
 dw.write(meter) Thread.sleep(SAMPLING_PERIOD) }
 }
 } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  34. 34. CopyrightPrismTech,2014 Reading Data in Scala import dds._
 import dds.prelude._
 import dds.config.DefaultEntities._
 object ChatLog {
 def main(args: Array[String]): Unit = {
 val topic = Topic[Meter](“SmartMeter”)
 val dr = DataReader[Meter](topic)
 dr listen {
 case DataAvailable(_) => dr.read.foreach(println)
 }
 }
 } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  35. 35. CopyrightPrismTech,2014 Writing Data in C++ #include <dds.hpp> int main(int, char**) { DomainParticipant dp(0); Topic<Meter> topic(“SmartMeter”); Publisher pub(dp); DataWriter<Meter> dw(pub, topic); while (!done) { auto value = readMeter() dw.write(value); std::this_thread::sleep_for(SAMPLING_PERIOD); } return 0; } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  36. 36. CopyrightPrismTech,2014 Reading Data in C++ #include <dds.hpp> int main(int, char**) { DomainParticipant dp(0); Topic<Meter> topic(”SmartMeter”); Subscriber sub(dp); DataReader<Meter> dr(dp, topic); LambdaDataReaderListener<DataReader<Meter>> lst; lst.data_available = [](DataReader<Meter>& dr) { auto samples = data.read(); std::for_each(samples.begin(), samples.end(), [](Sample<Meter>& sample) { std::cout << sample.data() << std::endl; } } dr.listener(lst); // Print incoming data up to when the user does a Ctrl-C std::this_thread::join(); return 0; } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  37. 37. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryModeling Idioms
  38. 38. A state that is periodically updated Examples are the reading of a sensor (e.g. Temperature Sensor), the position of a vehicle, etc. Soft State Reliability => BestEffort Durability => Volatile History => KeepLast(n) Deadline => updatePeriod LatencyBudget => updatePeriod/3 DestinationOrder => SourceTimestamp // Vortex’s Scala API provides first class implementation of the // soft-state pattern val temperature = SoftState[AnalogSensor](topicName)

  39. 39. A state that is sporadically updated and that often has temporal persistence requirements Examples are system configuration, a price estimate, etc. Hard State Reliability => Reliable Durability => Transient | Persistent History => KeepLast(n) (often n =1) DestinationOrder => SourceTimestamp // Vortex’s Scala API provides first class implementation of the // hard-state pattern. The state is transient by default and can be controlled // by an additional argument val runningMicrosvc = HardState[RunningMicrosvc](topicName) 

  40. 40. The occurrence of something noteworthy for our system Examples are a collision alert, the temperature beyond a given threshold, etc. Events Reliability => Reliable Durability => any History => KeepAll DestinationOrder => SourceTimestamp // Vortex’s Scala API provides first class implementation of the // hard-state pattern. The state is transient by default and can be controlled // by an additional argument val nodeError = Event[NodeError](topicName) 

  41. 41. Data-centric design leverage the same principle of Feedback-control loops to assert a state In other terms, the desired state is asserted by writing a topic and the actual state is monitored. A control action is taken when the desired and the actual state differ Feedback Control Loop
  42. 42. Data-centric design leverage the same principle of Feedback-control loops to assert a state In other terms, the desired state is asserted by writing a topic and the actual state is monitored. A control action is taken when the desired and the actual state differ Feedback Control Loop Hard State Soft State microservice
  43. 43. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryVortex Technology Stack
  44. 44. Device implementations optimised for OT, IT and consumer platforms Native support for Cloud and Fog Computing Architectures Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  45. 45. Polyglot and Interoperable across Programming Languages Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  46. 46. Fully Independent of the Cloud Infrastructure Private Clouds Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  47. 47. Native Integration with the hottest real-time analytics platforms and CEP Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  48. 48. Integration with the popular Node-RED framework Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  49. 49. Integration with mainstream Dashboard Technologies Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  50. 50. High Performance 30 μs peer-to-peer latency 4+ Mmsgs/sec p2p throughput Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  51. 51. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryIntel Edison Starter Kit
  52. 52. Edison is an Octo-Linux based x86 board for prototyping IoT applications Edison shirts an Intel optimised OpenJDK implementation — perfect for Café The Grove Starter Kit Plus provides a set of nice sensor, displays and actuators to get started with IoT IoT Starter Kit
  53. 53. Before getting started with playing with the demo, make sure your board is properly configured You can check the configuration using the configure_edison command Ensure that the WiFi is working! Configuring your Board
  54. 54. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiarySensors
  55. 55. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryDisplays
  56. 56. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary
  57. 57. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryLED
  58. 58. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary
  59. 59. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryProgramming
  60. 60. Intel has contributed several Open Source project that provide high level abstractions to access Sensors, LCD, Led, etc. , for a very large number of different kinds of sensors and manufacturers Programming
  61. 61. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary LED Light Sensor
  62. 62. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary IoT Applications with Vortex and Edison
  63. 63. CopyrightPrismTech,2015 Cloud Fog Fog Fog Fog
  64. 64. CopyrightPrismTech,2015
  65. 65. Vortex can be used to virtualise sensors/displays/motors/.. and make them universally available Instead of locally programming sensors/displays/motors we abstracts them with Topics and access /control through DDS in a location transparent manner Virtualisation DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS
  66. 66. The agentv micro service framework is used to flexibly provision and manage applications Deployment DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS
  67. 67. struct AnalogSensor { short id; float rvalue; float value; }; #pragma keylist AnalogSensor id Temperature Sensor Topic AnalogSensor Temperature SoftState sensor specific microsvc write read read read
  68. 68. struct LCDText {
 short id;
 unsigned short row;
 unsigned short col;
 string text;
 };
 #pragma keylist LCDText id
 
 LCD Topic LCDText LCDText HardState sensor specific microsvc read read struct LCDColor {
 short id;
 short r;
 short g;
 short b;
 };
 #pragma keylist LCDColor id Topic LCDColor LCDColor HardState write write write
  69. 69. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiaryCoding-Lab
  70. 70. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary
  71. 71. This slides have been crafted by Angelo Corsaro Any use of these slides that does include me as Author/Co-Author is plagiary
  72. 72. Vortex makes it extremely easy to build IoT applications Get started Building IoT apps with Vortex and Edison! In Summary
  73. 73. CopyrightPrismTech,2015

×