DDS-PSM-Cxx and simd-cxx

1,198 views

Published on

This presentation provides with an historical perspective on the development of the DDS-PSM-Cxx and its relationship with simd-cxx 0.x and simd-cxx v1.0

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,198
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
38
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

DDS-PSM-Cxx and simd-cxx

  1. 1. DDS-PSM-Cxx v1.0 and simd-cxxOpenSplice DDS Angelo CORSARO, Ph.D. Chief Technology Officer OMG DDS Sig Co-Chair PrismTech angelo.corsaro@prismtech.com
  2. 2. OpenSplice DDS History on a Napkin Copyright  2011,  PrismTech  –    All  Rights  Reserved.
  3. 3. OpenSplice DDS Copyright  2011,  PrismTech  –    All  Rights  Reserved.
  4. 4. OpenSplice DDS La Vallee... Copyright  2011,  PrismTech  –    All  Rights  Reserved.
  5. 5. DDS-PSM-Cxx v1.0 OverviewOpenSplice DDS
  6. 6. 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
  7. 7. 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();
  8. 8. Content-Based Data SelectionOpenSplice DDS
  9. 9. Filters and Queries Application ☐ DDS Filters allow to control what gets into a DataReader cache Copyright  2011,  PrismTech  –    All  Rights  Reserved. Query ☐ DDS Queries allow to control what gets out of a DataReader cache DataReader Filters are defined by means ofOpenSplice DDS ☐ ... ContentFilteredTopics ... ... ... ☐ Queries operate in conjunction with DataReader Cache read operations Filter ☐ Filters and Queries are expressed as SQL where clauses
  10. 10. struct ShapeType { Filters @Key string color; long x; long y; [C++ API] }; long shapesize; Copyright  2011,  PrismTech  –    All  Rights  Reserved. /** * NOTE: The Scala API if not provided with DP/Sub/Pub assumes * default domains and default partition. **/ // Create a Topic auto topic = Topic<ShapeType>(dp, “Circle”);OpenSplice DDS // Define filter expression and parameters auto filter = Filter(“x < 100 AND y < 200”); // Define content filtered topic auto cftopic = ContentFilteredTopic<ShapeType>(“CFCircle”, topic, filter) // Create a DataReader for the content-filtered Topic auto dr = DataReader<ShapeType>(sub,cftopic)
  11. 11. struct ShapeType { Query @Key string color; long x; long y; [C++ API] }; long shapesize; Copyright  2011,  PrismTech  –    All  Rights  Reserved. // Define filter expression and parameters auto dr = DataReader<ShapeType>(sub, topic) val query = Query(dr, “x < 100 AND y < 200”);OpenSplice DDS dr.select() .content(query) .read();
  12. 12. Instances ☐ DDS provides a very efficient way of reading data belonging to a Copyright  2011,  PrismTech  –    All  Rights  Reserved. specific Topic Instance ☐ Obviously, one could use queries to match the key’s value, but this is not as efficient as the special purpose instance selectorOpenSplice DDS auto handle = dr.lookup_instance(ShapeType(“RED”, 0, 0, 0)); auto data = dr.select() .instance(handle) .read();
  13. 13. State-Based SelectionOpenSplice DDS
  14. 14. Sample, Instance, and View State ☐ The samples included in the DataReader cache have associated Copyright  2011,  PrismTech  –    All  Rights  Reserved. some meta-information which, among other things, describes the status of the sample and its associated stream/instance ☐ The Sample State (READ, NOT_READ) allows to distinguish betweenOpenSplice DDS new samples and samples that have already been read ☐ The View State (NEW, NOT_NEW) allows to distinguish a new instance from an existing one ☐ The Intance State (ALIVE, NOT_ALIVE_DISPOSED, NOT_ALIVE_NO_WRITERS) allows to track the life-cycle transitions of the instance to which a sample belongs
  15. 15. State Selector in Action [C++ API] Copyright  2011,  PrismTech  –    All  Rights  Reserved. // Read only new samples auto data = dr.read() // Read any samples from live instances auto data = dr.select()OpenSplice DDS .state(DataState::any_data()) .read();
  16. 16. Putting all Together [C++ API] Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ Selectors can be composed in a flexible and expressive mannerOpenSplice DDS auto data = dr.select() .content(query) .state(data_state) .instance(handle) .read();
  17. 17. QoS Provider ☐ The new C++ and Java APIs introduce the concept of a QoS Copyright  2011,  PrismTech  –    All  Rights  Reserved. Provider ☐ This class allows to externally define policies and decouples the mechanism used to define and access policy definition with policyOpenSplice DDS creation            //  QosProvider...            QosProvider  qos_provider(                        "http://www.opensplice.org/demo/config/qos.xml",                        "ishapes-­‐profile");            DataReader<ShapeType>  dr(sub,  topic,  qos_provider.datareader_qos());
  18. 18. In Summary Copyright  2011,  PrismTech  –    All  Rights  Reserved. ☐ simd-cxx v0.x available at http://code.google.com/p/simd-cxx was the major influencer of the new DDS-PSM-Cxx standard. Yet simd-cxx v0.x does not comply with the DDS-PSM-CxxOpenSplice DDS ☐ simd-cxx v1.0 available at http://github.com/kydos/simd-cxx is an alpha implementation of the DDS-PSM-Cxx
  19. 19. OpenSplice DDS
  20. 20. 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
  21. 21. :: 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

×