Distributed Simulations with DDS and HLA

3,706 views

Published on

The OMG DDS (Data Distribution Service) is a standard for data
distribution which is widely used as the foundation for operational
systems such as air traffic control and management, combat systems,
distributed telemetry and control, etc. On the other hand, HLA (High
Level Architecture) is a communication and coordination standard which
is widely adopted in the distributed simulation community.

DDS is increasingly gaining adoption in distributed simulation,
especially for those systems that require high throughput, low
latencies and scalability. In addition, the use of DDS in simulation
provides native interoperability between operational and simulated
systems, thus eliminating integration overhead and complexities.

This presentation introduces DDS and HLA, provide an apple-to-apple
comparison between the two standards and show how DDS and HLA systems
can be seamlessly integrated together.

Published in: Technology
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,706
On SlideShare
0
From Embeds
0
Number of Embeds
66
Actions
Shares
0
Downloads
207
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

Distributed Simulations with DDS and HLA

  1. 1. Distributed Simulations with DDS and HLAOpenSplice DDS Angelo CORSARO, Ph.D. Chief Technology Officer OMG DDS Sig Co-Chair PrismTech angelo.corsaro@prismtech.com José-Ramón Martínez-Salio Technical Sales Engineers Director NADS jrmartinez@nexteleng.es
  2. 2. Context Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ DDS is increasingly being adopted in simulation applications either side-by-side with HLA or as a replacementOpenSplice DDS ☐ This webcast provides an objective comparison of DDS and HLA allowing attendees to understand the value that each of these technologies can bring
  3. 3. OpenSplice DDS Genesis
  4. 4. DDS and HLA Goals DDS HLA Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Foster interoperability and ☐ Foster interoperability and portability of Distributed portability of DistributedOpenSplice DDS Operational Systems Simulation Systems ☐ Address functional and ☐ Address functional non-functional requirements and (some) requirements of non functional requirements Operational Systems of Simulation Systems
  5. 5. Standard Scope DDS HLA Copyright  2011,  PrismTech  –    All  Rights  Reserved. Application Federate Data Centric Publish Subscriber (DCPS) Run-Time Infrastructure (RTI) Content Federation Object Time Ownership Durability Subscription Management Managenent ManagementOpenSplice DDS Minimum Profile Ownership Data Distribution Declaration Management Management Management DDS Interoperability Wire Protocol - DDSI-RTPS UDP/IP Application ☐ DDS and HLA define standardized ways of describing application Data.
  6. 6. Standardization History DDS-ISO-Java DDS-RMI UML4DDS DDS4CCM DDS-ISO-C++ DDS-Security Copyright  2011,  PrismTech  –    All  Rights  Reserved. Dec DDS-TCP/IP DDS v1.1 DDS v1.2 DDSI v2.0 DDSI v2.1 DDS-XTopics Dec Jan Apr Jan March Sep 2005 2006 2007 2008 2009 2010 2011 2012OpenSplice DDS HLA Evolved DDS v1.0 Dec 1996 1997 1998 1999 2000 2001 2003 2004 HLA HLA v1.3 HLA IEEE 1516
  7. 7. [DDS/HLA ] Similarities and Differences DDS HLA Copyright  2011,  PrismTech  –    All  Rights  Reserved. API Standard Yes Yes No Wire Protocol Standard Yes (essentially underspecified)OpenSplice DDS Data Modeling Standard Yes (IDL, XML, XSD, UML) Yes (OMT, XML) Static Declaration of FOM Discovery Fully Dynamic Dynamic Matching Pub/Sub Implementation Dependent Architectural Style Fully Distributed (Most implementation have a centralized broker)
  8. 8. [DDS/HLA ] Similarities and Differences DDS HLA Per Topic with Content Per Object Attribute Subscription Model Copyright  2011,  PrismTech  –    All  Rights  Reserved. Filters and Queries Per Interaction 2 QoS Policies (Reliability QoS 22 QoS Policies and Ordering)OpenSplice DDS ‣ Dependency on globally ‣ No dependency on global defined FOM Coupling knowledge ‣ Time coupling ‣ Time decoupling ‣ Sophisticated time Time Management ‣ Basic Timestamping management service
  9. 9. DDS in Defense and Aerospace Copyright  2011,  PrismTech  –    All  Rights  Reserved.OpenSplice DDS Integrated Modular Vetronics Training & Simulation Systems Naval Combat Systems Air Traffic Control & Management Unmanned Air Vehicles Aerospace Applications
  10. 10. DDS in Commercial Applications Copyright  2011,  PrismTech  –    All  Rights  Reserved.OpenSplice DDS Agricultural Vehicle Systems Large Scale SCADA Systems Smart Cities Train Control Systems Complex Medical Devices High Frequency Auto-Trading
  11. 11. DDS and HLA FundamentalsOpenSplice DDS
  12. 12. Data Distribution Service For Real-Time Systems DDS provides a Topic-Based Publish/ Copyright  2011,  PrismTech  –    All  Rights  Reserved. Subscribe abstraction based on: Data Reader Data Writer ☐ Topics: data distribution subject’sOpenSplice DDS Data Reader Data TopicD Writer DataWriters: data producers TopicA ☐ Data TopicB Reader Data Writer ☐ DataReaders: data consumers TopicC ... Data Data Writer Reader DDS Global Data Space
  13. 13. Data Distribution Service For Real-Time Systems Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ DataWriters and DataReaders are automatically and Data Reader dynamically matched by the Data Writer DDS Dynamic DiscoveryOpenSplice DDS Data Reader Data TopicD Writer TopicA ☐ A rich set of QoS allows the Data Reader TopicB control existential, temporal, Data Writer TopicC ... and spatial properties of data Data Data Writer Reader DDS Global Data Space
  14. 14. HLA Federation ☐ An HLA Federation is a collection of Federates (essentially HLA applications) Copyright  2011,  PrismTech  –    All  Rights  Reserved. sharing a common Federation Object Model (FOM) ☐ Each Federate can publish/subscribe a subset Objects Attributes and Interactions defined by the Federation FOM.OpenSplice DDS Federate A Federate B ... Federate K Federation Object Model <FOM> <Shared object classes> <Shared interaction classes> <More> </FOM> RTI (Run-Time Infrastructure)
  15. 15. DDS Topics “Circle”, “Square”, “Triangle”, ... ☐ A Topic defines a class of streams Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ A Topic has associated a unique Name name, a user defined extensible type and a set of QoS policies Topic Typ SOpenSplice DDS DURABILITY, Qo ☐ QoS Policies capture the Topic e DEADLINE, ShapeType non-functional invariants PRIORITY, … ☐ Topics can be discovered or locally defined struct ShapeType { @Key string color; long x; long y; long shapesize; };
  16. 16. Instances and Samples “Circle”, “Square”, “Triangle”, ... Copyright  2011,  PrismTech  –    All  Rights  Reserved. Name Topic Typ SOpenSplice DDS DURABILITY, Qo e DEADLINE, ShapeType PRIORITY, … struct ShapeType { @Key string color; long x; long y; long shapesize; };
  17. 17. HLA Objects Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ HLA Objects identify a class of instances whose (objects (class Shape attributes can be (attribute color reliable timestamp ShapeSpace) individually published/ (attribute (attribute x best_effort timestamp ShapeSpace) y best_effort timestamp ShapeSpace)OpenSplice DDS subscribed ) (attribute shapesize reliable timestamp ShapeSpace) ) ☐ QoS are controlled at an attribute-level ☐ Object attributes can be bound to spaces and dimensions to organize/partition the data distribution
  18. 18. HLA Interactions Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ HLA Interactions are used to model consumable eventsOpenSplice DDS (interactions ☐ Interactions are (class ShapeCollision reliable timestamp ShapeSpace published/subscribed as (attribute x) (attribute y) atomically ) ) ☐ QoS is attached with the interaciton
  19. 19. Polymorphism DDS HLA Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ DDS is equipped with a ☐ HLA provides supports for structural type system where traditional subtype polymorphism subtype relationships are as supported in declarative deduced based on type nominal type systemsOpenSplice DDS properties as opposed to syntactical declaration ☐ HLA supports only single inheritance ☐ This means that a subscription for a type X matches a ☐ This means that a subscription for a publication for a type Y iff Y <: type X matches a publication for a X (the subtype property is type Y iff Y <: X antisymmetric, reflexive, and transitive)
  20. 20. Polymorphism Point GPoint x: long x: long y: long y: long Copyright  2011,  PrismTech  –    All  Rights  Reserved. z: long t: long Point3D z: longOpenSplice DDS DDS HLA ☐ Point3D <: Point ☐ Point3D <: Point ☐ GPoint <: Point3D
  21. 21. Anatomy of a DDS Application Domain (e.g. Domain 123) Domain Copyright  2011,  PrismTech  –    All  Rights  Reserved. Participant Topic Partition (e.g. “Telemetry”, “Shapes”, )OpenSplice DDS T1 Publisher T1 T3 Subscriber Topic Instances/Samples Tx Ty Tb Ta DataWrter DataReader Tc
  22. 22. OpenSplice DDS Federation Spaces Y.d X.aK X.b I Y.c J Federate Ambassador Anatomy of a HLA Application Copyright  2011,  PrismTech  –    All  Rights  Reserved.
  23. 23. Data Selection DDS HLA Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Pub/Sub granularity is the ☐ Pub/Sub granularity are Topic attributes for Object and ☐ Data can be organized the whole class for an InteractionOpenSplice DDS into Partitions. Partitions matching is based on ☐ Data can be organized in regular expression Spaces and Dimensions ☐ Content Filters and Queries can be used to select the data that is received
  24. 24. DDS Partitions Matching Domain Partitions DDS Publishers and Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Subscribers can specify a M:0:0 M:0:1 M:0:2 list of regular expressions representing the partitions to joinOpenSplice DDS M:1:0 M:1:1 M:1:2 ☐ Actual partition can be any string, but some M:2:0 M:2:1 M:2:2 structure can be given in order mimic hierarchy
  25. 25. DDS Partitions Matching Domain Partitions Copyright  2011,  PrismTech  –    All  Rights  Reserved. M:0:0 M:0:1 M:0:2 M:0:*OpenSplice DDS M:1:0 M:1:1 M:1:2 M:2:0 M:2:1 M:2:2
  26. 26. DDS Partitions Matching Domain Partitions Copyright  2011,  PrismTech  –    All  Rights  Reserved. M:0:0 M:0:1 M:0:2OpenSplice DDS M:1:0 M:1:1 M:1:2 M:2:0 M:2:1 M:2:2 M:*:2
  27. 27. DDS Partitions Matching Domain Partitions Copyright  2011,  PrismTech  –    All  Rights  Reserved. M:0:0 M:0:1 M:0:2OpenSplice DDS M:1:0 M:1:1 M:1:2 M:2:0 M:2:1 M:2:2 M:0:0, M:1:1, M:2:2
  28. 28. Anatomy of a DDS Application [DDS C++ API 2010] Domain Domain Copyright  2011,  PrismTech  –    All  Rights  Reserved. auto dp = DomainParticipant(domainId); Participant Session // Create a Topic auto topic = Topic<ShapeType>(dp, “Circle”) Publisher Topic SubscriberOpenSplice DDS // Create a Publisher / Subscriber auto pub = Publisher(dp) auto sub = Subscriber(dp) Reader/Writers for User Defined for Types DataWriter DataReader // Create a DataWriter/DataWriter auto writer = DataWriter<ShapeType>(pub, topic); Reader/Writer for auto reader = DataReader<ShapeType>(sub, topic); application defined Topic Types
  29. 29. Anatomy of a DDS Application [DDS C++ API 2010] Domain Domain Copyright  2011,  PrismTech  –    All  Rights  Reserved. auto dp = DomainParticipant(domainId); Participant Session // Create a Topic auto topic = Topic<ShapeType>(dp, “Circle”) Publisher Topic SubscriberOpenSplice DDS // Create a Publisher / Subscriber auto pub = Publisher(dp) auto sub = Subscriber(dp) Reader/Writers for User Defined for Types DataWriter DataReader // Write data writer.write(ShapeType(“RED”, 131, 107, 89)); Reader/Writer for // But you can also write like this... writer << ShapeType(“RED”, 131, 107, 89); application defined Topic Types // Read new data (loaned) auto data = reader.read();
  30. 30. Anatomy of an HLA Application using namespace std; int main( int argc, char *argv[] ) { // 1. create the RTIambassador that we are going to work with Federation RTI::RTIambassador* rtiamb = 0; Copyright  2011,  PrismTech  –    All  Rights  Reserved. rtiamb = new RTI::RTIambassador(); // 2. create the federation execution rtiamb->createFederationExecution( "exampleFederation", "testfom.fed" ); cout << "Created federation" << endl; // 3. join the federation execution Federate RTI::FederateAmbassador* fedamb = new MyFedAmb(); rtiamb->joinFederationExecution( "myFederate", "exampleFederation", fedamb );OpenSplice DDS cout << "Joined federation" << endl; // Pub/Sub... // 4. resign from the federation execution rtiamb->resignFederationExecution( RTI::DELETE_OBJECTS_AND_RELEASE_ATTRIBUTES ); cout << "Resigned from federation" << endl; // 5. destroy the federation execution rtiamb->destroyFederationExecution( "exampleFederation" ); cout << "Destroyed federation" << endl; // 6. do some cleanup and exit delete rtiamb; return 0; }
  31. 31. OpenSplice DDS QoS
  32. 32. DDS QoS Model ☐ QoS-Policies control local and end-to-end properties of DDS Copyright  2011,  PrismTech  –    All  Rights  Reserved. Type Matching entities QoS matching QoS QoS QoS QoS QoS QoS QoS ☐ Local properties controlled by Topic Name QoS are related resource usage Publisher Subscriber ... DataWriter writes Type reads DataReader ... ...OpenSplice DDS ☐ End-to-end properties DomainParticipant DataWriter writes Type reads DataReader DomainParticipant controlled by QoS are related Topic Name to temporal and spatial aspects QoS QoS QoS of data distribution ☐ Some QoS-Policies are matched based on a Request vs. Offered Model thus QoS-enforcement
  33. 33. DDS QoS Policies [T: Topic] [DR: DataReader] [DW: DataWriter] [P: Publisher] [S: Subscriber] [DP: Domain Participant] QoS Policy Applicability RxO Modifiable Copyright  2011,  PrismTech  –    All  Rights  Reserved. USER_DATA DP, DR, DW N Y TOPIC_DATA T N Y Configuration GROUP_DATA P, S N Y DURABILITY T, DR, DW Y NOpenSplice DDS DURABILITY T, DW N N SERVICE Data Availability HISTORY T, DR, DW N N PRESENTATION P, S Y N RELIABILITY T, DR, DW Y N PARTITION P, S N Y Data Delivery DESTINATION T, DR, DW Y N ORDER LIFESPAN T, DW N Y
  34. 34. DDS QoS Policies [T: Topic] [DR: DataReader] [DW: DataWriter] [P: Publisher] [S: Subscriber] [DP: Domain Participant] QoS Policy Applicability RxO Modifiable Copyright  2011,  PrismTech  –    All  Rights  Reserved. DEADLINE T, DR, DW Y Y LATENCY T, DR, DW Y Y BUDGET Temporal/ TRANSPORT T, DW N Y Importance PRIORITY CharacteristicsOpenSplice DDS TIME BASED DR N Y FILTER OWNERSHIP T, DR, DW Y N OWNERSHIP DW N Y Replication STRENGTH LIVELINESS T, DR, DW Y N Fault-Detection
  35. 35. OpenSplice DDS Partition Data Delivery Reliability Presentation Data Delivery Order Destination Copyright  2011,  PrismTech  –    All  Rights  Reserved.
  36. 36. Data Availability History Copyright  2011,  PrismTech  –    All  Rights  Reserved. DataOpenSplice DDS Lifespan Durability Availability Ownership Ownership Strength
  37. 37. Temporal Properties Copyright  2011,  PrismTech  –    All  Rights  Reserved. TimeBasedFilter Deadline [Inbound]OpenSplice DDS Throughput LatencyBudget Latency [Outbound] TransportPriority
  38. 38. HLA QoS Policies Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ HLA provides roughly only two policies, one for controlling the reliability and the other for controlling the ordering of dataOpenSplice DDS ☐ HLA ties policies with data thus does not allow different producer/ consumers to refine the QoS with which data is produced/ consumed
  39. 39. Time Management DDS HLA Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Along with automatic time- ☐ HLA provides support for: stamping based on real-time, ☐ Event Driven Simulation DDS provides an API for time- ☐ Time Stepped SimulationOpenSplice DDS stamping messages ☐ Parallel Discrete-Event Simulation ☐ This API can be used to ☐ Wall-clock-time Simulation implement logical clocks ☐ The HLA Time Service provides primitives to coordinate and control the advancement of time
  40. 40. DDS PerformanceOpenSplice DDS
  41. 41. Local Latency Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Inter-Core latency can be as low as 10 usec! Latency distributionOpenSplice DDS ☐ predictable with: ☐ IQR <= 0.5 usec ☐ 99% - Min <= 4 usec
  42. 42. Head of Line Blocking Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Concurrent application w/o real-time networking mightOpenSplice DDS provoke unbounded priority inversion ☐ ...OpenSplice can avoid this...
  43. 43. The Lane’s Effect Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ The proper configuration of network lanes can eliminate (or bound) theOpenSplice DDS priority inversion introduced by the head- of-line blocking
  44. 44. OpenSplice DDS Real-Time Determinism Copyright  2011,  PrismTech  –    All  Rights  Reserved.
  45. 45. Integration DDS and HLA -Live Demo-OpenSplice DDS
  46. 46. OpenSplice DDS Summing Up
  47. 47. Concluding Remarks DDS provides a very powerful and high-performance infrastructure Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ for data distribution ☐ When compared to HLA, DDS stands out for its support for evolvability and dynamic systems/federationsOpenSplice DDS ☐ On the down-side, DDS is a technology that was designed for Operational Systems, as such it does not provide mechanisms such as Time Management. However these mechanisms can easily be implemented over DDS
  48. 48. OpenSplice DDS
  49. 49. References Copyright  2011,  PrismTech  –    All  Rights  Reserved. OpenSplice | DDS Escalier ¥ #1 OMG DDS Implementation ¥ Fastest growing JVM Language ¥ Scala API for OpenSplice DDS ¥ Open Source ¥ Open Source ¥ Open Source ¥ www.opensplice.org ¥ www.scala-lang.org ¥ github.com/kydos/escalierOpenSplice DDS ¥ Simple C++ API for DDS ¥ DDS-PSM-Java for OpenSplice DDS ¥ DDS-based Advanced Distributed ¥ Open Source ¥ Open Source Algorithms Toolkit ¥ github.com/kydos/simd-cxx ¥ github.com/kydos/simd-java ¥ Open Source ¥ github.com/kydos/dada
  50. 50. :: Connect with Us :: ¥opensplice.com ¥forums.opensplice.org ¥@acorsaro ¥opensplice.org ¥opensplicedds@prismtech.com ¥@prismtechOpenSplice DDS ¥ crc@prismtech.com ¥sales@prismtech.com ¥youtube.com/opensplicetube ¥slideshare.net/angelo.corsaro

×