Home > C++, uml > Using The New C++ DDS API

Using The New C++ DDS API

PrismTech‘s Angelo Corsaro is a passionate and tireless promoter of the OMG’s Data Distribution Service (DDS) distributed system communication middleware technology. (IMHO, the real power of DDS over other messaging services and messaging-based languages like Erlang (which I love) is the rich set of Quality of Service (QoS) settings it supports). In his terrific “The Present and Future of DDS” pitch, Angelo introduces the new, more streamlined,  C++ and Java DDS APIs.

The UML activity diagram below illustrates the steps for setting up and sending (receiving) topic samples over DDS: define a domain; create a domain participant; create a QoS configured, domain-resident publisher (or subscriber); create a QoS configured and type-safe topic; create a QoS configured, publisher-resident, and topic-specific dataWriter; and then go!

Concrete C++ implementations of the activity diagram, snipped from Angelo’s presentation, are presented below. Note the incorporation of overloaded insertion operators and class templates in the new API. Relatively short and sweet, no?

Even though the sample code shows non-blocking, synchronous send/receive usage, DDS, like any other communication service worth its salt, provides API support for blocked synchronous and asynchronous notification usage.

So, what are you waiting for? Skidaddle over to PrismTech’s OpenSplice DDS page, download the community edition libraries for your platform, and start experimenting!

  1. June 10, 2011 at 8:40 am

    Nice post Antony!
    I see from above that you like Erlang. Have you checked out Scala? I’ve recently hacked a relatively complete Scala binding for OpenSplice DDS which is available on http://code.google.com/p/escalier

    I am sure you’ll love it, especially if you’ll take a look at how you can do DDS listeners (e.g. using pattern matching and partial functions).

    A+

    P.S. Out of curiosity, have you played with SimD (http://code.google.com/p/simd-cxx) this is what has shaped the new C++ API for DDS.

    • June 10, 2011 at 9:39 am

      Hi Angelo, and thanks.

      I haven’t checked out Scala nor have I written to the SimD API. I’m a slooow learner and I don’t have enough time to explore all my interests. I’m an imperative, statically-typed C++ dude, so trying to learn the functional, dynamically-typed Erlang language is taking up all of my spare time.

      BTW, is the SImD a PrismTech proprietary API, or will it be put into the DDS standard like the Java and C++ PSM APIs?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: