dds in the e-elt technology demonstrator reynald bourtembourg | 10.05.2010
DESCRIPTION
Architecture Reynald Bourtembourg |TRANSCRIPT
DDS in the E-ELT Technology Demonstrator
Reynald Bourtembourg | 10.05.2010
OpenSplice DDS evaluation
Reynald Bourtembourg | 10.05.2010
• Architecture• DLRL• Pluggable services• Tools• Editions• Evolution of the DDS Standard
Architecture
Reynald Bourtembourg | 10.05.2010
DLRL (Data Local Reconstruction Layer)
Reynald Bourtembourg | 10.05.2010
• OpenSplice = only DDS implementation providing the DLRL
• Mapping relation Topic information model onto user defined object model
• OO programming interface data-encapsulation single inheritance OO-language based object navigation
• Extra configuration steps to define the mapping objects-topics (xml file)
Pluggable services
Reynald Bourtembourg | 10.05.2010
• networking service
• durability service
• DDSI networking service (DDSI = interoperability protocol)
• DBMS-connect Connector data exchange between DDS and any DBMS having ODBC v3 compliant interface
• Secure Networking (encrypted data)
Tools
Reynald Bourtembourg | 10.05.2010
• OpenSplice configurator• mmstat• DDS Tuner• DDSTouchstone• PowerTools MDE
OpenSplice DDS confgurator
Reynald Bourtembourg | 10.05.2010
mmstat
Reynald Bourtembourg | 10.05.2010
DDS Tuner
Reynald Bourtembourg | 10.05.2010
DDS Touchstone
Reynald Bourtembourg | 10.05.2010
• Scenario-driven Open Source benchmarking framework for evaluating performance of DDS implementations• C, C++ and Java• Transceivers – Transponders
Ping Pong communication to measure jitter and latency
• Transmitters and Receivers to measure throughput and efficiency
• Entities dynamically created, configured and destructed (DefTopic and QosTopic samples)• Measurements published on ReportTopic DDS topic• watcher and spotter tools to display the results• Scenario manually created with DDS Tuner or using plain text scenario file• Scenario can be replayed using recorder tool• http://sourceforge.net/projects/dds-touchstone
PowerTools MDE
Reynald Bourtembourg | 10.05.2010
OpenSplice DDS Community Edition
Reynald Bourtembourg | 10.05.2010
Mailing list: http://www.opensplice.org/cgi-bin/twiki/view/Community/Contact
Reynald Bourtembourg | 10.05.2010
OpenSplice DDS Compact Edition
+ support
Reynald Bourtembourg | 10.05.2010
OpenSplice DDS Professional Edition
+ support
Reynald Bourtembourg | 10.05.2010
OpenSplice DDS Enterprise Edition
+ support
OpenSplice DDS Editions
Reynald Bourtembourg | 10.05.2010
x X(1)
(1) Each subscription can choose from one of the supported platforms
Evolution of the DDS Standard
Reynald Bourtembourg | 10.05.2010
• New C++ API in the revised submission stage should be adopted soon (this year) SIMD (SIMple DDS) project
• New Java API• Extensible and Dynamic Topic Types for DDS (DDS-Xtypes)•Web-enabled DDS
Standardization of the interface between DDS and web technologies, WSDL/SOAP and REST
• DDSI improvements
SIMD
Reynald Bourtembourg | 10.05.2010
// -- SIMD Include#include <simd/runtime.hpp>#include <simd/topic.hpp>#include <simd/writer.hpp>#include <simd/traits.hpp>// -- Hello Include#include "gen/ccpp_hello.h"// -- Define the types related to the swatch::hello topic// -- this will define the following types:// -- swatch::helloTypeSupport// -- swatch::helloDataWriter// -- swatch::helloDataReader// -- swatch::helloSeqREGISTER_TOPIC_TRAITS(swatch::hello)
int main(int argc, char* argv[]) { // -- init the simd runtime simd::Runtime::init(); // -- Set topic QoS simd::TopicQos tqos; tqos.set_reliable(); tqos.set_transient();
// -- create the DDS Topic simd::Topic<swatch::hello> helloTopic("helloTopic", tqos); // -- Set DataWriter QoS simd::DataWriterQos dwqos(tqos); dwqos.set_keep_last(history_depth); dwqos.set_auto_dispose(false); // -- create the DDS DataWriter simd::DataWriter<swatch::hello> writer(helloTopic, dwqos); // -- Busines logic : swatch::hello sample; std::stringstream ss; for (int i = 0; i < N; ++i) { ss << i; std::string tmp = ss.str() + "." + message; ss.str(""); sample.name = DDS::string_dup(tmp.c_str()); std::cout << "<<= " << sample.name << std::endl; writer.write(sample); usleep(period*1000); } std::cout << "[done]" << std::endl; return 0;}
SIMD
Reynald Bourtembourg | 10.05.2010
// -- SIMD Include#include <simd/runtime.hpp>#include <simd/topic.hpp>#include <simd/writer.hpp>#include <simd/traits.hpp>// -- Hello Include#include "gen/ccpp_hello.h"
REGISTER_TOPIC_TRAITS(swatch::hello)
int main(int argc, char* argv[]) { // -- init the simd runtime simd::Runtime::init();
#include “ccpp_dds_dcps.h”#include “gen/ccpp_hello.h”
int main( int argc, char * argv[]){ DomainParticipantFactory_var dpf; DomainParticipant_ptr parentDP; ExtDomainParticipant_var participant; /* Create a DomainParticipantFactory and a DomainParticipant (using Default QoS settings) */ dpf = DomainParticipantFactory::get_instance(); parentDP = dpf->create_participant ( domain, PARTICIPANT_QOS_DEFAULT, NULL, ANY_STATUS);/* Narrow the normal participant to its extended representative */ participant = ExtDomainParticipantImpl::_narrow(parentDP);}
SIMD OpenSplice DDS
SIMD
Reynald Bourtembourg | 10.05.2010
…// -- Set topic QoSsimd::TopicQos tqos;tqos.set_reliable();tqos.set_transient();// -- create the DDS Topicsimd::Topic<hello> helloTopic("helloTopic", tqos);
HelloTypeSupport_var helloTS;char * helloTypeName = NULL;ReturnCode_t status;TopicQos topic_qos;/* Register the required datatype for hello. */helloTS = new HelloTypeSupport();helloTypeName = helloTS->get_type_name();status = helloTS->register_type( participant.in(), helloTypeName);/* Set the ReliabilityQosPolicy to RELIABLE. */status = participant->get_default_topic_qos(topic_qos);topic_qos.reliability.kind = DDS::RELIABLE_RELIABILITY_QOS;topic_qos. durability.kind = DDS::TRANSIENT_DURABILITY_QOS;/* Create the DDS topic */helloTopic = participant->create_topic( “hello Topic", helloTypeName, topic_qos, NULL, ANY_STATUS);
SIMD OpenSplice DDS
Evolution of the DDS Standard
Reynald Bourtembourg | 10.05.2010
Extensible and Dynamic Topic Types for DDS (DDS-XTypes):
API for definition of new data types at run-time without code generation A reflective API for the construction, inspection, and manipulation of data samples based on dynamic type definitions Ability to define data types using XML and XSD as well Topics sparse updates (send only the modified fields)
Evolution of the DDS Standard
Reynald Bourtembourg | 10.05.2010
DDSI improvements:
Support of non multicast discovery Possibility to go through TCP/IP Support compression of messages Concept of queues
Interoperability tests
Reynald Bourtembourg | 10.05.2010
• Interoperable protocol• Source code compatibility• Unbounded IDL types• Reliable large data transfer• Interoperability tests (Open Splice DDS 4.2 – RTI DDS 4.4d)
Interoperable protocol
Reynald Bourtembourg | 10.05.2010
• RTI DDS supports DDSI natively• Configuration needed in OpenSplice DDS (ddsi network service)• Using DDSI slightly decreases OpenSplice DDS performances• DDS Domain issues (RTI DDS = id, OpenSplice DDS = path to xml file)• OpenSplice DDS 4.3 limitations:
Only Best EFFORT reliability QoS implemented Only VOLATILE durability QoS implemented Fragmentation of large messages not implemented QoS modifications after creation not possible Standard discovery requires multicast (only discovery specified in the DDSI standard)
Source code compatibility
Reynald Bourtembourg | 10.05.2010
• DDS Standard specifies only the IDL• No Standard C++ API (will come soon)
DDS:string_dup() - DDS:String_dup() in() and inout() methods for sequences only in RTI DDS OpenSplice DDS generates code defining new types Constructors defined as private (Compilation pbs)
• Keys definition in IDL files (//@key - #pragma keylist)
Unbounded IDL types
Reynald Bourtembourg | 10.05.2010
• unbounded string default size in RTI DDS = 255 bytes• -stringSize rtiddsgen option to change the assigned size• no such limitation in OpenSplice DDS
Reliable data transfer
Reynald Bourtembourg | 10.05.2010
• RTI DDS requires asynchronous publisher to send data larger than 63K (ASYNCHRONOUS_PUBLISHER QoS policy)• in OpenSplice DDS, (ddsi) network service is responsible for fragmenting, scheduling and send data through the network• The samples sent must fit in the reserved shared memory segment (default = 10MB) • fragmentation not yet supported by the OpenSplice DDS ddsi service
Interoperability tests
Reynald Bourtembourg | 10.05.2010
• PingPong application from OpenSplice DDS examples ported to RTI DDS• RTI DDS 4.4d and OpenSplice DDS 4.2 Community Edition• Success in exchanging data between RTI DDS and OpenSplice DDS applications• Failure in exchanging data between RTI DDS and OpenSplice DDS applications running on the same machine• Warning: log files in OpenSplice DDS can become big very quickly (OSPL_INFO_FILE, OSPL_LOG_PATH, OSPL_ERROR_FILE env variables)• Interoperability demonstrated at the OMG:
Using a beta version of OpenSplice DDS. No test on the same machine
OpenSplice DDS Evaluation: Conclusion
Reynald Bourtembourg | 10.05.2010
• Interesting open source alternative to RTI DDS• Very flexible and extendable architecture based on service daemons• Daemons must be robust• DDS Tuner seems to be very useful• Power Tools MDE can increase productivity• Only implementation providing the DLRL, but not really needed• Interoperability does not work yet• new C++ PSM should provide better source code compatibility
TDEM
Reynald Bourtembourg | 10.05.2010
• Architecture• RTI DDS CORBA Compatibility Kit• Google Protocol Buffers and DDS
TDEM: Architecture
Reynald Bourtembourg | 10.05.2010
TDEM: RTI DDS CORBA Compatibility Kit
Reynald Bourtembourg | 10.05.2010
• to be able to use CORBA data types in DDS• several limitations:
• Cannot pass a .midl file to rtiddsgen• Could not pass a .idl file generated from a .midl file to rtiddsgen (//@key removed)• if an idl file includes another idl file, we need to generate code for all these include files with rtiddsgen• include <file.idl> not supported by rtiddsgen• We could not reuse the same idl file as the one used with OpenDDS• Cannot mix declaration of structures used only with CORBA and structures used by DDS and CORBA. rtiddsgen generates code for every structure present in the file
TDEM: Google Protocol Buffers
Reynald Bourtembourg | 10.05.2010
package tutorial;message Person {
required string name = 1;required int32 id = 2;optional string email = 3;enum PhoneType { MOBILE = 0; HOME = 1; WORK = 2; }message PhoneNumber {
required string number = 1;optional PhoneType type = 2 [default = HOME];
}repeated PhoneNumber phone = 4;
} // end message Person
message AddressBook {
repeated Person person = 1;}
TDEM: Google Protocol Buffers
Reynald Bourtembourg | 10.05.2010
tutorial::AddressBook address_book;{ // Read the existing address book. fstream input(argv[1], ios::in | ios::binary); if (!address_book.ParseFromIstream(&input)) { cerr << "Failed to parse address book." << endl; return -1; }}for (int i = 0; i < address_book.person_size(); i++) { const tutorial::Person& person = address_book.person(i); cout << "Person ID: " << person.id() << endl; cout << " Name: " << person.name() << endl; if (person.has_email()) { cout << " E-mail address: " << person.email() << endl; } for (int j = 0; j < person.phone_size(); j++) { const tutorial::Person::PhoneNumber& phone_number = person.phone(j); switch (phone_number.type()) { case tutorial::Person::MOBILE: cout << " Mobile phone #: “ << phone_number.number() << endl;...
TDEM: Google Protocol Buffers & DDS
Reynald Bourtembourg | 10.05.2010
• send Google Protocol Buffers messages with DDS
typedef sequence<octet> SeqOctets;struct gpb_message {
SeqOctets gpb_data;};
TDEM: Google Protocol Buffers & DDS
Reynald Bourtembourg | 10.05.2010
• if we use DDS, data should not be opaque to DDS (Content filtering, sparse updates in the future)• DDS XTypes should provide the same advantages
Reynald Bourtembourg | 10.05.2010
Thank you for your attention!
Questions?