SlideShare uma empresa Scribd logo
1 de 109
Baixar para ler offline
DDS: A Next-Generation Approach to
                     Building Distributed Real-Time Systems
                                     Gerardo Pardo-Castellote, Ph.D.
                                     Co-chair OMG DDS SIG
                                     CTO, Real-Time Innovations
                                     gerardo.pardo@rti.com
The Real-Time                         2010 Quickstart
Middleware Experts   http://www.rti.com
Outline

  Overview of Technology
   –   Background
   –   Applications
   –   Data-Centric Pub-Sub
   –   Quality of Service
   –   Add-on components
  Application development cycle
  Architecting data-centric systems & modeling the Data
  Protocol, Performance & Scalability.
  Integrating external and legacy systems.
  Future directions and Standards:
Challenge:
      More Data, More Speed, More Sources

TRENDS:
  Growing Information Volume
  Lowering Decision Latency
  Increasing System Availability
  Accelerating technology insertion and
  deployment

Next-generation systems needs:
   Performance
   Scalability
   Robustness & Availability
   Platform Integration & Evolution
   Safety-Critical Certification
   Security
© 2009 Real-Time Innovations, Inc.          3
Solution: Standards-based Integration
      Infrastructure for Real-Time Applications



                                     Streaming
                                                   Sensors       Events
                                        Data




                                       Data Distribution Service


                                  Real-Time       Enterprise
                                                                Actuators
                                 Applications    Applications



© 2009 Real-Time Innovations, Inc.                                          4
Architecture for the next-generation
systems
 Existing technologies are reaching robustness/performance/scalability limits
 RTI DDS brings a fundamental new architecture and approach
   –   Fully decentralized, peer-to-peer, “no bottlenecks” architecture
   –   Superior Wire Protocol
   –   Powerful data-centric model
   –   Built-in Robustness and High-Availability
   –   Standards-based, multi-platform
                                         Brokers as
                                         choke-points                 RTI Approach




Single-lane traffic
No prioritization
History:                 DDS the Standards

   Data Distribution Service for Real-Time Systems
    – API for Data-Centric Publish-Subscribe distributed systems
    – Adopted in June 2003
    – Revisions: 2004, 2005, 2006
    –   Spec version 1.2: formal/2007-07-01
   Interoperability wire protocol
    –   Adopted in July 2006
    –   Revised in July 2007
    –   Spec version 2.1: formal/2009-01-05
   Related specifications
    –   UML Profile for DDS
    –   DDS for Light-Weight CCM
    –   Extensible Topics for DDS(*)


   Multiple (7+) Implementations

                                                                   6
Open Architecture

                                                          Cross-vendor portability
               Vendor independent
                 – API for portability
                 – Wire protocol for interoperability
               Multiple implementations
                                                                DDS API
                 – 7 of API
                 – 4 support RTPS (+1 non-DDS)
                                                              Middleware
               Heterogeneous
                 – C, C++, Java, .NET (C#, C++/CLI)
                                                               Real-Time
                 – Linux, Windows, VxWorks, other          Publish-Subscribe
                   embedded & real-time                   Wire Protocol (RTPS)

               Loosely coupled

                                                        Cross-vendor interoperability


© 2009 Real-Time Innovations, Inc.                                                   7
RTI DDS Application Examples

                                     Aegis Weapon System                       ScanEagle UAV
                                     Lockheed Martin                                     Boeing
                                     Radar, weapons, displays,          Sensors, ground station
                                       C2

                                                                   Advanced Cockpit Ground
                                     B-1B Bomber                            Control Station
                                     Boeing                       Predator and SkyWarrior UAS
                                     C2, communications,                       General Atomics
                                       weapons                         Telemetry data, multiple
                                                                                  workstations


                                     Common Link Integration
                                       Processing (CLIP)
                                     Northrop Grumman                               RoboScout
                                     Standards-compliant                                Base10
                                        interface to legacy and
                                        new tactical data links     Internal data bus and link to
                                                                         communications center
                                     Air Force, Navy, B-1B and
                                        B-52

© 2009 Real-Time Innovations, Inc.                                                                  8
RTI DDS Application Examples

                                                                                     Driver safety
                                     Multi-ship simulator
                                                                                       Volkswagen
                                     FORCE Technology
                                                                    vision systems, analysis, driver
                                     Controls, simulation display              information systems


                                                                                 Medical imaging
                                     Mobile asset tracking                           NMR and MRI
                                     Wi-Tronix                       Sensors, RF generators, user
                                     GPS, operational status          interface, control computers
                                       over wireless links


                                                                               Automated trading
                                                                    Automated Trading Desk (ATD,
                                     Highway traffic monitoring                    now Citigroup)
                                     City of Tokyo                     Market data feed handlers,
                                                                       pricing engines, algorithmic
                                     Roadway sensors, roadside                  trading applications
                                       kiosks, control center


© 2009 Real-Time Innovations, Inc.                                                                     9
RTI DDS Application Examples

                                     Full-immersion simulation               Signal Processing
                                     National Highway Transportation             PLATH GMBH
                                       Safety Authority
                                                                           RTI supports modular
                                     Migrated from CORBA, DCOM              programming across
                                       for performance                              product line



                                     Air-Traffic Management
                                     INDRA.
                                     Deployed in                             Large Telescopes
                                     UK, Germany, Spain                      European Southern
                                     Standards, Performance,                        Observatory
                                        Scalability                    Performance & Scalability
                                                                         1000 mirrors, 1sec loop

                                                                              Radar Systems
                                     Industrial Control                      AWACS upgrade
                                     Schneider Electric           Evolvability, Mainteinability,
                                     VxWorks-based PLCs                     and supportability
                                     communicate via RTI-DDS
© 2009 Real-Time Innovations, Inc.                                                                 10
Standards Focus


       Object Management Group
        – Board of Directors member
        – Authored DDS and RTPS specs, co-chair SIG
       Open Group
       Network Centric Operations Industry
       Consortium (NCOIC)
        – Chair Open Standards and Patterns Working
          Group
       STAC Benchmark Council
       Support and integrate with:
        – DDS, RTPS, JMS, SQL, Web Services,
          CORBA, UML, HLA, JAUS, Eclipse, IPv6…



11                             © 2008 Real-Time Innovations, Inc.
Corporate Background

 Founded by Stanford
 researchers
 Focused on real-time
 middleware
 Solid financials
  – 16-year track record of growth
 Real-Time Market Leader
  – #1 market share in embedded
    middleware of all types1
  – 70+% worldwide share of DDS
    market2
 50/50 software and services
                                     1Embedded   Market Forecasters
                                     2VDC   Analyst Report
                                                                 12
RTI Supports all Phases of Development
    Services        Engagement               Description
  Capabilities        Timeline
Workshop          2 days          Introduction to RTI products and
                                  capabilities
QuickStart        2+ days         In-depth training on RTI DDS API,
                                  QoS policies, and common
                                  architecture patterns
Support           On-Demand       Web-portal, phone and email
                                  customer lauded support
Architecture Study 3-4 weeks      Custom design review, risk analysis
                                  and architecture recommendations
Design Support    4+ weeks        Support hardware & software
                                  integration, architecture design,
Package
                                  performance tuning, on-site
                                  debugging, implementation support
Integration &     SOW supported   Custom feature, tool and software
                                  development support
Development
Ports             As needed       RTI tools and software on your
                                  special, purpose built hardware
RTI Global Presence
Benefits of the DDS approach


Simple & Powerful Data-Centric Pub-Sub Model
             Reduces Risk and Development/Integration Time
             Enhances effective performance by delivering the
             right data to the right place with the right QoS
             Standards-based: API and Protocol


1.    Unsurpassed Performance and Scalability
             Priority-aware no choke-points architecture


2.    Builds higher quality systems and lowers TCO
             Built-in high-value capabilities
             Handles Availability & other
                                                           Messaging   Event          Database
             “hard problems”                               & Caching   Processing     Bridge       SQL


             Easy to maintain and Evolve                               Persistence    Redundancy
                                                           Recording
                                                                       & Durability   & Failover
             Leverage multicore
 © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                             15
Data-Centric Pub-Sub Model


Essentially a virtual, decentralized global data space



                                              Source (key)   Latitude   Longitude   Altitude

                                              UAV1               37.4      -122.0     500.0
                                              UAV2               40.7       -74.0     250.0
                                              UAV3               50.2        -0.7    2000.0




                                                  Persistence                   Recording
                                                   Service                       Service
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                        16
example
Data-Centric Model

“Global Data Space” generalizes Subject-Based Addressing
  –    Data objects addressed by DomainId, Topic and Key
  –    Domains provide a level of isolation
  –    Topic groups homogeneous subjects (same data-type & meaning)
  –    Key is a generalization of subject
         • Key can be any set of fields, not limited to a “x.y.z …” formatted string




                                                                                       Data Reader
   Data Writer               Topic (subject)
                              Key

                          Data Object
                                                                                               Data Reader
      Data Writer



                                                                                       Data Reader
      Data Writer
ShapesDemo
      Demo: Publish-Subscribe




© 2009 Real-Time Innovations, Inc.                18
example
DDS communications model


                    Data         Domain                             Data          Domain
   New              Writer     Participant                         Reader       Participant
                   “Alarm”
                                               Got new             “Alarm”
subscriber!                                     data
                             Offered                                         Requested
        Listener             QoS                        Listener              QoS




     Participants scope the global data space (domain)
     Topics define the data-objects (collections of subjects)
     Writers publish data on Topics
     Readers subscribe to data on Topics
     QoS Policies are used configure the system
     Listeners are used to notify the application of events
ShapesDemo
      Demo: Real-Time Quality of Service


                                            Content filter
                                            Time-based filter
                                            History
                                            Deadline


                                              Analyzer




© 2009 Real-Time Innovations, Inc.                           20
Real-Time Quality of Service (QoS)

                          QoS Policy              QoS Policy
                          DURABILITY              USER DATA




                                                                          User QoS
                          HISTORY                 TOPIC DATA
        Volatility




                          READER DATA LIFECYCLE   GROUP DATA

                          WRITER DATA LIFECYCLE   PARTITION




                                                                          Presentation
                          LIFESPAN                PRESENTATION
         Infrastructure




                          ENTITY FACTORY          DESTINATION ORDER

                          RESOURCE LIMITS         OWNERSHIP




                                                                       Redundancy Transport
                          RELIABILITY             OWNERSHIP STRENGTH
         Delivery




                          TIME BASED FILTER       LIVELINESS

                          DEADLINE                LATENCY BUDGET

                          CONTENT FILTERS         TRANSPORT PRIORITY

© 2009 Real-Time Innovations, Inc.                                                            21
20X Faster than JMS / Broker-based solutions

    RTI DDS is about 20X faster than JMS

                                                                                                                     60,000
                          Throughput with a single publisher
                                         ( 2KB messages )                                                            50,000




                                                                                 Point-to-Point Updates per Second
                    45
                    40
                                      RTI DDS                                                                        40,000                                                              1-1
                                                                                                                                                                                         1-10
                                      JMS
[1000's sample/s]




                    35                                                                                               30,000
                                                                                                                                                                                         1-24

                    30
                    25                                                                                               20,000


                    20
                                                                                                                     10,000
                    15
                    10                                                                                                   0
                                                                                                                              16   32           64          128         256            512      1024
                     5                                                                                                                  Message/Data Size (bytes - without batching)
                     0
                          2          4          6         9            11   18

                                              CPU load [%]
                                                                                                                        RTI DDS reliable multicast exhibits
                                                                                                                        near perfect scalability

Platform: Linux 2.6 on AMD Athlon, Dual core, 2.2 GHz
             © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                                                                                            22
DDS Is Scalable




               Going from 1 to 888                    Ultra-low latency and jitter
               subscribers of the same                 – Deterministic
                                                       – No intermediaries
               data has only a 10% impact
               on throughput



http://www.rti.com/products/dds/benchmarks-cpp-linux.html
© 2009 Real-Time Innovations, Inc.                                                   23
Realizing Performance & Scalability
              RTI DDS Approach                            Others: Broker-based middleware

                                                                 AMQP

                    RTPS
                                                                  unspecified




              DDS operates peer-to-peer, without brokers
              DDS uses RTPS, an Advanced Multi-Session
              protocol supporting Reliable Multicast
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                               24
DDS Enables Higher quality, Lower TCO
     Systems

        Pre-built components address many challenging use-cases
               Presence
               Discovery
               Historical Cache
               Durable Data
               Availability
               Redundancy & Failover
               Recording
               Database Connectivity
               Web Accessibility
               Transformation                             Messaging   Event          Database
                                                          & Caching   Processing     Bridge       SQL
               Event Processing
                                                                                     Redundancy
               WAN Routing                                Recording
                                                                      Persistence
                                                                      & Durability   & Failover


               Security Guard Hooks
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                 25
Outline

  Overview of Technology
  Application development cycle
   – How to begin. Hello world example.
   – Defining data in XML and XSD
   – Development and Run-time Tools: Ping, Spy, Analyzer, Wireshark,
     Excel
   – Discovery and Builtin-Topics
   – Configuring QoS via XML files


  Architecting data-centric systems & modeling the Data
  Protocol, Performance & Scalability.
  Integrating external and legacy systems.
  Future directions and Standards:
Hands-on Example (C++)

                           Type          Three minutes to a running app!!
                         Definition      1. Define your data
                                         2. Create your project
                      MyType.idl         3. Build
                                         4. Run: publisher subscriber
MyType.sln
              rtiddsgen
   MyType.h

                      MyTypePublisher.cpp
                                                      Aux:
MyTypeSupport.c
                                                      File Browser
                   MyTypeSubscriber.cpp               Console
              compiler                                Delete Files
                                                      rtiddsspy
              Publisher.exe       Subscriber.exe
Alternatives beyond IDL and CDR

Type Representation                                       Type Representation
   “Foo” schema                                              “Foo” schema
    IDL, XSD, …                                               IDL, XSD, …
                 rtiddsgen
                                   DDS API


                    DDS-API                    DDS-API
    Foo.h,                                                        Foo.h,
                DataWriter<Foo>            DataReader<Foo>
   Foo.java                                                      Foo.java

  Language                                                       Language
   Bindings                       ddsgen                          Bindings

              Data Representation          Data Representation
                  10110011…                    10110011…

                      CDR, TLV,                CDR, TLV,
                      JSON, XML                JSON, XML

                                  DDS-RTPS
                                  Wire Interoperability
Alternative Type Description Languages

rtiddsgen supports 4 alternative ways to define types:
     –    All are equivalent
                                                              Exercise:
     –    You can convert between all these formats           - Start with an IDL Type
                                                                   - Convert to XML
    IDL                                                            - Convert to XSD
     –    + Simple, Compact, Similar to C/C++/Java            - Start with an XML-defined type
     –    + Allows type sharing with CORBA                         - Convert to IDL
     –    - Perceived as “legacy”
     –    - Limited tool support                                   - Convert to XSD
    XML
     –    + Good tool support and syntax validation
     –    + Familiar to a large community. Fashionable
     –    - More verbose. Custom Syntax
    XSD
     –    + Good tool support
     –    + Commonly used as a type-description language
     –    - Cumbersome syntax for certain types. Not human friendly
    WSDL
     –    + Same as XSD and allows type sharing with Web-Services
     –    - Same as XSD
rtiddsgen Details

rtiddsgen [-d <outdir>] [-language <C|C++|Java|C++/CLI|C#>]
         [-namespace] [-package <packagePrefix>]
         [-example <arch>] [-replace] [-debug]
         [-corba [client header file]] [-optimization <level of optimization>]
         [-stringSize <Unbounded strings size>]
         [-sequenceSize <Unbounded sequences size>]
         [-notypecode] [-ppDisable] [-ppPath <path to the preprocessor>]
         [-ppOption <option>] [-D <name>[=<value>]]
         [-U <name>] [-I <directory>] [-noCopyable] [-use42eAlignment]
         [-help] [-version] [-convertToIdl | -convertToXml | -convertToXsd |
          -convertToWsdl]
        [[-inputIdl] <IDLInputFile.idl> | [-inputXml] <XMLInputFile.xml> | [-inputXsd]
    <XSDInputFile.xsd> | [-inputWsdl] <WSDLInputFile.wsdl>]

    DefinitionFile can be IDL, XSD and XML file
    -example generates example pub/sub apps and makefiles for
    compilation.
    -replace replaces everything that’s generated. Use if the data type
    definition has changed. Always use with caution if you’ve made
    modifications.
IDL vs. XML: IDL Example




        struct MemberStruct{
          short sData;
        }

        typedef MemberStructType; //@top-level false




31
IDL vs. XML: XML Example



       <?xml version="1.0“
             encoding="UTF-8"?>
       <types   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:noNamespaceSchemaLocation="../rti_dds_topic_types.xsd">

         <struct name="MemberStruct"
                 topLevel="false">
           <member name="sData“ type="short"/>
         </struct>

         <typedef name="MemberStructType"
                   type="nonBasic“
                   nonBasicTypeName="MemberStruct“
                   topLevel="false"/>
       </types>




32
IDL vs. XSD: XSD Example
       <?xml version="1.0" encoding="UTF-8"?>
       <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:dds="http://www.omg.org/dds" xmlns:tns="http://www.omg.org/IDL-
       Mapped/" targetNamespace="http://www.omg.org/IDL-Mapped/">
         <xsd:import namespace="http://www.omg.org/dds"
       schemaLocation="rti_dds_topic_types_common.xsd"/>
         <xsd:complexType name="MemberStruct">
           <xsd:sequence>
             <xsd:element name="sData" minOccurs="1" maxOccurs="1"
       type="xsd:short"/>
           </xsd:sequence>
         </xsd:complexType>
           <!-- @topLevel false -->

         <xsd:complexType name="MemberStructType">
           <xsd:complexContent>
             <xsd:restriction base="tns:MemberStruct">
               <xsd:sequence>
                 <xsd:element name="sData" type="xsd:short" minOccurs="1"
       maxOccurs="1"/>
               </xsd:sequence>
             </xsd:restriction>
           </xsd:complexContent>
         </xsd:complexType>
           <!-- @topLevel false -->
33
       </xsd:schema>
ShapesDemo

     Data Persistence                                                Persistence_svc



     A standalone service that persists data outside of the
     context of a DataWriter                           Data
                                                                   Data              Writer          Data
      Can be configured for:                                       Writer                           Reader
      • Redundancy
      • Load balancing
                                                           Data
      • Direct for performance                            Reader            Global Data Space
      • Relay/Transactional
      • Redundant/ Fault-tolerant
                                                                    Persistence           Persistence
                                                                      Service               Service

                                                                     Permanent                Permanent
                                                                      Storage                  Storage



© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                   34
Data Persistence


     A standalone service that persists data outside of the
     context of a DataWriter                           Data
        Can be configured for:                                     Data               Writer          Data
                                                                   Writer                            Reader
        • Redundancy
        • Load balancing
                                                           Data                    Global
                                                          Reader                 Data Space
     Demo:
     1. PersistenceService
     2. ShapesDemo
     3. Application failure                                         Persistence               Persistence
     4. Application re-start                                          Service                   Service
     5. Persistence Svc failure
                                                                     Permanent                 Permanent
     6. Application re-start                                          Storage                   Storage



© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                     35
ShapesDemo
     Ownership and High Availability

       Producer / Writer
                                                          K1 Pri
           strength=10                                           mary
                                                                                        Topic T1
       Producer / Writer                                  K1 Backup
            strength=5
                                                                        K2 Primary      K1   K2
       Producer / Writer                                  K2 Backup
            strength=1

             Owner determined per Topic and Key
             Only writer with highest strength can publish a Key
             Automatic failover when highest strength writer:
               – Loses liveliness
               – Misses a deadline
               – Stops writing the subject


             Shared Ownership allows any writer to update any object
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                            36
Outline


  Overview of Technology
  Application development cycle
  Architecting data-centric systems & modeling the Data
   – Examples: News example, Data Streaming, Commands, Video
   – Data Persistence with Examples
   – Using DynamicData


  Protocol, Performance & Scalability.
  Integrating external and legacy systems.
  Future directions and Standards:
Components/Mechanics of the GDS
     Application                                        Application




                                       GDS Definition

                                       Discovery

      Application                                       Application


    Listener                                                   Listener
                                 Protocol




                      Cache
                    Management                            Cache
                                                        Management
Components/Mechanics of the GDS
     Application                                           Application




                                                          Domain Modeling
                                                           & Sys. Design

                                         GDS Definition

                                         Discovery

      Application         Config &
                                                            Application
                            Qos

    Listener                                                      Listener
                                     Protocol




                      Cache
                    Management                               Cache
                                                           Management
Designing a Data-Centric System


  Define/Model the Global Data Space
  Configure the Cache Management
  Configure Discovery
  Configure the Protocol


  Configure/Use hooks for
   – Fault detection
   – Controlled access
Global Data Space / Global State


  Identify the number of domains


  Domain Information model
   –   Topics
   –   Types
   –   Keys
   –   Ownership
Domain and Domain Participants

                                    N4 App 4    • Container for
   N1 App 1
    Pub/Sub                         Pub/Sub     applications that
   (A,B/C,D)                        (D/C,E,F)   want to communicate

                                                • Applications can
   N2 App 2                         N4 App 5    join or leave a
   Subscribe        Domain           Publish    domain in any order
      (C)                              (C)
                                                • New Applications
                                                are “Auto-Discovered”

   N3 App 3                         N5 App 6
                                                • An application that
   Pub/Sub                          Subscribe
   (E,F/A,C)                          (B,C)     has joined a domain
                                                is also called a
                                                “Domain Participant”


               Single ‘Domain’ System
Domain and Domain Participants

Using Multiple domains for Scalability, Modularity & Isolation

     Node 1 - App 1                           Node 4 - App 1
       Pub/Sub              Domain A            Pub/Sub



     Node 2 - App 1                           Node 4 - App 2
       Subscribe                                 Publish

                             Domain B

     Node 3 - App 1                           Node 5 - App 1
       Pub/Sub                                  Subscribe


                              Domain C
     Node 5 - App 2          Added Func.      Node 6 - App 1
       Pub/Sub                                  Pub/Sub




demo_domain_0         Multiple Domain System demo_domain_1
Topics & Datatypes, Keys & Subjects
Topic “MarketData”             Data-type (name-type-value pairs)


source     type      symbol      Exchange          volume        bid           ask
OPRA                 IBM         NYSE              200000        118.30        118.36
OPRA                 AAPL        NASDAQ                          171.20        171.28
RTFP       EQ




           Key fields      Subject                            Additional fields (payload)


Topic “OrderEntry”
Exchange     type       Symbol       Order num       number       limit        stop         expiration

NYSE         BUY        IBM          11956           500          120          -            DAY

NYSE         BUY        IBM          11957           1000         124.5        124          DAY

NASDAQ       SELL       AAPL         11958           400          -            160          DAY


           Subject                    Key fields                       demo_filters
QoS: Ownership
 Specifies whether more than one DataWriter can
   update the same instance of a data-object

  Ownership = EXCLUSIVE                Ownership = SHARED
  “Only highest-strength                “All data-writers can
   data writer can update               each update data-
   each data-instance”                  instance”

     Data            Data     Data     Data            Data     Data
     Writer          Writer   Writer   Writer          Writer   Writer




            Data-                             Data-
          Instance                          Instance

Provides fast, robust, transparent replacement for fail-
over and/or take-over.
demo_ownership

QoS: Ownership Strength

Specifies which DataWriter is allowed to update the
  values of data-objects
                                            OWNERSHIP_STRENGTH
                                            “Integer to specify the
                                  ORDER      strength of an instance”

 Strength = 1      Strength = 4                                  Domain
                                                               Participant
    Data        AfterData Expires
                       QoS                       Data      “RIGHT”
    Writer           Writer                     Reader
   “LEFT”         - Deadline
                    “RIGHT”                                “LEFT”
                  - Liveliness
  Publisher        Publisher                  Subscriber
      S                S




          Note: Only applies to Topics with Ownership = Exclusive
Configure the Cache Management


  Cache State Content
  –   History                  Writer
                             Application
  –   Lifespan
  –   Persistence
  –   Resources



  Reader Cache View
  –   Partitions
  –   Content-Based Filter
  –   Time-Based Filter
  –   Order
                              Reader
                             Application
QoS: History – Last x or All
KEEP_ALL:                                                  KEEP_LAST: “depth” integer for
Publisher: keep all until delivered                        the number of samples to keep at
Subscriber: keep each sample until the                     any one time
application processes that instance
                                                                         demo_history

                      S7                                                          S7
       Data                          Data
                                                S7                     Data
                      S6                                                          S6
       Writer                        Writer     S6                    Reader
                      S5                                                          S5
                      S4                                                          S4
                      S3
     Publisher
                      S2         Publisher                          Subscriber
                      S1
           Keep All                     Keep Last 2                       Keep Last 4




                 S7        S6   S5        S4   S3     S2      S1
lifespan_pub

QoS: Lifespan                           lifespan_sub

                              User can set lifespan duration
                              Manages samples in
                              the history queues, attached to each
                              Sample
                 Topic




                                                  S1
       Data                     Data
       Writer                  Reader             S2
                                                  S3
                                                  S4
                                                  S5       Perm.
     Publisher                Subscriber          S6      Storage
                                                  S7      S1    S2




                         S4    S3       S2   S1
Content-Based Filtering

 Instance 1     Value = 249
                                              Content Filtered
                Value = 230                       Topic
 Instance 2

 Instance 3     Value = 275                                      Topic


 Instance 4     Value = 262

                                              “Filter Expression ”
 Instance 5     Value = 258
                                                Ex. Value > 260

 Instance 6     Value = 261


 Instance 7     Value = 259


                              The Filter Expression and Expression
                              Params will determine which instances of the
                              Topic will be received by the subscriber.
content_filter_example
QoS: TIME_BASED_FILTER
                                             time_filter_example
                     Topic     “minimum_separation”:
                               Data Reader does not want to receive data
 Domain                        faster than the min_separation time
 Participant


          Data                                       Data
          Writer                                    Reader


         Publisher           Discarded
                                                   Subscriber
                             samples



                     S        SSS        S         S            S
                     minimum separation        Data Samples
Cache Management in Action


                             Topics
                             – Square, Circle, Triangle
                             – Attributes
                             Data types (schemas)
                             – Shape (color, x, y, size)
                                   • Color is instance Key
                             – Key
                                   • Color field used for key

                             QoS
                             – History, Partition
                             – Time-Based Filter
                             – Content-Based Filter



     demo
Configure the Protocol

  Discovery
  Reliability                   Writer
                              Application
  Batching
  Liveliness
  Flow Control
  Asynchronous write
  Network Configuration
   –   Enabled Transports +
       transport properties
   –   Multicast addresses
   –   Transport Priority
  OS settings
   –   Threads                 Reader
                              Application
   –   Memory
Tunable Reliability Protocol
   Configurable AckNack reply times             Performance can be tracked by
   to eliminate storms                          senders and recipients
                                                 –     Configurable high/low watermark,
   Fully configurable to bound                         Buffer full
   latency and overhead                         Flexible handling of slow
    –   Heartbeats, delays, buffer sizes        recipients
                                                 –     Dynamically remove slow
                                                       receivers

                     S7                                                          S1
    Data             S6
                               Reliable                          Data            S2
    Writer                                                      Reader
                     S5        •Guaranteed                                       S3
                     S4         Ordered Delivery                                 S4
                     S3                                                          S5
  Publisher                    •“Best effort” also              Subscriber       S6
                     S2
                     S1
                                supported                                        S7


                S8        S7   S3    S5    S4     S2       S1
                                       NACK #6
                               S6
Configure Notifications, Fault Detection &
Management



                                  Writer
                                Application


   Listeners
   Deadline Qos
   Liveliness Qos
   Built-in Readers
   Notification of matching

                                  Reader
                                 Application
QoS: Deadline                                    deadline_example


                               Topic
                                                 DEADLINE “deadline period”




                 Commits                 Failed to
                 to provide              get data
    Data         data each                                            Data
    Writer       deadline                                Listener    Reader
                 period.

   Publisher                             Expects data every         Subscriber
                                         deadline period.



                              deadline


             S      X     S        S        S        S    S
QoS: Liveliness –                              liveliness_example
Type and Duration

 Type: Controls who is responsible for issues of ‘liveliness packets’
    AUTOMATIC = Infrastructure Managed
    MANUAL       = Application Managed
                                                                        kill_apps
             Topic                                         Topic


                              Failed to
                               renew
                                lease
             Data                                           Data
             Writer                         Listener       Reader




            Publisher                                  Subscriber



                        lease_duration

                        LP        LP         LP        S

                                          Liveliness Message
Exercise: How could “chat rooms” be
implemented?


  Different Topics for each Chat room?
  Map to Partitions?
  Add field to the message and use content-
  filtered Topics?
  Same as before and also make room part
  of the Key?
  Others?
Discuss pros and cons of each approach
Exercise: How could we implement Ground
control stations that monitor UAVs

  Different Topics for each UAV?
  – Or use Keys?
  Different Domains for each Ground Station?
  – Or Partitions?
  How to control multiple UAVs from the same ground
  station?
  How to switch the ground station that controls the UAV?
  How to do failover between ground stations?
  How to direct a message to one or all UAVs?
  How to detect loss of connection to an UAV?

Discuss pros and cons of each approach
Outline

  Overview of Technology
  Application development cycle
  Architecting data-centric systems & modeling the Data

  Protocol, Performance & Scalability.
   – Details on Reliable Protocol
   –   Latency and Throughput
   –   Using RTI’s LatencyTest and Perftest
   –   Batching
   –   Asynchronous writes & FlowController
   –   Maximizing latency and Throughput


  Integrating external and legacy systems.
  Future directions and Standards:
Performance & Scalability

    RTI DDS is about 20X faster than JMS

                                                                                                                     60,000
                          Throughput with a single publisher
                                         ( 2KB messages )                                                            50,000




                                                                                 Point-to-Point Updates per Second
                    45
                    40
                                      RTI DDS                                                                        40,000                                                              1-1
                                                                                                                                                                                         1-10
                                      JMS
[1000's sample/s]




                    35                                                                                               30,000
                                                                                                                                                                                         1-24

                    30
                    25                                                                                               20,000


                    20
                                                                                                                     10,000
                    15
                    10                                                                                                   0
                                                                                                                              16   32           64          128         256            512      1024
                     5                                                                                                                  Message/Data Size (bytes - without batching)
                     0
                          2          4          6         9            11   18

                                              CPU load [%]
                                                                                                                        RTI DDS reliable multicast exhibits
                                                                                                                        near perfect scalability

Platform: Linux 2.6 on AMD Athlon, Dual core, 2.2 GHz
             © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                                                                                            61
Extremely low latency and jitter




                  Reliable, ordered delivery over
         Gigabit Ethernet between 2.4 GHz Core 2 Quad
      processors running 32-bit Red Hat Enterprise Linux 5.0


© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL        62
Orders of magnitude more scalable than
     broker-based solutions




             Going from 1 to 888                          New topics can be added to a
             subscribers of the same                      system without impacting the
             data has only a 10% impact                   latency and throughput on
             on throughput                                other topics
                                                          Throughput with 8 topics is 8x
                                                          the throughput with 1 topic

http://www.rti.com/products/dds/benchmarks-cpp-linux.html
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                    63
Realizing Performance & Scalability
                 RTI Approach                             Others: Broker-based middleware

                                                                 AMQP

                    RTPS
                                                                  unspecified




              RTI operates peer-to-peer, without brokers
              RTI uses RTPS, an Advanced Multi-Session
              protocol supporting Reliable Multicast
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                               64
Advanced Scalability & Performance
     Techniques


             Latency and Priority Aware message batching
             Content-Aware multi-channel reliable multicast
             Enhanced Reliable Protocol
               – Selective ACKs (SACKs) for Confirmed Reliability
               – NACK-only Reliable Protocol for Massive Scalability

             Smart caching integrated with the message protocol
             Content-Filtering at the source




© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                65
Message Batching
                                         Send queue                               Receive queue

                         write()

      sender                                                                                      receiver

                                                          Without batching each
                                                          message is separately
                                                          sent. For small messages
                                                          protocol headers might be
                                                          bigger than payload



                                          Send queue                              Receive queue
                                                          With batching messages
                                                          are held a little and                      Transparent:
                         write()                          combined into larger
                                                                                                     Receiver still
                                                          batches maximizing
                                                                                                     sees individual
      sender                                              throughout and minimizing
                                                                                                     messages
                                                          CPU


                                                                                                   receiver

© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                             66
Reliability with Batching

             Reliability must work even when messages are
             batched
             ACK or NACK of individual samples would negate
             some of the benefits of batching…
             => Protocol must be batch aware so that it can
             ACK/NACK complete batches!
                            write()
                                                          B1                  B1
           sender
                                       B1
                                                          B2                  B2

                                       B2
                                                          B3
                                                                              B3

                                       B3                                          receiver
                                                          ACK(B3), NACK(B2)

                                                               Repair B2
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                       67
Batching is hard but it pays!


                                                          RTI DDS 4.3b perftest results

                            1000

                             900

                             800
        Throughput (Mbps)




                             700                                                     Linux Baseline
                             600                                                     Linux 10Kb Batch
                             500

                             400

                             300
                             200

                             100

                               0
                                   0        1000                  2000            3000           4000   5000
        Intel Core2Duo Single-CPU Dual-Core 2.4GHz, 4MB cache      Sample size (bytes)
        32-bit CentOS 5 (RHEL 5), 2GB memory, Intel E1000 NIC

© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                                        68
Classic (TCP Style) Reliable Protocol
     No packet loss situation


           01                                                                    01
                                                                                          01
           02                                                                    02
                                                                                          02
           03                                                                    03
                                                                                          03
           04                                                                    04, HB
                             ACK 1-4                                                      04
           05                                                                    05
                                                                                          05
           06                                                                    06
                                                                                          06
           07                                                                    07
                                                                                          07
           08                                                                    08, HB
                             ACK 1-8                                                      08




                                                      ShapesDemo


                                                          Company Confidential
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                        69
Classic (TCP Style) Reliable Protocol
     with some packet loss


           01                                                                    01
                                                                                                01
           02                                                                    02
                                                                                                02
           03                                                                    03
                                                                                                X
           04                                                                    04, HB     X
                             ACK 1-2, NACK 3
           05                                                                    05         X
                                                                                    03
           06                                                                       04
                                                                                                06
           07                                                                    06 05
                                                                                                07
           08                                                                    07
                                                                                                08
                                                                                 08, HB
                             ACK 1-8



                                                   Packets 04 and 05 are received but the
                                                   protocol drops them because a prior
                                                   packet 03 is missing.
                                                   This wastes valuable bandwidth

© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                              70
RTI DDS Reliability (Reader Cache + SACK)
     improves performance when packet loss occurs


           01                                                              01
                                                                                     01
           02                                                              02
                                                                                     02
           03                                                              03
                                                                                     X
           04                                                              04, HB
                             ACK 1-2, SACK 3                                         04
           05                                                              05
                                                                                03   05
           06                                                              06
                                                                                     06
           07                                                              07
                                                                                     07
           08                                                              08, HB
                             ACK 1-8                                                 08




                                             Packets 04 and 05 are received and
                                             cached waiting for the repair of 03.

                                             No bandwidth is wasted.

© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                   71
RTI DDS NACK-only reliability
     eliminates ACK traffic if there no packet loss


           01                                                                    01
                                                                                          01
           02                                                                    02
                                                                                          02
           03                                                                    03
                                                                                          03
           04                                                                    04, HB
                                                                                          04
           05                                                                    05
                                                                                          05
           06                                                                    06
                                                                                          06
           07                                                                    07
                                                                                          07
           08                                                                    08, HB
                                                                                          08



                                                   No ACK traffic under normal
                                                   operating conditions




© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                        72
RTI DDS NACK-only reliability
     greatly reduces traffic even with packet loss

           01                                                                  01
                                                                                         01
           02                                                                  02
                                                                                         02
           03                                                                  03
                                                                                         X
           04                                                                  04, HB
                             NACK 3                                                      04
           05                                                                  05
                                                                                    03   05
           06                                                                  06
                                                                                         06
           07                                                                  07
                                                                                         07
           08                                                                  08, HB
                                                                                         08


                                                   Negative Acknowledgments sent
                                                   only when some message is lost



           This approach is far more scalable
            when there are many subscribers
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                       73
Asynchronous Publishing & Flow COntroller

  synchronous send path:




  asynchronous send path:

            Return To User
                                                                1. rapid write() return



          User Thread             write()          Data Queue



                                                         3. coalesce data samples
 2. network traffic shaping

                       Flow                 Flow        Publishing Thread        Net I/O   Wire Data Out
                     Controller
Qos Policies


  DDS_PublishModeQosPolicy
   – kind
       • DDS_SYNCHRONOUS_PUBLISH_MODE_QOS
       • DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS
   – flow controller name

  DDS_AsynchronousPublisherQosPolicy
   –   disable_asynchronous_write <FALSE>
   –   thread
   –   disable_asynchronous_batch <FALSE>
   –   asynchronous_batch_thread
AP in Participant’s World

                                                                       Participant




                                                                      Publishing Thread D


                                                              Publisher D




          Publishing Thread A           Publishing Thread B           Publishing Thread C


  Publisher A                   Publisher B                   Publisher C
Flow Controller Token Distribution

  basic token bucket
   – steady-state traffic
       • tokens_added_per_period
       • token_period
   – max burst control
       • max_tokens
   – Additional controls
       • tokens_leaked_per_period
       • all values can be DDS_LENGTH_UNLIMITED
   – piggyback discount (Token Exchange Rate)
       • bytes_per_token

  scheduling policy
   – round-robin (RR)
   – earliest-deadline-first (EDF)
       • deadline = time of write + DDS_DataWriterQos::latency_budget
Using Asynchronous Publishing
  DataWriter-side:
 DDS_FlowControllerProperty_t property;

 property.sched_policy = DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY;
 property.token_bucket.max_tokens                = A; //[0,    DDS_LENGTH_UNLIMITED]
 property.token_bucket.tokens_added_per_period   = B; //[0,    DDS_LENGTH_UNLIMITED]
 property.token_bucket.tokens_leaked_per_period = C; //[0,     DDS_LENGTH_UNLIMITED]
 property.token_bucket.bytes_per_token           = D; //[1024, DDS_LENGTH_UNLIMITED]
 property.token_bucket.period                    = E; //[0,    DDS_DURATION_INFINITE]

 ...

 DDSFlowController *controller =
       participant->create_flowcontroller("superflow", property);
 ...
 writer_qos.publish_mode.kind = DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS;
 writer_qos.publish_mode.flow_controller_name = "superflow";
 //
 // Set up History queue size to hold deferred issues!!!!!.
 writer_qos.history.kind   = DDS_KEEP_LAST_HISTORY_QOS;
 writer_qos.history.depth = z;   // <<<<<<<<<<<<<!!!!!!!!!!!!!!<<<<<

 ...

 writer->write(data_sample, ...);
 ... // Optional wait for pipe to empty
 writer->wait_for_asynchronous_publishing(timeout);
 ... // Optional On-Demand trigger
 controller->trigger_flow();
 ... // Optional Modify controller properties
 controller->set_property();


  No changes on DataReader-side!!
Flow Controller Design Challenge

   Requirements;
    –   Large 1 mbyte issue.
    –   Transmit over period of 10 seconds
    –   Low priority transmission
    –   Transport buffer size set to 32K




   CONTROLLER:


   property.sched_policy = ??;
   property.token_bucket.max_tokens = ??
   property.token_bucket.tokens_added_per_period   = ??
   property.token_bucket.tokens_leaked_per_period = ??;
   property.token_bucket.bytes_per_token           = ??;
   property.token_bucket.period                    = ??
Flow Controller Design Challenge

   Requirements;
    –   Large 1 mbyte issue.
    –   Transmit over period of 10 seconds
    –   Low priority transmission
    –   Transport buffer size set to 32K
    –   Cannot loose any issues


   CONTROLLER:


   property.sched_policy = DDS_RR_FLOW_CONTROLLER_POLICY;
   property.token_bucket.max_tokens                = 1
   property.token_bucket.tokens_added_per_period   = 1
   property.token_bucket.tokens_leaked_per_period = unlimited;
   property.token_bucket.bytes_per_token           = 32k;
   property.token_bucket.period                    = 200ms


   Extra Credit Discussion:
    What about reliable protocol properties?
Outline

  Overview of Technology
  Application development cycle
  Architecting data-centric systems & modeling the Data
  Protocol, Performance & Scalability.
  Integrating external and legacy systems.
   –   Routing Service
   –   Systems of Systems
   –   Cross Domain Solutions
   –   Accessing Data over a WAN
   –   Database Connectivity
   –   Access over the Web


  Future directions and Standards:
Real-Time Recording Service

             Applications:                                Record high-rate data
               – Future analysis and                      arriving in real-time
                 debugging
                                                          Non-intrusive – multicast
               – Post-mortem
                                                          reception
               – Compliance checking
               – Replay for testing and
                 simulation purposes

Demo:
1. Start RecordingService
2. Start ShapesDemo
3. See output files
4. Convert to: HTML XML
5. View Data: HTML XML

  sqlite                    stop_all
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                               82
Relational Database Integration

Publish-Subscribe Action                                                    Relational Actions
Write()           ShapesDemo                                             UPDATE [2,3] & INSERT
Read() & Take()                                                          SELECT
Dispose()                                                                DELETE
Wait() & Listener

                                                                           sql_gui          sql_shell

                   Topic T1                                                      Table T1
                                                                RTI                  I1
                                                             Real-Time
                 I1 I2 I3                                     Connect                I2
                                                                                     I3
                                                           2. start RTC              1. start mysql
 stop_all
Event driven – The fastest way to observe database changes!
 © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                          83
COTS tools: Excel – Interacting with your data




               Display live RTI DDS Data in Excel
               Perform real-time computations and charts
               Publish RTI DDS data from Excel


 ShapesDemo   blank                   saved demo
RTI Routing Service
  Selective, real-time data forwarding and transformation
  Can Change Topic Name and Topic Schema
   – Allows for custom transformations via “plugin”
   – Can filter/guard data
  QoS managed, can cache last-known
  value for data
  Dynamically configured
  Location independent deployment

                                    start
                    Topic A                    Topic B
                                DDS Router



ShapesDemo_0                                             ShapesDemo_1
                              XFORM GUARD
                stop_all
Global Scalability: LAN to WAN…
…without sacrificing Performance and Security




                  Site A                      DDS                        DDS
                                             Router                     Router
                                                                                             Site C
                                      Topics:                             Topics:
                                      Site Status                         Site Status
                                      Alarms                 WAN /        Proc Sensor Data
                                      Health Logs                         Result Data
                                                            Internet
                                      Sensor Data                         Alarms
                                      Proc Sensor Data    TCP/TLS/SSL




                  Site B                      DDS                        DDS                 Site D
                                             Router                     Router
                                         Topics:                        Topics:
                                         Site Status                    Site Status
                                         Sensor Data                    Result Data
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL                                               86
Web Accessibility

     Direct access to real-time data from Web-Based Applications


                                             simulated
                                             tracks


                                           Tactical
                                          Real-Time
                                             Data

                                                Web
                                                  Web
                                               Enabled
                                                   Web
                                                Enabled
                              Recorded          DDS
                                                 Enabled
                                Data              DDS
                                                   DDS
                          DDS
                        Recording        2. start
                         Service
     1. start replay
         & router       Recorded
                         Recorded
                       Track Files
                                                            view maps
                         Data Files                 GUARD

87
      stop_all
Outline

  Overview of Technology
  Application development cycle
  Architecting data-centric systems & modeling the Data
  Protocol, Performance & Scalability.
  Integrating external and legacy systems.
  Future directions and Standards:
   – Extensible Topics for DDS
   – Web Enabled DDS
   – Standard C++ PSM for DDS
  Q&A
Extensible Dynamic Types Submission

class Ov erv iew

                                                           +type
                                TypeModel::Type                                Data
                                                                       *
                                                       1



                                 1        1                                     1        1
                        +type




                   *

     TypeRepresentation::         LanguageBinding::                 LanguageBinding::        DataRepresentation::
     TypeRepresentation          TypeLanguageBinding               DataLanguageBinding       DataRepresentation
Example: Current mechanisms

 Type
Definition
IDL:
Foo.idl

struct Foo {             Language
   string<> name;         Binding
   long ssn;
};               IDL to Language Mapping:
               Foo.h
               Foo.cpp                          Data
               FooTypeSupport.cpp           Representation
               struct Foo {                 IDL to CDR:
                 char *name;
                 int ssn;                   00000006
               };                           68656C6C
                                            6F000000
               Foo f = {“hello”, 2”};       00000002
Type-Definition – Language Representation – Serialized
    encapsulation ... Each offers options

Type Representation                                       Type Representation
   “Foo” schema                                              “Foo” schema
    IDL, XSD, …                                               IDL, XSD, …
                 ddsgen
                                   DDS API


                    DDS-API                    DDS-API
    Foo.h,                                                        Foo.h,
                DataWriter<Foo>            DataReader<Foo>
   Foo.java                                                      Foo.java

  Language                                                       Language
   Bindings                       ddsgen                          Bindings

              Data Representation          Data Representation
                  10110011…                    10110011…

                      CDR, TLV,                CDR, TLV,
                      JSON, XML                JSON, XML

                                  DDS-RTPS
                                  Wire Interoperability
Web-Enabled Data-Centric Global Data Space

      App                                            App
      Web                                            DDS
      HTTP                            App            RTPS



       Stateless access of data via        Global Data
       application appropriate
       technologies and protocols
                                               Space
                                        Global Data Space
       Not a bridge, broker, or
       message router
                                  App               App
92
Web Enabled DDS

        App       Std. Web
                                Web Enabled DDS           App
                  protocols
        Web                     Web      DDS              DDS
        HTTP                    HTTP     RTPS             RTPS



              <<conceptually>>

                                          Global Data Space

     A service that exposes DDS Global Data over Web Protocols:
       Applications can interact with DDS directly over the Web
      No need for bridges or special bindings for scripting languages
93
Day 2: Exercises

                                    Gerardo Pardo-Castellote, Ph.D.
                                    Co-chair OMG DDS SIG
                                    CTO, Real-Time Innovations
                                    gerardo.pardo@rti.com
The Real-Time
Middleware Experts   http://www.rti.com
Preparations


  Install RTI DDS:
   – Windows
      • Unzip: RTI_Masterclass2GO.zip
          – into directory C:RTI
      • Execute: install_actions.bat
   – Linux
      • Boot your computer from the USB



  Test you can do the following
   – rtiddsgen -help
Install VisualStudio from the ISO’s


  Copy the VS2008 and WindowsSDK ISO’s
  Install DaemonTools
  Mount the ISOs as virtual drives
  Proceed with the installation
   – 1st the VS2008
   – 2nd the Platform SDK


  Test the installation by creating a “hello world”
  project compiling and running it
Exercise #0 - Hello World


Define you data type:
  Create a directory “HelloWorld”
  Create a file called hello.idl and open it in
  VisualStudio
  Add the following contents:

   const long MSG_LEN=256;
   struct HelloMsg {
      string<MSG_LEN> user; //@key
      string<MSG_LEN> msg;
   };
Run rtiddsgen (for C++)


  rtiddsgen hello.idl -language C++ -example i86Win32VS2005 
                       -replace -ppDisable
  rtiddsgen hello.idl -language Java -example i86Win32jdk 
                       -replace -ppDisable



  Look at the directory you should see:
   –   hello-vs2005.sln
   –   And Several other files…

  Open the Solution File (type hello-vs2005.sln on the console)
   –   Look at HelloMsgPublisher.cxx
   –   Look at HelloMsgSubscriber.cxx
  Build the Solution
Run rtiddsgen (for Java)



  rtiddsgen hello.idl -language Java -example i86Win32jdk 
                      -replace -ppDisable


  Look at the directory you should see:
   – makefile_hello_i86Win32jdk
   – And Several other files…
       • Look at HelloMsgPublisher.java
       • Look at HelloMsgSubscriber.java


  You can use the makefile to build and the Java programs:
   – gmake –f makefile_hello_i86Win32jdk
Execute the program

  C++:
  – On one window run:
         • objsi86Win32VS2005HelloMsgPublisher.exe
  – On another window run:
         • objsi86Win32VS2005HelloMsgSubscriber.exe

  Java
  – On one window run:
         • gmake –f makefile_hello_i86Win32jdk HelloMsgPublisher
  – On another window run:
         • gmake –f makefile_hello_i86Win32jdk HelloMsgSubscriber



  You should see the subscribers getting an empty string…
Modify the program to produce something


  C++: Open HelloMsgPublisher.cxx in VisualStudio
  Java: Open HelloMsgPublisher.java in your preferred tool


  Look for the comment:
   /* Modify the data to be sent here */


  Add the line:
  strcpy_s(instance->msg, MSG_LEN,
              "Hello this is gerardo");
 Use your own name instead of “gerardo”


  Kill the Publisher, Rebuild the publisher and run it again
Playing with rtiddsspy


  Run rtiddsspy while the other applications are
  running


  Start and stop applications. What do you see in
  rtiddsspy
Exercise #1 – Shapes Publisher

  Create a new directory Shapes
  In the Directory create a file called ShapeType.idl
  Edit the file to have the following content:

   const long COLOR_LEN=64;
   struct ShapeType {
       string<COLOR_LEN>color; //@key
      long x;
      long y;
      long shapesize;
   };
  Run:
  rtiddsgen ShapeType.idl -language C++ -example
  i86Win32VS2005 –replace -ppNotRun
Exercise #2 – Using keys
  Create a new directory Chat
  In the Directory create a file called chat.idl
  Edit the file to have the following content:

   const long NAME_LEN=64;
   const long MSG_LEN=256;
   struct ChatMsg {
       string<NAME_LEN>name; //@key
       long age;
       string<MSG_LEN> chatRoom;
       string<MSG_LEN> msg;
   };
  Run:
  rtiddsgen chat.idl -language C++ -example i86Win32VS2005 –
  replace -ppNotRun
Edit the chat_publisher.cxx

  Go to the line with comment: /* Main loop */
   – Add the line:
   strcpy_s(instance->name,
               NAME_LEN, "Gerardo Pardo");

   (Use your own name)

  Go to the line with comment:
   – /* Modify the data to be sent here */
   – Add the lines:
   instance->age = count;
   strcpy_s(instance->msg,
                  NAME_LEN, “Como va todo?");
   (Use your age and personalized message)

  Rebuild and execute
Exercise #3 Use Qos


  Set RELIABILITY
  Set HISTORY to KEEP_LAST or KEEP_ALL
   – Test different depths

  Use Partitions
   – Create several Partitions:
       • E.g. by ChatRoomName
   – Publish in your ChatRoom
   – Subscribe to one or more ChatRooms
Exercise #4 Use content filters


  Edit the chat_subscriber.cxx
  Add the lines:
DDSContentFilteredTopic *cftopic;
DDS_StringSeq filter_params;
filter_params.maximum(0);
cfTopic = participant->
          create_contentfilteredtopic(
          "Selected Chats", topic,
          "age > 4", filter_params);

  Look of the call to create_datareader
   – Replace “topic” with “cfTopic” in the paramater list.
Exercise #5 Use Exclusive Ownership
  Set up in pairs edit the chat_publisher.cxx and use the same “name” for both
  of you
  Re-run the publisher application you will see mixed messages.


  Edit the chat_publisher.cxx
  Before creating the data writer add the lines
       publisher->get_default_datawriter_qos(dwq);
       dwq.ownership.kind = DDS_EXCLUSIVE_OWNERSHIP_QOS;
       dwq.ownership_strength.value = 10;


  Replace DDS_DATAWRITER_QOS_DEFAULT with dwq In the
  create_datawriter() call


  Edit the chat_subscriber.cxx
  Before creating the data reader add the lines
    DDS_DataReaderQos drq;
    subscriber->get_default_datareader_qos(drq);
    drq.ownership = DDS_EXCLUSIVE_OWNERSHIP_QOS;
  Replace DDS_DATAWRITER_QOS_DEFAULT with drq in the
  create_datareader() call
Summary




 Reduces software lifecycle    Most widely proven and
 costs                         mature implementation
  – Loose coupling
                               Highest performance
  – Replaces need for custom
    middleware in              Industry-leading expertise
    high-performance,          and services capability
    real-time applications
                               Free trial, research and
 Reduces risk                  IR&D licenses
  – Standards-compliant API
    and wire protocol          Comprehensive VxWorks
  – Multiple implementations   support
  – Widely adopted

Mais conteúdo relacionado

Mais procurados

Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2
Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2
Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2Jaime Martin Losa
 
OMG DDS: The Data Distribution Service for Real-Time Systems
OMG DDS: The Data Distribution Service for Real-Time SystemsOMG DDS: The Data Distribution Service for Real-Time Systems
OMG DDS: The Data Distribution Service for Real-Time SystemsAngelo Corsaro
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution ServiceAngelo Corsaro
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Sumant Tambe
 
The DDS Tutorial - Part I
The DDS Tutorial - Part IThe DDS Tutorial - Part I
The DDS Tutorial - Part IAngelo Corsaro
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part IAngelo Corsaro
 
RTI DDS Intro with DDS Secure
RTI DDS Intro with DDS SecureRTI DDS Intro with DDS Secure
RTI DDS Intro with DDS SecureJohn Breitenbach
 
DDS Tutorial -- Part I
DDS Tutorial -- Part IDDS Tutorial -- Part I
DDS Tutorial -- Part IAngelo Corsaro
 
Getting Started in DDS with C++ and Java
Getting Started in DDS with C++ and JavaGetting Started in DDS with C++ and Java
Getting Started in DDS with C++ and JavaAngelo Corsaro
 
Micro services Architecture with Vortex -- Part I
Micro services Architecture with Vortex -- Part IMicro services Architecture with Vortex -- Part I
Micro services Architecture with Vortex -- Part IAngelo Corsaro
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution ServiceAngelo Corsaro
 
The Data Distribution Service Tutorial
The Data Distribution Service TutorialThe Data Distribution Service Tutorial
The Data Distribution Service TutorialAngelo Corsaro
 
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...IncQuery Labs
 
10 Reasons for Choosing OpenSplice DDS
10 Reasons for Choosing OpenSplice DDS10 Reasons for Choosing OpenSplice DDS
10 Reasons for Choosing OpenSplice DDSAngelo Corsaro
 
Private LTE Presentation Pitch
Private LTE Presentation PitchPrivate LTE Presentation Pitch
Private LTE Presentation Pitchadolfoams2000
 
OpenSplice DDS Tutorial -- Part II
OpenSplice DDS Tutorial -- Part IIOpenSplice DDS Tutorial -- Part II
OpenSplice DDS Tutorial -- Part IIAngelo Corsaro
 

Mais procurados (20)

Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2
Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2
Fast RTPS: Programming with the Default Middleware for Robotics Adopted in ROS2
 
OMG DDS: The Data Distribution Service for Real-Time Systems
OMG DDS: The Data Distribution Service for Real-Time SystemsOMG DDS: The Data Distribution Service for Real-Time Systems
OMG DDS: The Data Distribution Service for Real-Time Systems
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution Service
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++
 
DDS QoS Unleashed
DDS QoS UnleashedDDS QoS Unleashed
DDS QoS Unleashed
 
The DDS Tutorial - Part I
The DDS Tutorial - Part IThe DDS Tutorial - Part I
The DDS Tutorial - Part I
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part I
 
RTI DDS Intro with DDS Secure
RTI DDS Intro with DDS SecureRTI DDS Intro with DDS Secure
RTI DDS Intro with DDS Secure
 
DDS Tutorial -- Part I
DDS Tutorial -- Part IDDS Tutorial -- Part I
DDS Tutorial -- Part I
 
Getting Started in DDS with C++ and Java
Getting Started in DDS with C++ and JavaGetting Started in DDS with C++ and Java
Getting Started in DDS with C++ and Java
 
Micro services Architecture with Vortex -- Part I
Micro services Architecture with Vortex -- Part IMicro services Architecture with Vortex -- Part I
Micro services Architecture with Vortex -- Part I
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution Service
 
The Data Distribution Service Tutorial
The Data Distribution Service TutorialThe Data Distribution Service Tutorial
The Data Distribution Service Tutorial
 
DDS Over Low Bandwidth Data Links
DDS Over Low Bandwidth Data LinksDDS Over Low Bandwidth Data Links
DDS Over Low Bandwidth Data Links
 
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
 
Introduction to RTI DDS
Introduction to RTI DDSIntroduction to RTI DDS
Introduction to RTI DDS
 
10 Reasons for Choosing OpenSplice DDS
10 Reasons for Choosing OpenSplice DDS10 Reasons for Choosing OpenSplice DDS
10 Reasons for Choosing OpenSplice DDS
 
Private LTE Presentation Pitch
Private LTE Presentation PitchPrivate LTE Presentation Pitch
Private LTE Presentation Pitch
 
RPC Over DDS
RPC Over DDSRPC Over DDS
RPC Over DDS
 
OpenSplice DDS Tutorial -- Part II
OpenSplice DDS Tutorial -- Part IIOpenSplice DDS Tutorial -- Part II
OpenSplice DDS Tutorial -- Part II
 

Semelhante a RTI Data-Distribution Service (DDS) Master Class - 2010

OMG DDS and its Relation to Unmanned Vehicle Interoperability
OMG DDS and its Relation to Unmanned Vehicle InteroperabilityOMG DDS and its Relation to Unmanned Vehicle Interoperability
OMG DDS and its Relation to Unmanned Vehicle InteroperabilityGerardo Pardo-Castellote
 
OMG DDS: The data centric future beyond message-based integration
OMG DDS: The data centric future beyond message-based integrationOMG DDS: The data centric future beyond message-based integration
OMG DDS: The data centric future beyond message-based integrationGerardo Pardo-Castellote
 
Integration Platform For JMPS Using DDS
Integration Platform For JMPS Using DDSIntegration Platform For JMPS Using DDS
Integration Platform For JMPS Using DDSSupreet Oberoi
 
Gef 2012 InduSoft Presentation
Gef 2012  InduSoft PresentationGef 2012  InduSoft Presentation
Gef 2012 InduSoft PresentationAVEVA
 
Pandora FMS - Technical presentation
Pandora FMS - Technical presentationPandora FMS - Technical presentation
Pandora FMS - Technical presentationSancho Lerena
 
Easing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDSEasing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDSRick Warren
 
Presentation f5 – beyond load balancer
Presentation   f5 – beyond load balancerPresentation   f5 – beyond load balancer
Presentation f5 – beyond load balancerxKinAnx
 
NGSoft General Overview
NGSoft General OverviewNGSoft General Overview
NGSoft General OverviewMichael Starr
 
InduSoft Web Studio and DCS Conversion and Integration Webinar
InduSoft Web Studio and DCS Conversion and Integration WebinarInduSoft Web Studio and DCS Conversion and Integration Webinar
InduSoft Web Studio and DCS Conversion and Integration WebinarAVEVA
 
Presentation opcma eng
Presentation opcma engPresentation opcma eng
Presentation opcma englasram
 
Introduction to OMG DDS (1 hour, 45 slides)
Introduction to OMG DDS (1 hour, 45 slides)Introduction to OMG DDS (1 hour, 45 slides)
Introduction to OMG DDS (1 hour, 45 slides)Gerardo Pardo-Castellote
 
Cloud Tools for Connected Communities
Cloud Tools for Connected CommunitiesCloud Tools for Connected Communities
Cloud Tools for Connected CommunitiesPeter Coffee
 
Andy huckridge
Andy huckridgeAndy huckridge
Andy huckridgeCarl Ford
 
InduSoft Remote Production Monitoring Webinar
InduSoft Remote Production Monitoring WebinarInduSoft Remote Production Monitoring Webinar
InduSoft Remote Production Monitoring WebinarAVEVA
 
OMG DDS Tutorial - Part I
OMG DDS Tutorial - Part IOMG DDS Tutorial - Part I
OMG DDS Tutorial - Part IAngelo Corsaro
 
EclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems Toolbox
EclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems ToolboxEclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems Toolbox
EclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems ToolboxBrett Hackleman
 

Semelhante a RTI Data-Distribution Service (DDS) Master Class - 2010 (20)

OMG DDS and its Relation to Unmanned Vehicle Interoperability
OMG DDS and its Relation to Unmanned Vehicle InteroperabilityOMG DDS and its Relation to Unmanned Vehicle Interoperability
OMG DDS and its Relation to Unmanned Vehicle Interoperability
 
OMG DDS: The data centric future beyond message-based integration
OMG DDS: The data centric future beyond message-based integrationOMG DDS: The data centric future beyond message-based integration
OMG DDS: The data centric future beyond message-based integration
 
Integration Platform For JMPS Using DDS
Integration Platform For JMPS Using DDSIntegration Platform For JMPS Using DDS
Integration Platform For JMPS Using DDS
 
Gef 2012 InduSoft Presentation
Gef 2012  InduSoft PresentationGef 2012  InduSoft Presentation
Gef 2012 InduSoft Presentation
 
Business Models for Interoperability
Business Models for InteroperabilityBusiness Models for Interoperability
Business Models for Interoperability
 
Pandora FMS - Technical presentation
Pandora FMS - Technical presentationPandora FMS - Technical presentation
Pandora FMS - Technical presentation
 
Easing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDSEasing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDS
 
F5 beyond load balancer (nov 2009)
F5 beyond load balancer (nov 2009)F5 beyond load balancer (nov 2009)
F5 beyond load balancer (nov 2009)
 
Presentation f5 – beyond load balancer
Presentation   f5 – beyond load balancerPresentation   f5 – beyond load balancer
Presentation f5 – beyond load balancer
 
NGSoft General Overview
NGSoft General OverviewNGSoft General Overview
NGSoft General Overview
 
InduSoft Web Studio and DCS Conversion and Integration Webinar
InduSoft Web Studio and DCS Conversion and Integration WebinarInduSoft Web Studio and DCS Conversion and Integration Webinar
InduSoft Web Studio and DCS Conversion and Integration Webinar
 
Presentation opcma eng
Presentation opcma engPresentation opcma eng
Presentation opcma eng
 
Introduction to OMG DDS (1 hour, 45 slides)
Introduction to OMG DDS (1 hour, 45 slides)Introduction to OMG DDS (1 hour, 45 slides)
Introduction to OMG DDS (1 hour, 45 slides)
 
The Promise of Interoperability
The Promise of InteroperabilityThe Promise of Interoperability
The Promise of Interoperability
 
Cloud Tools for Connected Communities
Cloud Tools for Connected CommunitiesCloud Tools for Connected Communities
Cloud Tools for Connected Communities
 
The SDN Opportunity
The SDN OpportunityThe SDN Opportunity
The SDN Opportunity
 
Andy huckridge
Andy huckridgeAndy huckridge
Andy huckridge
 
InduSoft Remote Production Monitoring Webinar
InduSoft Remote Production Monitoring WebinarInduSoft Remote Production Monitoring Webinar
InduSoft Remote Production Monitoring Webinar
 
OMG DDS Tutorial - Part I
OMG DDS Tutorial - Part IOMG DDS Tutorial - Part I
OMG DDS Tutorial - Part I
 
EclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems Toolbox
EclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems ToolboxEclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems Toolbox
EclipseEmbeddedDay2009-OSGi: Best Tool In Your Embedded Systems Toolbox
 

Mais de Gerardo Pardo-Castellote

DDS, the US Navy, and the Need for Distributed Software
DDS, the US Navy,  and the Need for Distributed SoftwareDDS, the US Navy,  and the Need for Distributed Software
DDS, the US Navy, and the Need for Distributed SoftwareGerardo Pardo-Castellote
 
Introduction to DDS: Context, Information Model, Security, and Applications.
Introduction to DDS: Context, Information Model, Security, and Applications.Introduction to DDS: Context, Information Model, Security, and Applications.
Introduction to DDS: Context, Information Model, Security, and Applications.Gerardo Pardo-Castellote
 
A Converged Approach to Standards for Industrial Automation
A Converged Approach to Standards for Industrial AutomationA Converged Approach to Standards for Industrial Automation
A Converged Approach to Standards for Industrial AutomationGerardo Pardo-Castellote
 
DDS-Security Interoperability Demo - March 2018
DDS-Security Interoperability Demo - March 2018DDS-Security Interoperability Demo - March 2018
DDS-Security Interoperability Demo - March 2018Gerardo Pardo-Castellote
 
Deep Dive into the OPC UA / DDS Gateway Specification
Deep Dive into the OPC UA / DDS Gateway SpecificationDeep Dive into the OPC UA / DDS Gateway Specification
Deep Dive into the OPC UA / DDS Gateway SpecificationGerardo Pardo-Castellote
 
DDS for eXtremely Resource Constrained Environments 1.0 Beta
DDS for eXtremely Resource Constrained Environments 1.0 BetaDDS for eXtremely Resource Constrained Environments 1.0 Beta
DDS for eXtremely Resource Constrained Environments 1.0 BetaGerardo Pardo-Castellote
 
DDS-Security Interoperability Demo - December 2017
DDS-Security Interoperability Demo - December 2017DDS-Security Interoperability Demo - December 2017
DDS-Security Interoperability Demo - December 2017Gerardo Pardo-Castellote
 
DDS-Security Interoperability Demo - September 2017
DDS-Security Interoperability Demo - September 2017DDS-Security Interoperability Demo - September 2017
DDS-Security Interoperability Demo - September 2017Gerardo Pardo-Castellote
 
Extensible Types for DDS (DDS-XTYPES) version 1.2
Extensible Types for DDS (DDS-XTYPES) version 1.2Extensible Types for DDS (DDS-XTYPES) version 1.2
Extensible Types for DDS (DDS-XTYPES) version 1.2Gerardo Pardo-Castellote
 
Interface Definition Language (IDL) version 4.2
Interface Definition Language (IDL) version 4.2 Interface Definition Language (IDL) version 4.2
Interface Definition Language (IDL) version 4.2 Gerardo Pardo-Castellote
 
DDS for eXtremely Resource Constrained Environments
DDS for eXtremely Resource Constrained EnvironmentsDDS for eXtremely Resource Constrained Environments
DDS for eXtremely Resource Constrained EnvironmentsGerardo Pardo-Castellote
 
DDS-XRCE - Revised Submission Presentation (September 2017)
DDS-XRCE - Revised Submission Presentation (September 2017)DDS-XRCE - Revised Submission Presentation (September 2017)
DDS-XRCE - Revised Submission Presentation (September 2017)Gerardo Pardo-Castellote
 
DDS-XRCE (Extremely Resource Constrained Environments)
DDS-XRCE (Extremely Resource Constrained Environments)DDS-XRCE (Extremely Resource Constrained Environments)
DDS-XRCE (Extremely Resource Constrained Environments)Gerardo Pardo-Castellote
 
DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)
DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)
DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)Gerardo Pardo-Castellote
 

Mais de Gerardo Pardo-Castellote (20)

DDS, the US Navy, and the Need for Distributed Software
DDS, the US Navy,  and the Need for Distributed SoftwareDDS, the US Navy,  and the Need for Distributed Software
DDS, the US Navy, and the Need for Distributed Software
 
Introduction to DDS: Context, Information Model, Security, and Applications.
Introduction to DDS: Context, Information Model, Security, and Applications.Introduction to DDS: Context, Information Model, Security, and Applications.
Introduction to DDS: Context, Information Model, Security, and Applications.
 
DDS-TSN OMG Request for Proposals (RFP)
DDS-TSN OMG Request for Proposals (RFP)DDS-TSN OMG Request for Proposals (RFP)
DDS-TSN OMG Request for Proposals (RFP)
 
A Converged Approach to Standards for Industrial Automation
A Converged Approach to Standards for Industrial AutomationA Converged Approach to Standards for Industrial Automation
A Converged Approach to Standards for Industrial Automation
 
Overview of the DDS-XRCE specification
Overview of the DDS-XRCE specificationOverview of the DDS-XRCE specification
Overview of the DDS-XRCE specification
 
DDS-Security Interoperability Demo - March 2018
DDS-Security Interoperability Demo - March 2018DDS-Security Interoperability Demo - March 2018
DDS-Security Interoperability Demo - March 2018
 
Deep Dive into the OPC UA / DDS Gateway Specification
Deep Dive into the OPC UA / DDS Gateway SpecificationDeep Dive into the OPC UA / DDS Gateway Specification
Deep Dive into the OPC UA / DDS Gateway Specification
 
OPC UA/DDS Gateway version 1.0 Beta
OPC UA/DDS Gateway version 1.0 BetaOPC UA/DDS Gateway version 1.0 Beta
OPC UA/DDS Gateway version 1.0 Beta
 
DDS for eXtremely Resource Constrained Environments 1.0 Beta
DDS for eXtremely Resource Constrained Environments 1.0 BetaDDS for eXtremely Resource Constrained Environments 1.0 Beta
DDS for eXtremely Resource Constrained Environments 1.0 Beta
 
DDS-Security Interoperability Demo - December 2017
DDS-Security Interoperability Demo - December 2017DDS-Security Interoperability Demo - December 2017
DDS-Security Interoperability Demo - December 2017
 
DDS-Security Interoperability Demo - September 2017
DDS-Security Interoperability Demo - September 2017DDS-Security Interoperability Demo - September 2017
DDS-Security Interoperability Demo - September 2017
 
Extensible Types for DDS (DDS-XTYPES) version 1.2
Extensible Types for DDS (DDS-XTYPES) version 1.2Extensible Types for DDS (DDS-XTYPES) version 1.2
Extensible Types for DDS (DDS-XTYPES) version 1.2
 
DDS-Security version 1.1
DDS-Security version 1.1DDS-Security version 1.1
DDS-Security version 1.1
 
Interface Definition Language (IDL) version 4.2
Interface Definition Language (IDL) version 4.2 Interface Definition Language (IDL) version 4.2
Interface Definition Language (IDL) version 4.2
 
DDS Security Specification version 1.0
DDS Security Specification version 1.0DDS Security Specification version 1.0
DDS Security Specification version 1.0
 
DDS for eXtremely Resource Constrained Environments
DDS for eXtremely Resource Constrained EnvironmentsDDS for eXtremely Resource Constrained Environments
DDS for eXtremely Resource Constrained Environments
 
DDS-XRCE - Revised Submission Presentation (September 2017)
DDS-XRCE - Revised Submission Presentation (September 2017)DDS-XRCE - Revised Submission Presentation (September 2017)
DDS-XRCE - Revised Submission Presentation (September 2017)
 
DDS-XRCE (Extremely Resource Constrained Environments)
DDS-XRCE (Extremely Resource Constrained Environments)DDS-XRCE (Extremely Resource Constrained Environments)
DDS-XRCE (Extremely Resource Constrained Environments)
 
DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)
DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)
DDS - The Proven Data Connectivity Standard for the Industrial IoT (IIoT)
 
Industrial IOT Data Connectivity Standard
Industrial IOT Data Connectivity StandardIndustrial IOT Data Connectivity Standard
Industrial IOT Data Connectivity Standard
 

Último

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

RTI Data-Distribution Service (DDS) Master Class - 2010

  • 1. DDS: A Next-Generation Approach to Building Distributed Real-Time Systems Gerardo Pardo-Castellote, Ph.D. Co-chair OMG DDS SIG CTO, Real-Time Innovations gerardo.pardo@rti.com The Real-Time 2010 Quickstart Middleware Experts http://www.rti.com
  • 2. Outline Overview of Technology – Background – Applications – Data-Centric Pub-Sub – Quality of Service – Add-on components Application development cycle Architecting data-centric systems & modeling the Data Protocol, Performance & Scalability. Integrating external and legacy systems. Future directions and Standards:
  • 3. Challenge: More Data, More Speed, More Sources TRENDS: Growing Information Volume Lowering Decision Latency Increasing System Availability Accelerating technology insertion and deployment Next-generation systems needs: Performance Scalability Robustness & Availability Platform Integration & Evolution Safety-Critical Certification Security © 2009 Real-Time Innovations, Inc. 3
  • 4. Solution: Standards-based Integration Infrastructure for Real-Time Applications Streaming Sensors Events Data Data Distribution Service Real-Time Enterprise Actuators Applications Applications © 2009 Real-Time Innovations, Inc. 4
  • 5. Architecture for the next-generation systems Existing technologies are reaching robustness/performance/scalability limits RTI DDS brings a fundamental new architecture and approach – Fully decentralized, peer-to-peer, “no bottlenecks” architecture – Superior Wire Protocol – Powerful data-centric model – Built-in Robustness and High-Availability – Standards-based, multi-platform Brokers as choke-points RTI Approach Single-lane traffic No prioritization
  • 6. History: DDS the Standards Data Distribution Service for Real-Time Systems – API for Data-Centric Publish-Subscribe distributed systems – Adopted in June 2003 – Revisions: 2004, 2005, 2006 – Spec version 1.2: formal/2007-07-01 Interoperability wire protocol – Adopted in July 2006 – Revised in July 2007 – Spec version 2.1: formal/2009-01-05 Related specifications – UML Profile for DDS – DDS for Light-Weight CCM – Extensible Topics for DDS(*) Multiple (7+) Implementations 6
  • 7. Open Architecture Cross-vendor portability Vendor independent – API for portability – Wire protocol for interoperability Multiple implementations DDS API – 7 of API – 4 support RTPS (+1 non-DDS) Middleware Heterogeneous – C, C++, Java, .NET (C#, C++/CLI) Real-Time – Linux, Windows, VxWorks, other Publish-Subscribe embedded & real-time Wire Protocol (RTPS) Loosely coupled Cross-vendor interoperability © 2009 Real-Time Innovations, Inc. 7
  • 8. RTI DDS Application Examples Aegis Weapon System ScanEagle UAV Lockheed Martin Boeing Radar, weapons, displays, Sensors, ground station C2 Advanced Cockpit Ground B-1B Bomber Control Station Boeing Predator and SkyWarrior UAS C2, communications, General Atomics weapons Telemetry data, multiple workstations Common Link Integration Processing (CLIP) Northrop Grumman RoboScout Standards-compliant Base10 interface to legacy and new tactical data links Internal data bus and link to communications center Air Force, Navy, B-1B and B-52 © 2009 Real-Time Innovations, Inc. 8
  • 9. RTI DDS Application Examples Driver safety Multi-ship simulator Volkswagen FORCE Technology vision systems, analysis, driver Controls, simulation display information systems Medical imaging Mobile asset tracking NMR and MRI Wi-Tronix Sensors, RF generators, user GPS, operational status interface, control computers over wireless links Automated trading Automated Trading Desk (ATD, Highway traffic monitoring now Citigroup) City of Tokyo Market data feed handlers, pricing engines, algorithmic Roadway sensors, roadside trading applications kiosks, control center © 2009 Real-Time Innovations, Inc. 9
  • 10. RTI DDS Application Examples Full-immersion simulation Signal Processing National Highway Transportation PLATH GMBH Safety Authority RTI supports modular Migrated from CORBA, DCOM programming across for performance product line Air-Traffic Management INDRA. Deployed in Large Telescopes UK, Germany, Spain European Southern Standards, Performance, Observatory Scalability Performance & Scalability 1000 mirrors, 1sec loop Radar Systems Industrial Control AWACS upgrade Schneider Electric Evolvability, Mainteinability, VxWorks-based PLCs and supportability communicate via RTI-DDS © 2009 Real-Time Innovations, Inc. 10
  • 11. Standards Focus Object Management Group – Board of Directors member – Authored DDS and RTPS specs, co-chair SIG Open Group Network Centric Operations Industry Consortium (NCOIC) – Chair Open Standards and Patterns Working Group STAC Benchmark Council Support and integrate with: – DDS, RTPS, JMS, SQL, Web Services, CORBA, UML, HLA, JAUS, Eclipse, IPv6… 11 © 2008 Real-Time Innovations, Inc.
  • 12. Corporate Background Founded by Stanford researchers Focused on real-time middleware Solid financials – 16-year track record of growth Real-Time Market Leader – #1 market share in embedded middleware of all types1 – 70+% worldwide share of DDS market2 50/50 software and services 1Embedded Market Forecasters 2VDC Analyst Report 12
  • 13. RTI Supports all Phases of Development Services Engagement Description Capabilities Timeline Workshop 2 days Introduction to RTI products and capabilities QuickStart 2+ days In-depth training on RTI DDS API, QoS policies, and common architecture patterns Support On-Demand Web-portal, phone and email customer lauded support Architecture Study 3-4 weeks Custom design review, risk analysis and architecture recommendations Design Support 4+ weeks Support hardware & software integration, architecture design, Package performance tuning, on-site debugging, implementation support Integration & SOW supported Custom feature, tool and software development support Development Ports As needed RTI tools and software on your special, purpose built hardware
  • 15. Benefits of the DDS approach Simple & Powerful Data-Centric Pub-Sub Model Reduces Risk and Development/Integration Time Enhances effective performance by delivering the right data to the right place with the right QoS Standards-based: API and Protocol 1. Unsurpassed Performance and Scalability Priority-aware no choke-points architecture 2. Builds higher quality systems and lowers TCO Built-in high-value capabilities Handles Availability & other Messaging Event Database “hard problems” & Caching Processing Bridge SQL Easy to maintain and Evolve Persistence Redundancy Recording & Durability & Failover Leverage multicore © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 15
  • 16. Data-Centric Pub-Sub Model Essentially a virtual, decentralized global data space Source (key) Latitude Longitude Altitude UAV1 37.4 -122.0 500.0 UAV2 40.7 -74.0 250.0 UAV3 50.2 -0.7 2000.0 Persistence Recording Service Service © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 16
  • 17. example Data-Centric Model “Global Data Space” generalizes Subject-Based Addressing – Data objects addressed by DomainId, Topic and Key – Domains provide a level of isolation – Topic groups homogeneous subjects (same data-type & meaning) – Key is a generalization of subject • Key can be any set of fields, not limited to a “x.y.z …” formatted string Data Reader Data Writer Topic (subject) Key Data Object Data Reader Data Writer Data Reader Data Writer
  • 18. ShapesDemo Demo: Publish-Subscribe © 2009 Real-Time Innovations, Inc. 18
  • 19. example DDS communications model Data Domain Data Domain New Writer Participant Reader Participant “Alarm” Got new “Alarm” subscriber! data Offered Requested Listener QoS Listener QoS Participants scope the global data space (domain) Topics define the data-objects (collections of subjects) Writers publish data on Topics Readers subscribe to data on Topics QoS Policies are used configure the system Listeners are used to notify the application of events
  • 20. ShapesDemo Demo: Real-Time Quality of Service Content filter Time-based filter History Deadline Analyzer © 2009 Real-Time Innovations, Inc. 20
  • 21. Real-Time Quality of Service (QoS) QoS Policy QoS Policy DURABILITY USER DATA User QoS HISTORY TOPIC DATA Volatility READER DATA LIFECYCLE GROUP DATA WRITER DATA LIFECYCLE PARTITION Presentation LIFESPAN PRESENTATION Infrastructure ENTITY FACTORY DESTINATION ORDER RESOURCE LIMITS OWNERSHIP Redundancy Transport RELIABILITY OWNERSHIP STRENGTH Delivery TIME BASED FILTER LIVELINESS DEADLINE LATENCY BUDGET CONTENT FILTERS TRANSPORT PRIORITY © 2009 Real-Time Innovations, Inc. 21
  • 22. 20X Faster than JMS / Broker-based solutions RTI DDS is about 20X faster than JMS 60,000 Throughput with a single publisher ( 2KB messages ) 50,000 Point-to-Point Updates per Second 45 40 RTI DDS 40,000 1-1 1-10 JMS [1000's sample/s] 35 30,000 1-24 30 25 20,000 20 10,000 15 10 0 16 32 64 128 256 512 1024 5 Message/Data Size (bytes - without batching) 0 2 4 6 9 11 18 CPU load [%] RTI DDS reliable multicast exhibits near perfect scalability Platform: Linux 2.6 on AMD Athlon, Dual core, 2.2 GHz © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 22
  • 23. DDS Is Scalable Going from 1 to 888 Ultra-low latency and jitter subscribers of the same – Deterministic – No intermediaries data has only a 10% impact on throughput http://www.rti.com/products/dds/benchmarks-cpp-linux.html © 2009 Real-Time Innovations, Inc. 23
  • 24. Realizing Performance & Scalability RTI DDS Approach Others: Broker-based middleware AMQP RTPS unspecified DDS operates peer-to-peer, without brokers DDS uses RTPS, an Advanced Multi-Session protocol supporting Reliable Multicast © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 24
  • 25. DDS Enables Higher quality, Lower TCO Systems Pre-built components address many challenging use-cases Presence Discovery Historical Cache Durable Data Availability Redundancy & Failover Recording Database Connectivity Web Accessibility Transformation Messaging Event Database & Caching Processing Bridge SQL Event Processing Redundancy WAN Routing Recording Persistence & Durability & Failover Security Guard Hooks © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 25
  • 26. Outline Overview of Technology Application development cycle – How to begin. Hello world example. – Defining data in XML and XSD – Development and Run-time Tools: Ping, Spy, Analyzer, Wireshark, Excel – Discovery and Builtin-Topics – Configuring QoS via XML files Architecting data-centric systems & modeling the Data Protocol, Performance & Scalability. Integrating external and legacy systems. Future directions and Standards:
  • 27. Hands-on Example (C++) Type Three minutes to a running app!! Definition 1. Define your data 2. Create your project MyType.idl 3. Build 4. Run: publisher subscriber MyType.sln rtiddsgen MyType.h MyTypePublisher.cpp Aux: MyTypeSupport.c File Browser MyTypeSubscriber.cpp Console compiler Delete Files rtiddsspy Publisher.exe Subscriber.exe
  • 28. Alternatives beyond IDL and CDR Type Representation Type Representation “Foo” schema “Foo” schema IDL, XSD, … IDL, XSD, … rtiddsgen DDS API DDS-API DDS-API Foo.h, Foo.h, DataWriter<Foo> DataReader<Foo> Foo.java Foo.java Language Language Bindings ddsgen Bindings Data Representation Data Representation 10110011… 10110011… CDR, TLV, CDR, TLV, JSON, XML JSON, XML DDS-RTPS Wire Interoperability
  • 29. Alternative Type Description Languages rtiddsgen supports 4 alternative ways to define types: – All are equivalent Exercise: – You can convert between all these formats - Start with an IDL Type - Convert to XML IDL - Convert to XSD – + Simple, Compact, Similar to C/C++/Java - Start with an XML-defined type – + Allows type sharing with CORBA - Convert to IDL – - Perceived as “legacy” – - Limited tool support - Convert to XSD XML – + Good tool support and syntax validation – + Familiar to a large community. Fashionable – - More verbose. Custom Syntax XSD – + Good tool support – + Commonly used as a type-description language – - Cumbersome syntax for certain types. Not human friendly WSDL – + Same as XSD and allows type sharing with Web-Services – - Same as XSD
  • 30. rtiddsgen Details rtiddsgen [-d <outdir>] [-language <C|C++|Java|C++/CLI|C#>] [-namespace] [-package <packagePrefix>] [-example <arch>] [-replace] [-debug] [-corba [client header file]] [-optimization <level of optimization>] [-stringSize <Unbounded strings size>] [-sequenceSize <Unbounded sequences size>] [-notypecode] [-ppDisable] [-ppPath <path to the preprocessor>] [-ppOption <option>] [-D <name>[=<value>]] [-U <name>] [-I <directory>] [-noCopyable] [-use42eAlignment] [-help] [-version] [-convertToIdl | -convertToXml | -convertToXsd | -convertToWsdl] [[-inputIdl] <IDLInputFile.idl> | [-inputXml] <XMLInputFile.xml> | [-inputXsd] <XSDInputFile.xsd> | [-inputWsdl] <WSDLInputFile.wsdl>] DefinitionFile can be IDL, XSD and XML file -example generates example pub/sub apps and makefiles for compilation. -replace replaces everything that’s generated. Use if the data type definition has changed. Always use with caution if you’ve made modifications.
  • 31. IDL vs. XML: IDL Example struct MemberStruct{ short sData; } typedef MemberStructType; //@top-level false 31
  • 32. IDL vs. XML: XML Example <?xml version="1.0“ encoding="UTF-8"?> <types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../rti_dds_topic_types.xsd"> <struct name="MemberStruct" topLevel="false"> <member name="sData“ type="short"/> </struct> <typedef name="MemberStructType" type="nonBasic“ nonBasicTypeName="MemberStruct“ topLevel="false"/> </types> 32
  • 33. IDL vs. XSD: XSD Example <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dds="http://www.omg.org/dds" xmlns:tns="http://www.omg.org/IDL- Mapped/" targetNamespace="http://www.omg.org/IDL-Mapped/"> <xsd:import namespace="http://www.omg.org/dds" schemaLocation="rti_dds_topic_types_common.xsd"/> <xsd:complexType name="MemberStruct"> <xsd:sequence> <xsd:element name="sData" minOccurs="1" maxOccurs="1" type="xsd:short"/> </xsd:sequence> </xsd:complexType> <!-- @topLevel false --> <xsd:complexType name="MemberStructType"> <xsd:complexContent> <xsd:restriction base="tns:MemberStruct"> <xsd:sequence> <xsd:element name="sData" type="xsd:short" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <!-- @topLevel false --> 33 </xsd:schema>
  • 34. ShapesDemo Data Persistence Persistence_svc A standalone service that persists data outside of the context of a DataWriter Data Data Writer Data Can be configured for: Writer Reader • Redundancy • Load balancing Data • Direct for performance Reader Global Data Space • Relay/Transactional • Redundant/ Fault-tolerant Persistence Persistence Service Service Permanent Permanent Storage Storage © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 34
  • 35. Data Persistence A standalone service that persists data outside of the context of a DataWriter Data Can be configured for: Data Writer Data Writer Reader • Redundancy • Load balancing Data Global Reader Data Space Demo: 1. PersistenceService 2. ShapesDemo 3. Application failure Persistence Persistence 4. Application re-start Service Service 5. Persistence Svc failure Permanent Permanent 6. Application re-start Storage Storage © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 35
  • 36. ShapesDemo Ownership and High Availability Producer / Writer K1 Pri strength=10 mary Topic T1 Producer / Writer K1 Backup strength=5 K2 Primary K1 K2 Producer / Writer K2 Backup strength=1 Owner determined per Topic and Key Only writer with highest strength can publish a Key Automatic failover when highest strength writer: – Loses liveliness – Misses a deadline – Stops writing the subject Shared Ownership allows any writer to update any object © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 36
  • 37. Outline Overview of Technology Application development cycle Architecting data-centric systems & modeling the Data – Examples: News example, Data Streaming, Commands, Video – Data Persistence with Examples – Using DynamicData Protocol, Performance & Scalability. Integrating external and legacy systems. Future directions and Standards:
  • 38. Components/Mechanics of the GDS Application Application GDS Definition Discovery Application Application Listener Listener Protocol Cache Management Cache Management
  • 39. Components/Mechanics of the GDS Application Application Domain Modeling & Sys. Design GDS Definition Discovery Application Config & Application Qos Listener Listener Protocol Cache Management Cache Management
  • 40. Designing a Data-Centric System Define/Model the Global Data Space Configure the Cache Management Configure Discovery Configure the Protocol Configure/Use hooks for – Fault detection – Controlled access
  • 41. Global Data Space / Global State Identify the number of domains Domain Information model – Topics – Types – Keys – Ownership
  • 42. Domain and Domain Participants N4 App 4 • Container for N1 App 1 Pub/Sub Pub/Sub applications that (A,B/C,D) (D/C,E,F) want to communicate • Applications can N2 App 2 N4 App 5 join or leave a Subscribe Domain Publish domain in any order (C) (C) • New Applications are “Auto-Discovered” N3 App 3 N5 App 6 • An application that Pub/Sub Subscribe (E,F/A,C) (B,C) has joined a domain is also called a “Domain Participant” Single ‘Domain’ System
  • 43. Domain and Domain Participants Using Multiple domains for Scalability, Modularity & Isolation Node 1 - App 1 Node 4 - App 1 Pub/Sub Domain A Pub/Sub Node 2 - App 1 Node 4 - App 2 Subscribe Publish Domain B Node 3 - App 1 Node 5 - App 1 Pub/Sub Subscribe Domain C Node 5 - App 2 Added Func. Node 6 - App 1 Pub/Sub Pub/Sub demo_domain_0 Multiple Domain System demo_domain_1
  • 44. Topics & Datatypes, Keys & Subjects Topic “MarketData” Data-type (name-type-value pairs) source type symbol Exchange volume bid ask OPRA IBM NYSE 200000 118.30 118.36 OPRA AAPL NASDAQ 171.20 171.28 RTFP EQ Key fields Subject Additional fields (payload) Topic “OrderEntry” Exchange type Symbol Order num number limit stop expiration NYSE BUY IBM 11956 500 120 - DAY NYSE BUY IBM 11957 1000 124.5 124 DAY NASDAQ SELL AAPL 11958 400 - 160 DAY Subject Key fields demo_filters
  • 45. QoS: Ownership Specifies whether more than one DataWriter can update the same instance of a data-object Ownership = EXCLUSIVE Ownership = SHARED “Only highest-strength “All data-writers can data writer can update each update data- each data-instance” instance” Data Data Data Data Data Data Writer Writer Writer Writer Writer Writer Data- Data- Instance Instance Provides fast, robust, transparent replacement for fail- over and/or take-over.
  • 46. demo_ownership QoS: Ownership Strength Specifies which DataWriter is allowed to update the values of data-objects OWNERSHIP_STRENGTH “Integer to specify the ORDER strength of an instance” Strength = 1 Strength = 4 Domain Participant Data AfterData Expires QoS Data “RIGHT” Writer Writer Reader “LEFT” - Deadline “RIGHT” “LEFT” - Liveliness Publisher Publisher Subscriber S S Note: Only applies to Topics with Ownership = Exclusive
  • 47. Configure the Cache Management Cache State Content – History Writer Application – Lifespan – Persistence – Resources Reader Cache View – Partitions – Content-Based Filter – Time-Based Filter – Order Reader Application
  • 48. QoS: History – Last x or All KEEP_ALL: KEEP_LAST: “depth” integer for Publisher: keep all until delivered the number of samples to keep at Subscriber: keep each sample until the any one time application processes that instance demo_history S7 S7 Data Data S7 Data S6 S6 Writer Writer S6 Reader S5 S5 S4 S4 S3 Publisher S2 Publisher Subscriber S1 Keep All Keep Last 2 Keep Last 4 S7 S6 S5 S4 S3 S2 S1
  • 49. lifespan_pub QoS: Lifespan lifespan_sub User can set lifespan duration Manages samples in the history queues, attached to each Sample Topic S1 Data Data Writer Reader S2 S3 S4 S5 Perm. Publisher Subscriber S6 Storage S7 S1 S2 S4 S3 S2 S1
  • 50. Content-Based Filtering Instance 1 Value = 249 Content Filtered Value = 230 Topic Instance 2 Instance 3 Value = 275 Topic Instance 4 Value = 262 “Filter Expression ” Instance 5 Value = 258 Ex. Value > 260 Instance 6 Value = 261 Instance 7 Value = 259 The Filter Expression and Expression Params will determine which instances of the Topic will be received by the subscriber. content_filter_example
  • 51. QoS: TIME_BASED_FILTER time_filter_example Topic “minimum_separation”: Data Reader does not want to receive data Domain faster than the min_separation time Participant Data Data Writer Reader Publisher Discarded Subscriber samples S SSS S S S minimum separation Data Samples
  • 52. Cache Management in Action Topics – Square, Circle, Triangle – Attributes Data types (schemas) – Shape (color, x, y, size) • Color is instance Key – Key • Color field used for key QoS – History, Partition – Time-Based Filter – Content-Based Filter demo
  • 53. Configure the Protocol Discovery Reliability Writer Application Batching Liveliness Flow Control Asynchronous write Network Configuration – Enabled Transports + transport properties – Multicast addresses – Transport Priority OS settings – Threads Reader Application – Memory
  • 54. Tunable Reliability Protocol Configurable AckNack reply times Performance can be tracked by to eliminate storms senders and recipients – Configurable high/low watermark, Fully configurable to bound Buffer full latency and overhead Flexible handling of slow – Heartbeats, delays, buffer sizes recipients – Dynamically remove slow receivers S7 S1 Data S6 Reliable Data S2 Writer Reader S5 •Guaranteed S3 S4 Ordered Delivery S4 S3 S5 Publisher •“Best effort” also Subscriber S6 S2 S1 supported S7 S8 S7 S3 S5 S4 S2 S1 NACK #6 S6
  • 55. Configure Notifications, Fault Detection & Management Writer Application Listeners Deadline Qos Liveliness Qos Built-in Readers Notification of matching Reader Application
  • 56. QoS: Deadline deadline_example Topic DEADLINE “deadline period” Commits Failed to to provide get data Data data each Data Writer deadline Listener Reader period. Publisher Expects data every Subscriber deadline period. deadline S X S S S S S
  • 57. QoS: Liveliness – liveliness_example Type and Duration Type: Controls who is responsible for issues of ‘liveliness packets’ AUTOMATIC = Infrastructure Managed MANUAL = Application Managed kill_apps Topic Topic Failed to renew lease Data Data Writer Listener Reader Publisher Subscriber lease_duration LP LP LP S Liveliness Message
  • 58. Exercise: How could “chat rooms” be implemented? Different Topics for each Chat room? Map to Partitions? Add field to the message and use content- filtered Topics? Same as before and also make room part of the Key? Others? Discuss pros and cons of each approach
  • 59. Exercise: How could we implement Ground control stations that monitor UAVs Different Topics for each UAV? – Or use Keys? Different Domains for each Ground Station? – Or Partitions? How to control multiple UAVs from the same ground station? How to switch the ground station that controls the UAV? How to do failover between ground stations? How to direct a message to one or all UAVs? How to detect loss of connection to an UAV? Discuss pros and cons of each approach
  • 60. Outline Overview of Technology Application development cycle Architecting data-centric systems & modeling the Data Protocol, Performance & Scalability. – Details on Reliable Protocol – Latency and Throughput – Using RTI’s LatencyTest and Perftest – Batching – Asynchronous writes & FlowController – Maximizing latency and Throughput Integrating external and legacy systems. Future directions and Standards:
  • 61. Performance & Scalability RTI DDS is about 20X faster than JMS 60,000 Throughput with a single publisher ( 2KB messages ) 50,000 Point-to-Point Updates per Second 45 40 RTI DDS 40,000 1-1 1-10 JMS [1000's sample/s] 35 30,000 1-24 30 25 20,000 20 10,000 15 10 0 16 32 64 128 256 512 1024 5 Message/Data Size (bytes - without batching) 0 2 4 6 9 11 18 CPU load [%] RTI DDS reliable multicast exhibits near perfect scalability Platform: Linux 2.6 on AMD Athlon, Dual core, 2.2 GHz © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 61
  • 62. Extremely low latency and jitter Reliable, ordered delivery over Gigabit Ethernet between 2.4 GHz Core 2 Quad processors running 32-bit Red Hat Enterprise Linux 5.0 © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 62
  • 63. Orders of magnitude more scalable than broker-based solutions Going from 1 to 888 New topics can be added to a subscribers of the same system without impacting the data has only a 10% impact latency and throughput on on throughput other topics Throughput with 8 topics is 8x the throughput with 1 topic http://www.rti.com/products/dds/benchmarks-cpp-linux.html © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 63
  • 64. Realizing Performance & Scalability RTI Approach Others: Broker-based middleware AMQP RTPS unspecified RTI operates peer-to-peer, without brokers RTI uses RTPS, an Advanced Multi-Session protocol supporting Reliable Multicast © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 64
  • 65. Advanced Scalability & Performance Techniques Latency and Priority Aware message batching Content-Aware multi-channel reliable multicast Enhanced Reliable Protocol – Selective ACKs (SACKs) for Confirmed Reliability – NACK-only Reliable Protocol for Massive Scalability Smart caching integrated with the message protocol Content-Filtering at the source © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 65
  • 66. Message Batching Send queue Receive queue write() sender receiver Without batching each message is separately sent. For small messages protocol headers might be bigger than payload Send queue Receive queue With batching messages are held a little and Transparent: write() combined into larger Receiver still batches maximizing sees individual sender throughout and minimizing messages CPU receiver © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 66
  • 67. Reliability with Batching Reliability must work even when messages are batched ACK or NACK of individual samples would negate some of the benefits of batching… => Protocol must be batch aware so that it can ACK/NACK complete batches! write() B1 B1 sender B1 B2 B2 B2 B3 B3 B3 receiver ACK(B3), NACK(B2) Repair B2 © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 67
  • 68. Batching is hard but it pays! RTI DDS 4.3b perftest results 1000 900 800 Throughput (Mbps) 700 Linux Baseline 600 Linux 10Kb Batch 500 400 300 200 100 0 0 1000 2000 3000 4000 5000 Intel Core2Duo Single-CPU Dual-Core 2.4GHz, 4MB cache Sample size (bytes) 32-bit CentOS 5 (RHEL 5), 2GB memory, Intel E1000 NIC © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 68
  • 69. Classic (TCP Style) Reliable Protocol No packet loss situation 01 01 01 02 02 02 03 03 03 04 04, HB ACK 1-4 04 05 05 05 06 06 06 07 07 07 08 08, HB ACK 1-8 08 ShapesDemo Company Confidential © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 69
  • 70. Classic (TCP Style) Reliable Protocol with some packet loss 01 01 01 02 02 02 03 03 X 04 04, HB X ACK 1-2, NACK 3 05 05 X 03 06 04 06 07 06 05 07 08 07 08 08, HB ACK 1-8 Packets 04 and 05 are received but the protocol drops them because a prior packet 03 is missing. This wastes valuable bandwidth © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 70
  • 71. RTI DDS Reliability (Reader Cache + SACK) improves performance when packet loss occurs 01 01 01 02 02 02 03 03 X 04 04, HB ACK 1-2, SACK 3 04 05 05 03 05 06 06 06 07 07 07 08 08, HB ACK 1-8 08 Packets 04 and 05 are received and cached waiting for the repair of 03. No bandwidth is wasted. © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 71
  • 72. RTI DDS NACK-only reliability eliminates ACK traffic if there no packet loss 01 01 01 02 02 02 03 03 03 04 04, HB 04 05 05 05 06 06 06 07 07 07 08 08, HB 08 No ACK traffic under normal operating conditions © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 72
  • 73. RTI DDS NACK-only reliability greatly reduces traffic even with packet loss 01 01 01 02 02 02 03 03 X 04 04, HB NACK 3 04 05 05 03 05 06 06 06 07 07 07 08 08, HB 08 Negative Acknowledgments sent only when some message is lost This approach is far more scalable when there are many subscribers © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 73
  • 74. Asynchronous Publishing & Flow COntroller synchronous send path: asynchronous send path: Return To User 1. rapid write() return User Thread write() Data Queue 3. coalesce data samples 2. network traffic shaping Flow Flow Publishing Thread Net I/O Wire Data Out Controller
  • 75. Qos Policies DDS_PublishModeQosPolicy – kind • DDS_SYNCHRONOUS_PUBLISH_MODE_QOS • DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS – flow controller name DDS_AsynchronousPublisherQosPolicy – disable_asynchronous_write <FALSE> – thread – disable_asynchronous_batch <FALSE> – asynchronous_batch_thread
  • 76. AP in Participant’s World Participant Publishing Thread D Publisher D Publishing Thread A Publishing Thread B Publishing Thread C Publisher A Publisher B Publisher C
  • 77. Flow Controller Token Distribution basic token bucket – steady-state traffic • tokens_added_per_period • token_period – max burst control • max_tokens – Additional controls • tokens_leaked_per_period • all values can be DDS_LENGTH_UNLIMITED – piggyback discount (Token Exchange Rate) • bytes_per_token scheduling policy – round-robin (RR) – earliest-deadline-first (EDF) • deadline = time of write + DDS_DataWriterQos::latency_budget
  • 78. Using Asynchronous Publishing DataWriter-side: DDS_FlowControllerProperty_t property; property.sched_policy = DDS_EDF_FLOW_CONTROLLER_SCHED_POLICY; property.token_bucket.max_tokens = A; //[0, DDS_LENGTH_UNLIMITED] property.token_bucket.tokens_added_per_period = B; //[0, DDS_LENGTH_UNLIMITED] property.token_bucket.tokens_leaked_per_period = C; //[0, DDS_LENGTH_UNLIMITED] property.token_bucket.bytes_per_token = D; //[1024, DDS_LENGTH_UNLIMITED] property.token_bucket.period = E; //[0, DDS_DURATION_INFINITE] ... DDSFlowController *controller = participant->create_flowcontroller("superflow", property); ... writer_qos.publish_mode.kind = DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS; writer_qos.publish_mode.flow_controller_name = "superflow"; // // Set up History queue size to hold deferred issues!!!!!. writer_qos.history.kind = DDS_KEEP_LAST_HISTORY_QOS; writer_qos.history.depth = z; // <<<<<<<<<<<<<!!!!!!!!!!!!!!<<<<< ... writer->write(data_sample, ...); ... // Optional wait for pipe to empty writer->wait_for_asynchronous_publishing(timeout); ... // Optional On-Demand trigger controller->trigger_flow(); ... // Optional Modify controller properties controller->set_property(); No changes on DataReader-side!!
  • 79. Flow Controller Design Challenge Requirements; – Large 1 mbyte issue. – Transmit over period of 10 seconds – Low priority transmission – Transport buffer size set to 32K CONTROLLER: property.sched_policy = ??; property.token_bucket.max_tokens = ?? property.token_bucket.tokens_added_per_period = ?? property.token_bucket.tokens_leaked_per_period = ??; property.token_bucket.bytes_per_token = ??; property.token_bucket.period = ??
  • 80. Flow Controller Design Challenge Requirements; – Large 1 mbyte issue. – Transmit over period of 10 seconds – Low priority transmission – Transport buffer size set to 32K – Cannot loose any issues CONTROLLER: property.sched_policy = DDS_RR_FLOW_CONTROLLER_POLICY; property.token_bucket.max_tokens = 1 property.token_bucket.tokens_added_per_period = 1 property.token_bucket.tokens_leaked_per_period = unlimited; property.token_bucket.bytes_per_token = 32k; property.token_bucket.period = 200ms Extra Credit Discussion: What about reliable protocol properties?
  • 81. Outline Overview of Technology Application development cycle Architecting data-centric systems & modeling the Data Protocol, Performance & Scalability. Integrating external and legacy systems. – Routing Service – Systems of Systems – Cross Domain Solutions – Accessing Data over a WAN – Database Connectivity – Access over the Web Future directions and Standards:
  • 82. Real-Time Recording Service Applications: Record high-rate data – Future analysis and arriving in real-time debugging Non-intrusive – multicast – Post-mortem reception – Compliance checking – Replay for testing and simulation purposes Demo: 1. Start RecordingService 2. Start ShapesDemo 3. See output files 4. Convert to: HTML XML 5. View Data: HTML XML sqlite stop_all © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 82
  • 83. Relational Database Integration Publish-Subscribe Action Relational Actions Write() ShapesDemo UPDATE [2,3] & INSERT Read() & Take() SELECT Dispose() DELETE Wait() & Listener sql_gui sql_shell Topic T1 Table T1 RTI I1 Real-Time I1 I2 I3 Connect I2 I3 2. start RTC 1. start mysql stop_all Event driven – The fastest way to observe database changes! © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 83
  • 84. COTS tools: Excel – Interacting with your data Display live RTI DDS Data in Excel Perform real-time computations and charts Publish RTI DDS data from Excel ShapesDemo blank saved demo
  • 85. RTI Routing Service Selective, real-time data forwarding and transformation Can Change Topic Name and Topic Schema – Allows for custom transformations via “plugin” – Can filter/guard data QoS managed, can cache last-known value for data Dynamically configured Location independent deployment start Topic A Topic B DDS Router ShapesDemo_0 ShapesDemo_1 XFORM GUARD stop_all
  • 86. Global Scalability: LAN to WAN… …without sacrificing Performance and Security Site A DDS DDS Router Router Site C Topics: Topics: Site Status Site Status Alarms WAN /  Proc Sensor Data Health Logs Result Data Internet Sensor Data Alarms Proc Sensor Data TCP/TLS/SSL Site B DDS DDS Site D Router Router Topics: Topics: Site Status Site Status Sensor Data Result Data © 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 86
  • 87. Web Accessibility Direct access to real-time data from Web-Based Applications simulated tracks Tactical Real-Time Data Web Web Enabled Web Enabled Recorded DDS Enabled Data DDS DDS DDS Recording 2. start Service 1. start replay & router Recorded Recorded Track Files view maps Data Files GUARD 87 stop_all
  • 88. Outline Overview of Technology Application development cycle Architecting data-centric systems & modeling the Data Protocol, Performance & Scalability. Integrating external and legacy systems. Future directions and Standards: – Extensible Topics for DDS – Web Enabled DDS – Standard C++ PSM for DDS Q&A
  • 89. Extensible Dynamic Types Submission class Ov erv iew +type TypeModel::Type Data * 1 1 1 1 1 +type * TypeRepresentation:: LanguageBinding:: LanguageBinding:: DataRepresentation:: TypeRepresentation TypeLanguageBinding DataLanguageBinding DataRepresentation
  • 90. Example: Current mechanisms Type Definition IDL: Foo.idl struct Foo { Language string<> name; Binding long ssn; }; IDL to Language Mapping: Foo.h Foo.cpp Data FooTypeSupport.cpp Representation struct Foo { IDL to CDR: char *name; int ssn; 00000006 }; 68656C6C 6F000000 Foo f = {“hello”, 2”}; 00000002
  • 91. Type-Definition – Language Representation – Serialized encapsulation ... Each offers options Type Representation Type Representation “Foo” schema “Foo” schema IDL, XSD, … IDL, XSD, … ddsgen DDS API DDS-API DDS-API Foo.h, Foo.h, DataWriter<Foo> DataReader<Foo> Foo.java Foo.java Language Language Bindings ddsgen Bindings Data Representation Data Representation 10110011… 10110011… CDR, TLV, CDR, TLV, JSON, XML JSON, XML DDS-RTPS Wire Interoperability
  • 92. Web-Enabled Data-Centric Global Data Space App App Web DDS HTTP App RTPS Stateless access of data via Global Data application appropriate technologies and protocols Space Global Data Space Not a bridge, broker, or message router App App 92
  • 93. Web Enabled DDS App Std. Web Web Enabled DDS App protocols Web Web DDS DDS HTTP HTTP RTPS RTPS <<conceptually>> Global Data Space A service that exposes DDS Global Data over Web Protocols: Applications can interact with DDS directly over the Web No need for bridges or special bindings for scripting languages 93
  • 94. Day 2: Exercises Gerardo Pardo-Castellote, Ph.D. Co-chair OMG DDS SIG CTO, Real-Time Innovations gerardo.pardo@rti.com The Real-Time Middleware Experts http://www.rti.com
  • 95. Preparations Install RTI DDS: – Windows • Unzip: RTI_Masterclass2GO.zip – into directory C:RTI • Execute: install_actions.bat – Linux • Boot your computer from the USB Test you can do the following – rtiddsgen -help
  • 96. Install VisualStudio from the ISO’s Copy the VS2008 and WindowsSDK ISO’s Install DaemonTools Mount the ISOs as virtual drives Proceed with the installation – 1st the VS2008 – 2nd the Platform SDK Test the installation by creating a “hello world” project compiling and running it
  • 97. Exercise #0 - Hello World Define you data type: Create a directory “HelloWorld” Create a file called hello.idl and open it in VisualStudio Add the following contents: const long MSG_LEN=256; struct HelloMsg { string<MSG_LEN> user; //@key string<MSG_LEN> msg; };
  • 98. Run rtiddsgen (for C++) rtiddsgen hello.idl -language C++ -example i86Win32VS2005 -replace -ppDisable rtiddsgen hello.idl -language Java -example i86Win32jdk -replace -ppDisable Look at the directory you should see: – hello-vs2005.sln – And Several other files… Open the Solution File (type hello-vs2005.sln on the console) – Look at HelloMsgPublisher.cxx – Look at HelloMsgSubscriber.cxx Build the Solution
  • 99. Run rtiddsgen (for Java) rtiddsgen hello.idl -language Java -example i86Win32jdk -replace -ppDisable Look at the directory you should see: – makefile_hello_i86Win32jdk – And Several other files… • Look at HelloMsgPublisher.java • Look at HelloMsgSubscriber.java You can use the makefile to build and the Java programs: – gmake –f makefile_hello_i86Win32jdk
  • 100. Execute the program C++: – On one window run: • objsi86Win32VS2005HelloMsgPublisher.exe – On another window run: • objsi86Win32VS2005HelloMsgSubscriber.exe Java – On one window run: • gmake –f makefile_hello_i86Win32jdk HelloMsgPublisher – On another window run: • gmake –f makefile_hello_i86Win32jdk HelloMsgSubscriber You should see the subscribers getting an empty string…
  • 101. Modify the program to produce something C++: Open HelloMsgPublisher.cxx in VisualStudio Java: Open HelloMsgPublisher.java in your preferred tool Look for the comment: /* Modify the data to be sent here */ Add the line: strcpy_s(instance->msg, MSG_LEN, "Hello this is gerardo"); Use your own name instead of “gerardo” Kill the Publisher, Rebuild the publisher and run it again
  • 102. Playing with rtiddsspy Run rtiddsspy while the other applications are running Start and stop applications. What do you see in rtiddsspy
  • 103. Exercise #1 – Shapes Publisher Create a new directory Shapes In the Directory create a file called ShapeType.idl Edit the file to have the following content: const long COLOR_LEN=64; struct ShapeType { string<COLOR_LEN>color; //@key long x; long y; long shapesize; }; Run: rtiddsgen ShapeType.idl -language C++ -example i86Win32VS2005 –replace -ppNotRun
  • 104. Exercise #2 – Using keys Create a new directory Chat In the Directory create a file called chat.idl Edit the file to have the following content: const long NAME_LEN=64; const long MSG_LEN=256; struct ChatMsg { string<NAME_LEN>name; //@key long age; string<MSG_LEN> chatRoom; string<MSG_LEN> msg; }; Run: rtiddsgen chat.idl -language C++ -example i86Win32VS2005 – replace -ppNotRun
  • 105. Edit the chat_publisher.cxx Go to the line with comment: /* Main loop */ – Add the line: strcpy_s(instance->name, NAME_LEN, "Gerardo Pardo"); (Use your own name) Go to the line with comment: – /* Modify the data to be sent here */ – Add the lines: instance->age = count; strcpy_s(instance->msg, NAME_LEN, “Como va todo?"); (Use your age and personalized message) Rebuild and execute
  • 106. Exercise #3 Use Qos Set RELIABILITY Set HISTORY to KEEP_LAST or KEEP_ALL – Test different depths Use Partitions – Create several Partitions: • E.g. by ChatRoomName – Publish in your ChatRoom – Subscribe to one or more ChatRooms
  • 107. Exercise #4 Use content filters Edit the chat_subscriber.cxx Add the lines: DDSContentFilteredTopic *cftopic; DDS_StringSeq filter_params; filter_params.maximum(0); cfTopic = participant-> create_contentfilteredtopic( "Selected Chats", topic, "age > 4", filter_params); Look of the call to create_datareader – Replace “topic” with “cfTopic” in the paramater list.
  • 108. Exercise #5 Use Exclusive Ownership Set up in pairs edit the chat_publisher.cxx and use the same “name” for both of you Re-run the publisher application you will see mixed messages. Edit the chat_publisher.cxx Before creating the data writer add the lines publisher->get_default_datawriter_qos(dwq); dwq.ownership.kind = DDS_EXCLUSIVE_OWNERSHIP_QOS; dwq.ownership_strength.value = 10; Replace DDS_DATAWRITER_QOS_DEFAULT with dwq In the create_datawriter() call Edit the chat_subscriber.cxx Before creating the data reader add the lines DDS_DataReaderQos drq; subscriber->get_default_datareader_qos(drq); drq.ownership = DDS_EXCLUSIVE_OWNERSHIP_QOS; Replace DDS_DATAWRITER_QOS_DEFAULT with drq in the create_datareader() call
  • 109. Summary Reduces software lifecycle Most widely proven and costs mature implementation – Loose coupling Highest performance – Replaces need for custom middleware in Industry-leading expertise high-performance, and services capability real-time applications Free trial, research and Reduces risk IR&D licenses – Standards-compliant API and wire protocol Comprehensive VxWorks – Multiple implementations support – Widely adopted