Home

User`s Manual

image

Contents

1. Output Legend Ready on domain 0 Ready on domain O Publishing Shape Extended Subscribing to Squares Configured to use Shape data type Select Delete All in both instances of Shapes Demo 4 6 3 Publishing Original and Extended Types Subscribing to Extended Type This scenario simulates the situation where deployed applications are publishing data using the old model and new applications are receiving data of both the original and extended data types 1 2 3 In Publisher1 s Configuration dialog press Stop select the Shape data type press Start In Publisher 1 publish a blue square In Publisher2 using the Shape Extended type by default publish a red square with the horizontal hatch fill pattern and a medium rotation speed In Subscriberl using the Shape Extended type by default subscribe to squares You should see that Subscriber1 is receiving both types of squares as seen below More Experiments 4 7 4 7 1 Publishing Shape Publishing Shape Extended File View Publish Subscribe Controls Help Al Delete All Pause Publishing Hide History Configuration Name Data Type Square Shape Subscribing to Squares More Experiments Please feel free to experiment and run tests using the other QoS options in the Create New Sub scriber and Create New Publisher windows Described below are a few other interesting behav iors to test Content Fi
2. 3 3 1 3 3 2 3 3 3 3 3 4 Color Color is selectable only when creating a publisher You can use color to represent different instances of the same topic shape A shape s color is used as a key simply a way to distinguish between data for multiple instances of the same shape topic Data that belongs to the same instance in the topic shape will have the same key color The Color key area is grayed out for subscribers The subscriber of a topic will receive all data sent on all instances of the topic Initial Size The initial size field allows you to control how big the shape is Partitions You can use partitions to dynamically isolate and group publishers and subscribers If a pub lisher has a partition then only subscribers with that same partition will receive data from that publisher The demo supports four partitions A B C and D Partitions support regular expressions so a publisher with a wildcard partition will match subscribers with partitions A B C and D A publisher with no partition the default case will not be matched with a subscriber that does have a partition That is no partition is not the same thing as a wild card partition Extended Attributes This section is enabled when you are using the Shape Extended Data Type in the Configuration dialog see Section 3 4 4 this is the default case The Shape fill style extended attributes only apply to Publishers You 9 So
3. V CRTIVUSER QOS PROFILES xml You can use your own file as well as the following files which are pro vided with Shapes Demo e RTI SHAPES DEMO QOS PROFILES xml in Shapes Demo installation directory gt resource xml For information on the contents of this file see Applying QoS from a Profile Section 3 3 5 e USER SHAPES DEMO QOS PROFILES xml in Shapes Demo s workspace You can edit this file to include your own profiles If you specify multiple XML files the Up and Down buttons change the order in which they are loaded If you load files that contain profiles with is default qos true the last profile loaded is used This information is saved in the workspace see Shapes Demo s Workspace Section 3 5 To unload an XML QoS Profiles file 1 Select Configuration then Stop 2 Click Manage QoS 3 In the resulting dialog box clear the check box next to the file or select the file and click Remove If the XML QoS Profile file has Errors If you add an XML QoS Profile file that has errors and you click Ok Shapes Demo will try detect the error and will show a popup that indicates with file has been detected to be wrong Once you click OK the Load Unload QoS profile files window will automati cally uncheck all the incorrectly formatted files Other Controls At this point you can either press Ok and proceed without loading those files or edit them by pressing the Edit button the default XML ed
4. RTI Shapes Lib Batching RTI Shapes Lib History KeepLast 20 V Enable distributed RTI Shapes Lib Ownership Shared RTI Shapes Lib Ownership Excusive RTI Shapes Lib Durability Volatile L_____ Manage QoS RTI Shapes Lib Durability Transient RTI Shapes Lib Durability Persistent MonitorDemoLibrar y MonitorDefault MonitorDemoLibrary SamplesRejectedSc MonitorDemoLibrar y FixedSamplesRejec User RTI Shapes Lib User Shapes De Show this dialog a Shapes Demo includes an XML file RTI SHAPES DEMO QOS PROFILES xml which includes these profiles Default Default This profile means you want to use whichever profile in the XML file is marked as the default with qos profile name x RII SHAPES DEMO QOS PROFILE xml the mon is_default_qos true gt In default profile is RTI_Shapes_Lib Shapes_Default_Profile L RTI_Shapes_Lib Shapes_Default_Profile This profile sets the data writer s autodispose_unregistered_instances to false and the data reader s History depth to keep the last 6 samples RTI Shapes Lib Batching This profile enables best effort communication in the data writer and keeps the last 10 samples It also enables batching with a maximum flush delay of 1 second and allows an unlimited number of bytes to be batched for up to 10 samples RTI Shapes Lib History KeepLast20 This profile sets the data reader s History QoS to keep the last 20 samples 1 RTI Shapes Lib
5. 3 6 7 3 7 Publish and Subscribe Task Panes 3 3 6 4 Reliability The Reliability QoS can be RELIABLE or BEST EFFORT Selecting the Reliability check box sets Reliability to RELIABLE If the check box is not selected Reliability is set to BEST EFFORT For publishers J The default is RELIABLE l If Reliability is RELIABLE check box is selected the publisher will attempt to deliver all the data that has been sent If data is not received by the subscriber due to a communica tion error the middleware will retransmit the data O If Reliability is BEST EFFORT check box is not selected the publisher will use best effort communication and will not retransmit any missing data For subscribers The default is BEST EFFORT LL If Reliability is RELIABLE check box is selected the subscriber expects to receive all data updates reliably The subscriber listens for heartbeats from the publisher and responds with either a positive acknowledgement to indicate data receipt or a negative acknowledgement to initiate retransmission of missing data O If Reliability is BEST EFFORT check box is not selected the subscriber will not expect lost data to be resent The publisher and subscriber must use compatible settings as described in Table 3 2 Table3 2 Valid Combinations of Reliability 3 3 6 5 3 3 6 6 Subscriber Reliability not selected Reliability selected default BEST EFFORT RELIABLE Reliability no
6. DDS Each publisher subscriber pair can establish independent QoS agreements Thus Connext DDS designs can support extremely complex flexible data flow requirements 22 Publish Subscribe Simple Analogy 2 3 QoS parameters control virtually every aspect of the Connext DDS model and the underlying communications mechanisms Many QoS parameters are implemented as contracts between publishers and subscribers publishers offer and subscribers request levels of service The mid dleware is responsible for determining if the offer can satisfy the request thereby establishing the communication or indicating an incompatibility error Ensuring that participants meet the level of service contracts guarantees predictable operation More information about some important QoS parameters is presented below Deadline Periodic publishers can indicate the speed at which they can publish by offering guaranteed update deadlines By setting a deadline a compliant publisher promises to send a new update at a minimum rate Subscribers may then request data at that or any slower rate Reliability Publishers may offer levels of reliability parameterized by the number of past issues they can store for the purpose of retrying transmissions Subscribers may then request dif fering levels of reliable delivery ranging from fast but unreliable best effort to highly reliable in order delivery This provides per data stream reliability control Strength The midd
7. application and playing with examples Feel free to start here if you are familiar with publish subscribe networking 1 Chapter 5 About RTI describes RTI products and where to seek further information L Appendix A explains how to run from the command line IJ Appendix B contains a few troubleshooting hints 1 2 Goals of the Demonstration There is no teacher like experience Playing with this demonstration will give you a first hand introduction to key Connext DDS concepts These include L Anonymous publish subscribe Applications communicating over publish subscribe networks do not need to know the source or destination of the data This loosely coupled design simplifies or eliminates configuration eases fault tolerance and boosts performance L Dynamic discovery With publish subscribe applications simply ask for the information they need and pro vide the information they have The middleware does the hard task of finding the infor mation and delivering it where it needs to go There is no or minimal configuration each node can simply join or leave the network at any time LJ Failover Connext DDS supports the concept of ownership a publisher can own the responsibil ity for providing data to the network Ownership makes failover simple if the owner fails a backup owner can instantly take over responsibility LJ Failure notification Connext DDS is designed for the real world In the case of failure e g th
8. default setting and you will see the Hide History command in the Controls panel When you select Show History the samples stay in the data reader s queue so you can see the shadow trail of the historical samples up to the number set in the History field Configuration Note To make changes with this dialog first click Stop Then make the desired changes and click Start Other Controls The Configuration dialog is where you can change the domain ID manage QoS profiles and start stop Using the Stop and Start buttons is the equivalent of a Reset button short of quitting and restarting the application The dialog also lets you choose between two data types Shape and Shape Extended the default Use Shape Extended if you want to select the DataType shape s fill pattern or rotation speed when you micas create a publisher see Extended Attributes Sec e e ET tion 3 3 4 If the Choose the profile listbox contains only Default Default this means no XML files have been loaded The Enable distributed Logger checkbox is described in Using RTI Distributed Logger Sec tion 3 7 To load an XML QoS Profiles file Choose the profile Default Default 1 Click Stop Any publishers subscribers will be deleted when you do this 2 Click Manage QoS Load Unload QoS profile files 3 In the resulting dialog box click a Add then browse to select an XML ve QoS profiles file
9. published samples in permanent storage like a disk The data will survive the data writer Which particular samples are stored depends on other QoS such as History Section 3 3 6 6 and ResourceLimits If Durability is selected for a subscriber the subscriber will ask the publisher to send all previ ously written data All data in the publisher s history queue will be sent to the subscriber To buffer this temporary high throughput the subscriber should use a History value comparable to the publisher s The publisher and subscriber must use compatible settings as described in Table 3 1 Valid Combinations of Durability Subscriber TRANSIENT VOLATILE LOCAL TRANSIENT PERSISTENT VOLATILE 4 incompatible incompatible incompatible TRANSIENT 4 4 incompatible incompatible LOCAL TRANSIENT 4 4 4 incompatible Publisher PERSISTENT 4 4 4 4 Note If you select Durability you must also select Reliability this applies to the publisher and subscriber Time Based Filter The Time Based Filter field is only available when creating a subscriber It is the minimum sepa ration time in milliseconds that the subscriber wants between data updates Any data arriving within this time interval will be discarded Where possible the publisher will not publish the data Valid settings range from 0 to 31 536 000 000 ms 1 year The Time Based Filter value must be less than the Deadline value Section 3
10. which is not available if there is no active network interface After you select OK Shapes Demo will create a participant using shared memory instead of UDPv4 B 2
11. you will see Connext DDS provides simple parameters to permit all these scenarios with a remarkably simple and intuitive model 2 4 Publish Subscribe Example Application 2 5 Publish Subscribe Example Application An air traffic control system provides a more realistic example application An air traffic control system monitors and directs all flights over an entire continent The data distributed in such a system is in the form of aircraft tracks which provides positional information e g course speed etc about an airplane Components of an air traffic control system would include radar systems airplanes and air traffic control centers that provide current flight status information through real time displays Managing correct distribution of data in such a system is complex Each radar system can track many different airplanes and each airplane may be tracked by more than one radar system Real time access to this information is needed for displays at air traffic control centers so that air traffic controllers can make informed decisions Air traffic controllers in the north east may only want aircraft track information in their area so only a subset of data needs to be provide to them Based on current local conditions e g air traffic weather etc air traffic controllers may issue flight plan updates back to airplanes in order to rout around inclement weather and other airplanes Though airplanes do not need flight plans f
12. 0 if you need to use a different domain ID you must use the same value for all copies of Shapes Demo that need to commu nicate with each other The ID is an integer value 0 or higher help Lists the command line options posX lt integer gt posY lt integer gt Sets the X and Y positions where the Shapes Demo window will be dis played on your screen The valid range for lt integer gt depends on your screen s resolution Using 1 1 for the X and Y positions results in a default position chosen by either the windowing system or wxWidgets depending on platform pubInterval integer Specifies how often the publisher should send data in ms Default 50 ms subInterval integer Specifies how often the subscriber should look for data in ms Default 50 ms A 1 Table A 1 Command line Options Option Description verbosity 0 5 Controls the verbosity of messages from Shapes Demo 0 SILENT No further output will be logged Default 1 ERROR Only error messages will be logged 2 WARNING Both errors and warnings will be logged 3 LOCAL Errors warnings and verbose information about the lifecycles of local Connext DDS objects will be logged 4 REMOTE Errors warnings and verbose information about the lifecycles of remote Connext DDS objects will be logged 5 ALL Errors warnings verbose information about the lifecy cles of local and
13. In the Create New Publisher window click OK 3 In Subscriberl create a circle subscriber History 1 Time Based Filter 1000 ms a Under Subscribe click on Circle b In the Create New Subscriber window e Set History to 1 e Set Time Based Filter to 1000 e Click OK You will see the circle jump once every second instead of a fluid movement In this case the publisher is only sending data to the subscriber once a second according to the subscriber s time based filtering Appendix A Running from the Command Line In some cases you may want to run Shapes Demo from the command line 1 Open a command prompt and navigate to the folder where Shapes Demo is installed 2 Enter the following command Scripts rtishapesdemo command line options Table A 1 describes the command line options These options take precedence over conflicting settings in the configuration file if any For example if the configuration file specifies domain ID 1 and you enter domainlId 2 then domain ID 2 will be used Table A 1 Command line Options Shape ShapeExtended gt Option Description compact Starts Shapes Demo using a compact view configure Opens the configuration dialog at start up even if dataType is set dataType Sets the default value for the type domainld lt ID gt For different copies of Shapes Demo to communicate with each other they must use the same domain ID The default domain ID is
14. Ownership Shared This profile sets Ownership to SHARED and Durability to TRANSIENT with direct communication to true for both the data reader and data writer Both the reader s and writer s Liveliness is set to AUTOMATIC with a lease duration of 1 second The reader has a History depth is 100 samples and uses RELI ABLE reliability IJ RTI Shapes Lib Ownership Exclusive This profile sets Ownership to EXCLUSIVE for both the data reader and data writer The writer s Ownership Strength is set to 4 I RTI Shapes Lib Durability Volatile This profile sets Ownership to VOLATILE and History of 100 samples for both the data reader and data writer The reader uses RELI ABLE Reliability 1 See Dispose vs Unregister on page 3 12 3 5 Publish and Subscribe Task Panes 3 3 6 3 3 6 1 L RTI Shapes Lib Durability Transient This profile sets Ownership to TRANSIENT for both the data reader and data writer J RTI Shapes Lib Durability Persistent This profile sets Ownership to PERSISTENT for both the data reader and data writer L MonitorDemoLibrary Default This profile enables monitoring See Using Monitoring Section 3 6 I MonitorDemoLibrary SamplesRejectedScenario MonitorDemoLibrary FixedSamplesRejectedScenario These profiles are used in the tutorial for RTI Monitor see Using Monitoring Section 3 6 RTI SHAPES DEMO QOS PROFILES xml is in Shapes Demo installation directory gt resource xml If you
15. RII Shapes Demo A Demonstration of RTI Connext DDS User s Manual Version 5 1 0 f t Your systems Working as one O 2014 RTI All rights reserved Printed in U S A First printing f t f December 2014 Trademarks Real Time Innovations RTI NDDS RTI Data Distribution Service DataBus Connext Micro DDS the RTI logo 1RTI and the phrase Your Systems Working as one are registered trademarks trademarks or service marks of Real Time Innovations Inc All other trademarks belong to their respective owners Copy and Use Restrictions No part of this publication may be reproduced stored in a retrieval system or transmitted in any form including electronic mechanical photocopy and facsimile without the prior written permission of Real Time Innovations Inc The software described in this document is furnished under and subject to the RTI software license agreement The software may be used or copied only under the terms of the license agreement Technical Support Real Time Innovations Inc 232 E Java Drive Sunnyvale CA 94089 Phone 408 990 7444 Email support rti com Website https support rti com Contents INTO QUENO eee res 1 1 1 1 Guide to this Document ccsscesessscesseesecessecessecseecsaceeseecssseesecessecsaeecasessesesseceaeecuseessecaeeceeeecseceseecs 1 1 1 2 Goals of the Demonistr tion ettet e eo ird eoe p De eer quete e d OE ce e e preda 1 2 2 Background Inform
16. TML documentation 4 4 Ownership Example Figure 4 3 Two Publishers and One Subscriber 4 3 Publisher Publisher2 File View Publish Subscribe Controls Help Ready on domain 0 Partitions Read Take QoS Settings Re Read Default Default ame DataType Type Color rde Shape Extended Sub Subscriber Ready on domain 0 Ownership Example As you saw in the previous example it s possible for multiple publishers to simultaneously send data to the same instance of a topic You may or may not want this behavior For certain types of data such as commands you may want to receive updates from just one publisher at a time in order to be ensure consistency Exclusive ownership is a way to ensure that only one publisher s data for a specific instance can get through to a subscriber With multiple publishers the one with the highest ownership strength wins At this point you should have three copies of Shapes Demo running which will be referred to as Publisher1 Publisher2 and Subscriberl If you have not already done so click Delete All on each one so they are not publishing or subscribing to any shapes Tip If you make a mistake during the following steps and need to delete a single publisher or subscriber select the item in the Legend tab and press the Delete key on your keyboard 4 5 Ownership Example 7 10 In Publisherl create an orange triangle publisher with Exclus
17. aa et eet da a e ette pee 4 14 47 3 Reliability and Durability Example sese eee nennen 4 15 4 7 4 me bas d Filtering Example nsss eei retten eroe rete b he epe 4 16 Running from the Command Line seeeesusss A 1 ejje B 1 Bi Windows Security Alert 5 eret ee rete rete rte I ree poet ert verre eet Pari rte eat B 1 B 2 Running without an Active Network Interface ee eee nnne B 2 Chapter 1 1 1 Introduction Welcome to RTI Shapes Demo This demonstration application is a self contained introduction to the elegance and power of publish subscribe networking It goes beyond simple publishing and subscribing however This demo will also give you a glimpse of the goals and capabilities of RTI Connext DDS As you will see RTI Connext DDS offers flexibility performance and reli ability well beyond other networking technologies while addressing the challenge of extremely high performance distributed networking Connext DDS offers flexible and fine grained control over Quality of Service QoS parame pee ters No one application can showcase all the PEE supported QoS parameters Shapes Demo is Suare intended to provide you with an abbreviated Triangle introduction to Connext DDS concepts it covers SEa a small subset of the many QoS parameters Sra available in Connext DDS Triangle Shapes Demo publishes and subscribes to writes and reads colo
18. aliOn eosornue rene cte nena nnn na hie E rex Rr 2 1 2 1 Communication Models in Networking Middleware sse 2 1 2 2 C onnext DDS Overview inerte ie de mtm een bd e HO tb Heu PR 2 2 221 Quality Of Service it etie tieu e et hee tete EE 2 2 23 Publish Subscribe Simple Analogy essen nnne e nennen nennen 2 3 24 Publish Subscribe Complex Analogy sse nnne nennen nnns 2 4 2 5 Publish Subscribe Example Application sese eene nennen nnns 2 5 3 Installing and Using Shapes Demo sesssss 3 1 SL Installation utc da eio tec nete he 3 1 3 2 Running Shapes Demo e eet e te pp a epu eere ater bite cepi pecie edt 3 1 3 21 If You Cannot use MulticaSt ooonooccconnconnnonnncnnnnonnoconanonnnonnnonnnnon nn coca ron aa at aa iaa eaaa Area saai 3 2 3 3 Publish and Subscribe Task Panes rem erten eem aag aeiee oi e A EEE A a a aS 3 3 Owen MS rollo EL Xu iL 3 4 Bde Irtitlal SIZ SLAPT ETI E I IRE A PR rr e ve od S Oe E IE Boece 3 4 Bro PaftitlOns un NN 3 4 3 4 Extended Attributes 5 5 setenta eet tees eden Pei prd 3 4 3 3 0 Applying QoS froma Profile nere teret tte e re Poire rte deett crane 3 5 3 9 6 Setting QOS Valles clan 3 6 3 3 7 Using a Content Filtered Topic iiieeei eret ite eene 3 9 3 3 8 Controlling the Read Method ecetreneteeanienaerema uidet rete Prae 3 9 A Other Controls se Recent e Pe ien eie de e
19. asked to start two copies of Shapes Demo There is no need to configure a discovery service or provide any a priori informa tion about where the demo applications are being run 1 Create a red circle publisher a Start Shapes Demo We will refer to this instance of the application as Publisherl b Under Publish click on Circle c In the Create New Publisher window e Select RED for Color e Click OK You will see a red circle moving on the Pub lisher canvas If there were any subscribers the publisher would start sending data the coordinates of the red circle 4 1 Publish Subscribe Example 2 Create a subscriber for circles Agoly QoS from Profe Choose the profe a Start a second Shapes Demo We will refer to this instance of the application as Subscriberl b Under Subscribe click on Circle pea urone e D e es ANZ 1 ve c In the Create New Subscriber window e Click OK Use all the defaults You will see 6 red circles with blue borders on the Subscriber canvas mirroring the movements of the circle in the Publisher can vas The leading circle indicates the current position of the published circle The other circles are the historical samples kept by Con next You can see the difference between his torical data and new data looking at the thickness of the border You can also hide historical data by selecting Hide History from the Controls menu Your windows should look simi
20. be can be efficient because the data flows directly from source to destina tion without requiring intermediate servers Multiple sources and destinations are easily defined within the model making redundancy and fault tolerance natural Finally the intent declaration process provides an opportunity to specify per data stream Quality of Service QoS requirements Properly implemented publish subscribe middleware delivers the right data to the right place at the right time In summary client server middleware is best for centralized data designs and for systems that are naturally service oriented such as file servers and transaction systems Client server middle ware is not the best choice in systems that entail many often poorly defined data paths Mes sage passing with send that there semantics map well to systems with clear simple dataflow needs Message passing middleware is better than client server middleware at free form data sharing but still require the application to discover where data resides Publish subscribe by providing both discovery and messaging implements a data centric information distribution system Nodes communicate simply by sending the data they have and asking for the data they need Connext DDS Overview Connext DDS presents a publish subscribe integration model that connects anonymous informa tion producers publishers with information consumers subscribers The overall distributed application is comp
21. cified by the Configuration window This allows you to start Shapes Demo with well known settings each time If you start Shapes Demo with the domainlId option that domain ID setting is not saved in the workspace If the workspace directory contains a file named RTI SHAPES DEMO xml this file is used as the workspace file You can specify a different workspace file by starting Shapes Demo with the workspaceFile filename command line option If the file specified with this option cannot be found it will be created If you do not use the workspaceFile filename option and RTI SHAPES DEMO xml is not in the workspace directory Shapes Demo will automatically create RTI SHAPES DEMO xml in the workspace directory Using Monitoring This section is only useful if you have RTI Monitor a graphical tool that displays monitoring data from RTI Connext DDS applications in which monitoring is enabled To enable monitoring in Shapes Demo select the MonitorDemoLibrary Default QoS profile described in Applying QoS from a Profile Section 3 3 5 For more information on monitoring please see the RTI Monitor Getting Started Guide and RTI Monitor User s Manual Using RTI Distributed Logger Shapes Demo provides integrated support for RTI Distributed Logger and is enabled by default Using RTI Distributed Logger When you enable Distributed Logger Shapes Demo will publish its log messages to Connext DDS in the same domain that Sha
22. d select RTI Shapes Demo When Shapes Demo starts you will see a window like that in Figure 3 1 Figure 3 1 Shapes Demo Initial View e RTI Shapes Demo Domain 0 mp file View Publish Subscribe Controls Help Publish 3 Square Publish and im Subscribe Task Panes Section Subscribe 3 3 Square Circle Triangle Controls Other Controls Delete A x Pause Publishing Section 3 4 Hide History Configuration Name Data Type Type Color Partitions Read Take QoS Settings Output and Legend Tabs Section 3 4 5 Output Legend Please select Configuration under controls and click Start WorkspaceFile CAUs 3 2 1 If You Cannot use Multicast If you want to run Shapes Demo on multiple computers that do not support multicast or on a network that doesn t support multicast you need to explicitly give Shapes Demo a list of all of the hosts that need to discover each other we call this the discovery peers list The list can contain hostnames and or IP addresses In its simplest format each entry should be builtin udpv4 hostname IP The list can contain multiple comma separated entries To set your discovery peers list either LI Set the NDDS DISCOVERY PEERS environment variable On Windows systems For example set NDDS DISCOVERY PEERS builtin udpv4 mypeerhost1 builtin udpv4 mypeerhost2 e On UNIX based systems For example if you are using csh or tesh 3 2 Publish and Subscribe Task Panes se
23. down list box to change Durability to Transient Local More Experiments Check Reliability e Set History to 200 e Click OK 5 Watch the Subscriber canvas You will see a shadow of objects printed out in a continu ous pattern The shadow results from the subscriber showing the last 200 samples from the publisher s history queue 6 To stop showing the shadow trail of samples in Subscriber1 click on Hide History AM RTI Shapes Demo Domain 0 Sulel 2 A RTI Shapes Demo Domain 0 4 7 4 Time based Filtering Example Sometimes subscribers are located on slower or more remote systems that cannot handle the amount of data that the publisher is capable of sending For example consider a system where a central command center is publishing high resolution aerial photos of a geographic area once every 30 seconds and a soldier with a handheld computer is trying to subscribe to the data In this case the handheld computer does not have the bandwidth to handle the command center s send rate With time based filtering the handheld computer can throttle the data so that it only receives data once every 5 minutes 1 Start two copies of Shapes Demo which we will call Publisher1 and Subscriber1 If you are reusing demo windows from the previous section delete any existing publishers and sub scribers under Controls click Delete All 2 In Publisherl create a circle publisher any color a Under Publish click on Circle b
24. e violation of a deadline or the termination of service interested applications are immediately notified Extensible Types Connext DDS supports the Extensible and Dynamic Topic Types for DDS specification from the Object Management Group OMG See Connext DDS documentation for details and limitations Using Extensible Types existing applications that are designed to publish and subscribe data with a particular data model will be able to communicate with newer applications that use an extended compatible data model without any changes or recompilation LJ Advanced concepts If you are interested in exploring the demo more extensively this document also briefly illustrates additional use cases such as content filtered topics reliability durability and time based filtering 1 http www omg org spec DDS XTypes 1 2 Chapter 2 Background Information 2 1 This section provides an overview of existing middleware communication paradigms including publish subscribe along with basic concepts of Connext DDS If you are already familiar with this information you can go directly to Chapter 3 Installing and Using Shapes Demo Communication Models in Networking Middleware Software applications are becoming increasingly distributed A node in a distributed application must find the right data know where to send it and deliver it to the right place at the right time Simplifying access to this data would enable a who
25. ed a e 3 10 CRM Delete A EE 3 10 942 PausePu blishihg x eere a adele o tee deis 3 10 8 13 Show Hide ElStoEy AA E ect ri e it eee be tuni ern trea 3 10 8 14 Configurations astuce eed ala da 3 10 3 45 Output and Legend Taps cinco encon eret ren ner emper tete nei re ipee eii 3 12 3 5 Shapes Demo s Workspace hahet e en d een e eere meta 3 13 3 6 Using MotorSpain i a ea e aa aaa ESO 3 13 3 7 Using RTI Distributed ogger nct entente eie a eere Eee ive ee bed decide 3 13 SR oe is Hi eda ne vance lates aeons a a Ea a aara esas eae ies 4 1 41 Publish Subscribe Example viii ti irit tei rt E Ree 4 1 42 Multiple Instances Example vio eee dete tene ee ee eei Pe estre 4 3 4 3 Ownership Exarniple 0 btts hp att epe dnt aa 4 5 44 Failure Detection Example irre eet cte ti rt e tret qu tee rer teen 4 7 45 Failover Example Berne e b iere eq Pte hd eae ede ve de EE PO erret 4 8 46 Extensible Types Examples 5 tete tiere te oec cad erc de e eei ded 4 11 4 6 1 Introduction to the Shape Extended Type sss 4 11 4 6 2 Publishing Extended Type Subscribing to Basic Type sse 4 12 4 63 Publishing Original and Extended Types Subscribing to Extended Type 4 12 ALT M te Experiments rne tme eec net rm hec ne reir n Pee Pi e vera te eee sted en re toe ies 4 13 47 1 Content Filtered Topics Example seen eee nennen nnne 4 13 47 2 lLifespamExample s ea
26. ent data types to demonstrate this scenario Shapes Demo can publish and subscribe to either a Shapes Extended data type the default or a more basic Shape data type The difference between these types is that the Shapes Extended type includes two more pieces of information a fill pattern and a rotation speed In addition to the QoS settings that you will experiment with in these exercises there is another QoS specific to Extensible Types TypeConsistencyEnforcementQosPolicy that can further cus tomize the behavior of applications when using Extensible Types For details see the RTI Con next Core Libraries Getting Started Guide Addendum for Extensible Types At this point you should have three copies of Shapes Demo running referred to as Publisherl Publisher2 and Subscriberl All are using the Shape Extended data type by default Introduction to the Shape Extended Type 1 Publish a Square in Publisherl In the pub Extended Attributes lish screen choose the horizontal hatch pat Shape fil style tern and set the rotation speed to middle setting O Solid Transparent 2 Subscribe to Squares in Subscriberl In the subscriber you will see the shape with the Ui Horizontal fuste selected pattern rotating at the selected Vertical hatch speed Rotation Speed Slower Faster Controls zonfiguration Name DataType Type Color Partitions Read Take QoS Settings Name DataType Type Color Partitions Read Take QoS Settings Squa
27. hape until you click Resume Publishing When Pause Publishing is clicked the label changes to Resume Publishing The Pause Resume Publishing commands are also available when you right click an entity if it is a publisher in the Legend tab In this way you can individually pause each single publisher When publishing is paused you will still see published topics colored shapes moving in the publisher demo window but corresponding topics in a subscriber window will stop moving That s because what you see in the publisher window is the data being generated not necessar ily sent what you see in the subscriber window is data being received When you pause pub lishing the subscriber stops receiving updates to the topic that is the shape s coordinates Show Hide History The Show History and Hide History commands tells the demo to start stop drawing the shapes from all the packets that are in the subscriber s history queue This command has no effect on subscribers that use the take method of accessing data It is only for subscribers that use read It also has no effect on publishers If you set History greater than 1 by default all the packets in the history queue are displayed showing the historical path of the shapes on the subscriber s canvas If History is 1 the default no historical samples appear because there is only room for one sample in the queue By default historical samples are shown that is Show History is the
28. his example The two copies will be referred to as Publisher1 and Subscriberl Tip If you make a mistake during the following steps and need to delete a single publisher or subscriber select the item in the Legend tab and press the Delete key on your keyboard 4 7 Failover Example 12 In Publisherl create a cyan square pub 13 14 15 lisher Deadline 200 ms a Under Publish click on Square b In the Create New Publisher window e Select CYAN for Color e Set Deadline to 200 ms e Click OK Create a square subscriber in Subscriber1 with Deadline 4000 ms a Under Subscribe click on Square b In the window e Set Deadline to 4000 ms e Click OK You ll see six cyan squares moving around Subscriber1 s canvas This set of squares mirrors the movement of the cyan square in Publisherl s canvas along with 5 historical samples Create New Subscriber Note The subscriber s deadline must be greater than or equal to the publisher s deadline If not an Incompatible QoS Inval Sze Parttons Extended Attrbutes Shape fil style Rotation Speed Apply QoS from Profile Choose the profile Defaut Defaut QoS Values Ownership Exdusve Apply QoS from Profile Choose the profile Defauit Defeuit M QoS Values Ownership Uvelness Exdusive AUTOMATIC Lease Duration ms DF Durab ty History VOLATILE CA Teme based Fiter ms 0 Relab ty Content Filter Topic Read method
29. iability Publish Subscribe Complex Analogy Above we drew an analogy between publish subscribe and a newspaper delivery system That is of course an oversimplification Complex systems have complex data delivery requirements Connext DDS is perhaps more like a picture in picture in picture super television system with each super TV set capable of displaying dozens or even thousands of simultaneous channels Super TV sets can optionally be broadcast stations each can publish hundreds of channels from locally mounted cameras to all other interested sets Any set can add new pictures by subscrib ing to any channel at any time Each of these sets can also be outfitted with cameras and act as a transmitting station TV sets publish many channels and may add new outgoing channels at any time Each communications channel indeed each publisher subscriber pair can agree on reliability bandwidth and history storage parameters so the pictures may update at different rates and record outgoing streams to accommodate new subscribers These super TV sets can also join or leave the network intentionally or not at any time If and when they leave or fail backup TV set transmitters will take over their picture streams so no channels ever go blank That would be quite a system It is only an analogy but we hope this gives you some idea of the enormity of the real time communications challenge It also outlines the power of publish sub scribe as
30. ing in Subscriber to start receiving the green cir cle s data That s because the subscriber of a topic Circle in this case gets all data sent for all instances of the topic The green circle was just another instance of the topic Circle so the subscriber received this new data automatically 5 Create another red circle publisher in a new window a Start a third Shapes Demo We will refer to this copy of the application as Publisher2 b Under Publish click on Circle c In the Create New Publisher window e Select RED for Color e Click OK We now have multiple publishers updating the same instance Red of the topic Circle as in Figure 4 3 You ll see that the red circle in Subscriber1 s canvas flickers between different locations This happens because the subscriber is receiving position data from both of the publishers and is trying to display them at the same time Details on how to handle such a situation will be discussed in the next section 6 Click Delete All in the Controls sub panel of each of the three demo windows Note A Subscriber shape may appear with an X or a symbol on it JX means the instance has been disposed by the DataWriter DDS NOT ALIVE DISPOSED INSTANCE STATE L means none of the DataWriters are that currently alive are writing the instance DDS NOT ALIVE NO WRITERS INSTANCE STATE 1 For more information on these states please see the RTI Connext Core Libraries User s Manual or API reference H
31. itor will open allowing you to cor rect the file and correct the error 3 45 Output and Legend Tabs There are two tabs at the bottom of the demo application window 1 The Legend tab shows you the publishers and subscribers created for the demo and their QoS settings Name Data Type Type Color Partitions Read Take QoS Settings Reliability Square Shape Extended Pub BLUE Default Default True Cirde Shape Extended Pub GREEN A Default Default True Square Shape Extended Sub Take Default Default False Triangle Shape Extended Sub d Read 5hapes_lib Bat False 4 n Output Legend Right click on a publisher entity in the Legend tab to access these commands e Pause resume publishing see Section 3 4 2 e Dispose data and delete the data writer Unregister data and delete the data writer Right click on a subscriber in the Legend tab to access a command to delete the data reader Another way to delete a publisher or subscriber is to click on it in the Legend tab and press the Delete button on your keyboard Dispose vs Unregister When data is disposed all data readers are informed that as far as the data writer knows the data instance no longer exists and can be considered not alive When data is unreg istered this only indicates that a particular data writer no longer wants to modify an instance an important distinction if there are multiple writers for the same instance L The Out
32. ive ownership Strength 1 a Under Publish click on Triangle b In the Create New Publisher window e Select ORANGE for Color e Check Exclusive e Set Strength to 1 e Click OK You should see a floating orange triangle on the canvas We created a publisher with exclusive ownership and a strength of 1 In one of the other Shapes Demo win dows create a triangle subscriber with Exclusive ownership We will call this window Subscriberl a Under Subscribe click on Triangle b In the Create New Subscriber window Check Exclusive e Click OK You should see 6 orange triangles with blue borders moving around in the Subscriber1 canvas So far this is similar to the publisher subscriber exercise In the third window create an orange triangle publisher with Exclusive own ership and Strength 3 We will call this window Publisher2 a Under Publish click on Triangle b In the Create New Publisher window e Select ORANGE for Color e Check Exclusive and set Strength to 3 e Click OK You should see an orange triangle in Publisher2 s canvas as in Figure 4 4 Use your mouse in Publisher2 to drag the triangle around the canvas The tri Color Key Inta Sze Color Key Inbal Sze PURPLE BLUE Extended Attributes Shape fil style 9 Sold Transparent Horizontal hatch Vertical hatch Rotaton Speed 3 Apply QoS from Profile Choose the profie Defauit Defauit Apply QoS from Pr
33. lar to Figure 4 1 Figure 4 1 Publisher and Subscriber Displays File View Publish Subscribe Controls Help Publish 000 Square Delete All Pause Publishing Hide History Configuration E Name DataType Type Color Partitions Read Take QoS Settings Name DataType Type Color Partitions Read Take QoS Settings Crde Shape Extended Pub RED Default Default Read Defeuit Default Ready on domain 0 Publisher Subscriber 3 Test real time data delivery To show that the subscriber is receiving real time data move the cursor over the Pub lisher s red circle and click the mouse button This will stop the red circle in the publisher canvas Drag the cursor and move it around while holding down the mouse button The red circles on the subscriber canvas should exactly mirror your mouse movements Congratulations you have just finished the first exercise which illustrates basic publish sub scribe functionality If you plan to continue with the next exercise leave the two demo windows running The next exercise will use the red circles 4 2 Multiple Instances Example 4 2 Multiple Instances Example Instances are useful when you are dealing with data that is unpredictable in terms of its creation and deletion e g aircraft airplane flight tracks and shipment tracking Flights and shipments can come and go The application has no way of knowing when or how many flights shipments show up Connext provides
34. le new class of distributed applications The challenge especially in embedded and real time networks is to quickly find and disseminate information to many nodes Three major middleware communication paradigms have emerged to meet this need client server message passing and publish subscribe Client server is fundamentally a many to one design that works well for systems with central ized information such as databases transaction processing systems and central file servers However if multiple nodes generate information client server architectures require that all the information be sent to the server for later redistribution to the clients resulting in inefficient cli ent to client communication The central server is a potential bottleneck and single point of fail ure It also adds an unknown delay and therefore indeterminism to the system because the receiving client does not know when it has a message waiting Message passing architectures work by implementing queues of messages Processes can create queues send messages and service messages that arrive This extends the many to one client server design to a more distributed topology Message passing allows direct peer to peer con nection it is much easier to exchange information between many nodes in the system with a simple messaging design However the message passing architecture does not support a data centric model Applications have to find data indirectly by targeti
35. lete a single publisher or subscriber select the item in the Legend tab and press the Delete key on your keyboard 1 This exercise picks up where the previous one left off So you should have two demo win dows running one is publishing red circles Publisher1 and the other is subscribing to cir cles Subscriber1 2 In Subscriberl choose Delete All from the Controls Menu 3 Create a circle subscriber with History 1 a In Subscriber1 under Subscribe click on Circle b In the Create New Subscriber window e Change the History field from 6 to 1 e Click OK You should now see one red circle moving in each instance of Shapes Demo 4 Create a green circle publisher a In Publisher1 under Publish click on Circle b In the Create New Publisher window e Select GREEN for Color e Click OK 4 3 Multiple Instances Example You should see two circles moving on each canvas one red and one green Figure 4 2 Publisher and Subscriber Displays for Multiple Instances Af RTT Shapes i File View Publish Subscribe Controls Help Publish 007 Square Name DataType Type Color Partitions Read Take QoS Settings Name DataType Type Color Partitions Read Take QoS Settings Crde Shape Extended Pub RED nnd Defauit Defauit Crde Shape Extended Sub ba Read Default Default Orde Shape Extended Pub GREEN Default Default Ready on domain 0 Ready on domain 0 Publisher Subscriber Notice that we did not have to do anyth
36. leware can automatically arbitrate between multiple publishers of the same topic with a parameter called strength Subscribers receive from the strongest active publisher This provides automatic failover if a strong publisher fails all subscribers immediately receive updates from the backup weaker publisher Durability Publishers can declare durability a parameter that determines how long previ ously published data is saved Late joining subscribers to durable publications can then be updated with past values Other QoS parameters control when the middleware detects nodes that have failed suggest latency budgets set delivery order attach user data prioritize messages set resource utilization limits partition the system into namespaces and more Connext DDS QoS facilities offer unprec edented flexibility and communications control Publish Subscribe Simple Analogy The publish subscribe communications model is analogous to that of magazine or newspaper publications and subscriptions Think of a publication as a newspaper such as New York Times The Topic is the name of the periodical New York Times The type specifies the for mat of the information weekly printed magazine or daily newspaper The user data is the con tents text and graphics of each sample weekly or daily issues The middleware is the distribution service US Postal service or a paper delivery service that delivers the reading material from where it i
37. lid will see it in the dialog for Subscribers but it cannot be enabled You can choose a fill pattern and rota tion speed for the shape Extended Attributes Transparent Horizontal hatch Vertical hatch These attributes illustrate a feature known as Exten sible Types which are described in the RTI Connext Rotation Speed DDS Core Libraries Getting Started Guide Addendum for Extensible Types y Slower Faster 3 4 Publish and Subscribe Task Panes 3 3 5 Applying QoS from a Profile The drop down listbox allows you to choose a QoS profile that has been pre loaded from an XML file If the listbox contains only Default Default it means you haven t specified any XML files via the Configuration dialog see Section 3 4 4 In this case Default Default will result in all default QoS settings as described in the Connext DDS API reference HTML documentation A profile contains the QoS values that will be used for the objects created by the demo All QoS values not specified in the selected pro file will use default values noted in the Con next DDS API reference HTML documentation Any QoS settings that you make in the Create New Publisher Sub scriber dialog take precedence over the values in the selected profile See Setting QoS Values Section 3 3 6 Data Type Shape O Shape Extended Choose the domain 9 Choose the profile Default Default RTI_Shapes_Lib Shapes_Default_Profile
38. ltered Topics Example A content filtered topic is a very useful feature if you want to filter data received by the Sub scriber It also helps to control network and CPU usage on the subscriber side because only data that is of interest to the subscriber is sent For example assume your application is a radar monitor that draws flights detected within a 20 mile radius The application can subscribe to the track data with a content filtered topic for a 20 mile radius on the coordinates of all flights With the filter only coordinates that are within the 20 mile radius will be sent to the application 1 Start two copies of Shapes Demo which we will call Publisherl and Subscriberl If you are reusing demo windows from a previous section delete any existing publishers and sub scribers under Controls click Delete All 2 In Publisherl create a circle publisher any color More Experiments 4 7 2 a Under Publish click on Circle b In the Create New Publisher window click OK In Subscriberl create a circle subscriber with a content filtered topic a Under Subscribe click on Circle b In the Create New Subscriber window Check Use filter e Click OK You will see a shaded rectangle appear in pra zm LEN the subscriber canvas This is the filter for the coordinates of the Circle topic The sub Cx la scriber will receive position data for the Cir cle only when it is with the area defined by the conten
39. ng specific sources e g by process ID or channel or queue name on specific nodes So this architecture doesn t address how applications know where a process channel is what happens if that process channel doesn t exist etc The application must determine where to get data where to send it and when to perform the transaction In the message passing architecture there is a model of the means to transfer data but no real model of the data itself Publish subscribe adds a data model to messaging Publish subscribe nodes simply publish information they have and subscribe to data they need Messages logically pass directly between the communicating nodes The fundamental communications model implies both dis 2 1 Connext DDS Overview 2 2 2 2 1 covery i e what data should be sent and delivery i e when and where to send the data This design mirrors time critical information delivery systems in everyday life e g television radio magazines and newspapers Publish subscribe systems are good at distributing large quantities of time critical information quickly even in the presence of unreliable delivery mechanisms Publish subscribe architectures map well to the real time communications challenge Finding the right data is straight forward nodes just declare their interest once and the system delivers it Sending the data at the right time is also natural publishers send data when the data is avail able Publish subscri
40. ofile Choose the profie Defauit Defauit Ownersho 7 Excuse Durab ty VOLATILE Time based Fiter ms 0 Reiab ty Apply QoS from Profile Choose the profile Default Default angle in Subscriber1 should exactly mirror your mouse movements because Publisher2 has a higher strength than Publisher 11 Click Delete All in the Controls sub panel of each of the three demo windows 4 6 Failure Detection Example Figure 4 4 Different Ownership Strengths 4 4 Publisherl strength 1 Publisher2 strength 3 File View Publish Subscribe Controls Help Ready on domain 0 me Data Type Type Color Partitions Read Take QoS Settings Re angie Shape Extended Sub id Read Defauit Defauit Subscriber Failure Detection Example You may want to detect when the publisher or the network is behaving abnormally and the sub scriber hasn t seen updates for an instance within a specified period of time The Deadline QoS offers a way to do this Deadline is a contract between the publisher and the subscriber based on the data rate The pub lisher offers to send data at least once in its specified deadline period and the subscriber requests to receive data within its deadline period If either the subscriber or the publisher misses their deadline an event callback for deadline missed occurs At this point you should have three copies of Shapes Demo running though you will only use two of them for t
41. open this file you will see that these profiles have the property base name which points to another profile The profile uses all the QoS settings of the profile pointed to by base name plus the QoS settings that are explicitly specified If a property is specified in both the base profile and the current profile the property in the current one is used In Shapes Demo installation directory gt resource xml you will find USER RTI SHAPES DEMO QOS PROFILES template xml you can use this files as a tem plate to create your own QoS profiles A file named USER RTI SHAPES DEMO QOS PROFILES xml based on this template is copied to the Shapes Demo workspace directory see Shapes Demo s Workspace Section 3 5 if it does not already exist there Shapes Demo automatically loads the profiles from this file and the profiles in RTI SHAPES DEMO QOS PROFILES xml Setting QoS Values There are two ways to control the QoS values for the publisher and subscriber 1 You can modify the QoS values in a profile and apply that profile as described in Section 3 3 5 2 You can explicitly set some QoS values QoS Values directly in the Create New Publisher Sub i Ownership Liveliness scriber dialog as seen in this screenshot Exdusive AUTOMATIC x and described below Values set in the dia Lect Rd log override values in the profile 0 INF Durability History VOLATILE 1 Deadline ms INF Lifespan ms Y Reliability INF Exclusi
42. osed of processes called participants each running in a separate address space possibly on different computers A participant may simultaneously publish and subscribe to typed data streams identified by names called Topics The Application Programming Inter face API offered by Connext DDS complies with the Object Management Group OMG Data Distribution Service DDS standard It is the first comprehensive specification available for publish subscribe data centric designs Connext DDS defines a communications relationship between publishers and subscribers The communications are decoupled in space nodes can be anywhere time delivery may be imme diately after publication or later and flow delivery may be reliably made at controlled band width To increase scalability topics may contain multiple independent data channels identified by keys This allows nodes to subscribe to many possibly thousands of similar data streams with a single subscription When the data arrives the middleware can sort it by the key and deliver it for efficient processing Connext DDS is fundamentally designed to work over unreliable transports such as UDP or wireless networks No facilities require central servers or special nodes Efficient direct peer to peer communications or even multicasting can implement every part of the model Quality of Service Fine control over Quality of Service QoS is perhaps the most important feature of Connext
43. pes Demo is using Then you can use RTI Monitor or RTI Admin Console to Shape Extended see the log message data Since the data is pro vided in a DDS Topic you can also use rtiddsspy choose the domain or even write your own visualization tool To disable enable Distributed Logger use the Default Defaukt vj checkbox provided in the Configuration Dialog under the Controls menu E Show this dialog at startup Y Enable distributed logger 1 RTI Monitor and RTI Admin Console are separate tools that can run on the same host as your application or on a dif ferent host 2 rtiddsspy is provided with RTI Connext DDS 3 14 Chapter 4 Examples 4 1 Important Unless otherwise noted these examples assume you are using the default Shapes Demo settings meaning the RTI SHAPES DEMO QOS PROFILES xml file is loaded This file tells Connext to load the profile called Shapes Default Profile from the RTI Shapes Lib library and use it as the default settings For more information about profiles see Section 3 3 5 Publish Subscribe Example This example showcases the publish subscribe concept It uses best effort communication and shows the decoupling between the publisher and the subscriber i e the publisher can send data without knowing where what the subscriber s are and the subscriber can receive data without knowing where what the publisher s are In this example you will be
44. put tab shows statuses events and other information 12 24 44 Creating domain participant on domain 0 12 24 48 DELETE ALL All the publishers and subscribers have been successfully removed 12 40 45 Creating domain participant on domain 0 12 40 47 A new generic shape has been created 12 40 47 DataWriterQoS set to use Default Profile Tc Output Legend 1 When you press Delete the current setting for the WriterDataLifecycle QoS policy s autodispose unregistered instances field determines if the writer s data is disposed before it is unregistered If autodispose unregistered instances has not been changed via a QoS profile the default setting will cause the data to be disposed and unregistered 3 12 Shapes Demo s Workspace 3 5 3 6 3 7 Shapes Demo s Workspace The workspace directory for Shapes Demo is here L On Mac systems Users user Library Preferences rti RTI Shapes Demo version 1 On Linux systems home user rti RTI Shapes Demo version 1 On Windows systems My Documents RTI RTI Shapes Demo lt version gt Shapes Demo uses the concept of a workspace which is an XML file that contains the last settings used by Shapes Demo For example it contains the list of QoS XML profile files loaded through the Load Unload QoS profile files window and whether or not the files should be loaded Another useful piece of information saved in the workspace is the last domain ID spe
45. r At this point you should have three copies of Shapes Demo running referred to as Publisherl Publisher2 and Subscriberl Tip If you make a mistake during the following steps and need to delete a single publisher or subscriber select the item in the Legend tab and press the Delete key on your keyboard 1 In Publisher1 create a red circle pub lisher with Exclusive Ownership Strength 1 Deadline 400 ms a In Publisher1 under Publish click on Circle 3 romanc gt b In the Create New Publisher window e Select RED for Color ums na Deadine ms e Check Exclusive anri DF e Set Strength to 1 e Set Deadline to 400 ms e Click OK 4 9 Failover Example 2 In Publisher2 create a red circle pub lisher with Exclusive Ownership Strength 3 Deadline 400 ms s podras a Under Publish click on Circle Slee b In the Create New Publisher window e Select RED for Color Check Exclusive e Set Strength to 3 e Set Deadline to 400 ms e Click OK 3 In Subscriberl create a circle subscriber Exclusive selected Deadline 2000 ms RE Acoly Qos from Profe Choose the profile a Under Subscribe click on Circle b In the Create New Subscriber window e Check Exclusive e Set Deadline to 2000 ms e Click OK In the subscriber canvas you should see Read method to use red circles that mirror the movement of ES the one in Publisher2 This happens because Publisher2 s ci
46. rcle has a higher strength that Publisherl s The deadline setting for the subscriber is the time at which the subscriber application will fail over to the lower strength publisher application 4 In Publisher2 click on Pause Publishing After 2000 ms Subscriber1 will show a requested deadline missed message in its Output tab and at the same time fail over to display the movements of the red circle in Publisher1 Publisher2 initially had exclusive ownership of the red circle instance because it had a higher strength However this ownership was lost to the lower strength Publisherl when the subscriber missed a deadline This is especially useful if a publisher is unable to grace fully shutdown and relinquish its ownership 5 In Publisher2 click on Resume Publishing Subscriberl s red circle should immediately switch to tracking the movements of Publisher2 6 Click Delete All in the Controls sub panel of each demo window Extensible Types Examples 4 6 4 6 1 Extensible Types Examples Data models often need to evolve In a deployed system you might want to deploy new appli cations that can handle additional attributes in the data model yet maintain compatibility with already deployed applications without making any changes The Extensible Types feature is designed to handle these situations applications using different but compatible data types can still communicate The Shapes Demo application uses two differ
47. re Shape Extended Pub BLUE lt Defauit Defauit Square ShapeExtended Sub o Resdl Defaut Defaut Publisher Subscriber 3 Feel free to repeat with other shapes fill patterns and speeds Extensible Types Examples 4 Select Delete All in each instance of Shapes Demo 4 6 2 Publishing Extended Type Subscribing to Basic Type This scenario simulates the situation where new applications are publishing data with extra information using an extended data model but there are existing applications that only need to subscribe to the original basic data model and in fact don t even have the logic to deal with extra attributes in the newer extended model 1 5 In Publisher 1 which is using the Shape Extended type by default publish a blue square Select the horizontal hatch fill pattern and a medium rotation speed In Subscriberl s Configuration dialog press Stop select the Shape data type press Start In Subscriber1 subscribe to squares In Publisher 1 you should see a square with the selected pattern rotating at the selected speed In Subscriber 1 you should see a blue square that does not have the pattern and is not rotating Mf RTI Shapes Demo Domain 0 em E ARTI Shapes Demo Domain 0 j 8 Name DataType Type Color Partitions Read Take QoSSe Mame Datatype Type Color Partitions Read Take QoS Se gt A 50 Shas d fault Square Shape Extended Pub Defa Squere Shape cO Defaut
48. red moving shapes which are Pause Publishing displayed in the demo s window Each copy of Configuration Shapes Demo can simultaneously publish and subscribe to many topics shapes ICC RR UR AT Crde Shape Extended Pub YELLOW Default Default Shapes Demo also demonstrates the concepts of urge Sapa sanded Pb ORE Defatt Defai Extensible types Shapes Demo can publish and a subscribe to two different data types the Output Legend Shape type or the Shape Extended type Ina Lento production scenario your deployed applica tions are communicating using some existing data type However after deployment you may find it necessary to modify the deployed data model For instance you may need to add new attributes Connext DDS s Extensible Types feature is designed to make your data type flexible and allow it to evolve over time Guide to this Document This document will guide you through the demonstration the middleware and the underlying principles I Goals of the Demonstration Section 1 2 below outlines the concepts and goals of this demonstration 1 1 Goals of the Demonstration L Chapter 2 Background Information provides an overview of publish subscribe and other communication paradigms It also provides an overview of Connext DDS and its key concepts 1 Chapter 3 Installing and Using Shapes Demo details the features of the demonstration application Chapter 4 Examples jumps right into using the
49. remote Connext DDS objects and peri odic information about Connext DDS threads will be logged workspaceFile lt file gt Specifies an XML configuration file Default See Shapes Demo s Workspace on page 3 13 Appendix BTroubleshooting B 1 Windows Security Alert When you run the demo you may encounter a Windows Security Alert dialog Simply click Allow Access 6 Windows Firewall has blocked some features of this program Windows Firewall has blocked some features of RTI Shapes Demo on all public private and domain networks Name RTI Shapes Demo A Publisher Real Time Innovations Inc Path C program files x86 rtiyti shapes demo 4 5xlpin V86win32vs2005rtishapesdemo exe Allow RTI Shapes Demo to communicate on these networks V Domain networks such as a workplace network Y Private networks such as my home or work network 7 Public networks such as those in airports and coffee shops not recommended because these networks often have little or no security What are the risks of allowing a program through a firewall B 1 Running without an Active Network Interface B 2 Running without an Active Network Interface If you run Shapes Demo on a system that does not have an active network interface you may see this warning A Create participant failed Trying with no network mode Participant creation failed because by default Shapes Demo uses UDPv4
50. rich semantics that can be used to track monitor and check the state new deleted no writers etc of individual instances Some of the possible notifications are dis played in the Output tab Publishers and subscribers are associated with a topic If you create a new topic every time a new flight is detected you would need to create a matching subscriber and publisher pair This is obviously not scalable since you can have many different aircraft flight plans Instances give you the ability to scale a topic Unique instances of a topic are defined by unique key values A subscriber of a topic will get all the data sent on all the instances of this topic Take the example of flight track data the key could be the flight ID pilot name or mission code Regardless of how many new flights there are you would only need one subscriber to get the data because the topic is the same In this example the topic is the shape of the object Square Circle or Triangle and the key is its color So different colors of an object give you different instances of the topic For example a red circle is a different instance from a green circle yet they are all instances of the Circle topic At this point you should have two copies of Shapes Demo running which will be referred to as Publisher1 and Subscriberl In this example you will be asked to start additional copies of Shapes Demo Tip If you make a mistake during the following steps and need to de
51. rom all other air planes it would be useful to have information about planes in the immediate vicinity Defining the air traffic control system in terms of publishers subscribers and QoS parameters reveals that Connext DDS is a natural fit to address this data distribution problem Each radar system can be thought of as a publisher that publishes the tracks topic which describes an air plane s positional information Each airplane that the radar system is tracking can be thought of as an instance of the track topic The real time controller displays are both subscribers that subscriber to the tracks topic and publishers that publish flight plant topic updates back to the specific airplane QoS parameters can be used to manage and control deterministic behav iors and fault tolerance capabilities of the system 2 5 Chapter 3 Installing and Using Shapes Demo 3 1 3 2 Installation 1 On Linux systems The distribution is packaged in a tar gz file Unpack it as described below You do not need to be logged in as root during installation 1 Create a directory for Shapes Demo 2 Move the downloaded file into your newly created directory 3 Extract the distribution from the uncompressed files For example gt tar xvzf RTI_ShapesDemo lt version gt tar gz L On Windows systems Simply double click the downloaded file to run the installer J On Mac systems The distribution is packaged in a zip file Unpack it a
52. s created a printing house to the individual subscribers people s homes This analogy is illustrated in Figure 2 1 2 3 Publish Subscribe Complex Analogy Figure 2 1 2 4 Note that by subscribing to a publication subscribers are requesting current and future samples of that publication so that as new samples are published they are delivered without having to submit another request for data Publish Subscribe Example C Topic New York Times J Topic New York Times gt Sample Publisher Issue for Feb 15 Subscriber Send Receive o 7 Service Sal The publish subscribe model is analogous to publishing fes or newspapers The Publisher sends samples of a particular Topic to all Subscribers of that Topic With the New York Times the Topic would be New York Times The sample consists of the data articles and pictures sent to all Subscribers daily or weekly Connext DDS is the distribution channel all of the planes trucks and people who distribute issues to the Subscribers In this example Quality of Service QoS parameters can be linked to delivery requirements deliver only the Sunday edition the paper must be delivered by 7 00am the paper must be in the mailbox or on the porch etc QoS parameters specify where how and when the data is to be delivered controlling not only transport level delivery properties but also application level concepts of fault tolerance ordering and rel
53. s described below You do not need to be logged in as root during installation 1 Create a directory for Shapes Demo 2 Move the downloaded file into your newly created directory 3 Extract the distribution from the uncompressed files For example unzip RTI_ShapesDemo lt version gt zip Running Shapes Demo You can run Shapes Demo on a single computer or on multiple workstations connected via Ether net Mac Linux and Windows operating systems are supported You can start multiple copies of the demo on as many computers as you would like By default the demo discovers other demo applications using multicast loopback or shared memory The discovery mechanism is fully configurable Note Shapes Demo is not compatible with applications built with RTI Data Distribution Service 4 5e and earlier releases when communicating over shared memory For more information 3 1 Running Shapes Demo please see the Transport Compatibility section in the RTI Connext DDS Core Libraries Release Notes LJ On Linux and Mac systems Enter the following command install directory scripts rtishapesdemo For details on running from the command line see Appendix A Running from the Com mand Line On Windows systems If you have RTI Launcher you can use it to start Shapes Demo Or from the Windows Start menu navigate to RTI Connext DDS version RTI Connext DDS Professional ver sion Components RTI Shapes Demo version an
54. t filter To see the effect of dynamic filters use your mouse to move and resize the shaded area in Subscriberl Delete All Pause Publishing ide Hi Configuration Lifespan Example The Lifespan QoS controls how long data samples are considered valid You can use it to pre vent sending data that is considered too old to be valid The default setting is an infinite dura tion meaning the data will never expire 1 Start two copies of Shapes Demo which we will call Publisher1 and Subscriberl If you are reusing demo windows from a previous section delete any existing publishers and sub scribers under Controls click Delete All In Publisherl create a circle publisher any color with History 100 Lifespan 1000 ms a Under Publish click on Circle b Set History to 100 and Lifespan to 4000 c Click OK In Subscriber create a circle subscriber with History 100 More Experiments 4 7 3 a Under Subscribe click on Circle b Set History to 100 c Click OK Drag the shape around on Publisher s canvas On Subscriber1 s canvas you will see a shadow of objects printed out in a continuous pattern The shadow is caused by the subscriber showing the last 100 data samples from the publisher s history queue In Publisherl click Pause Publishing In Subscriber1 notice that the samples disappear as they time out Experiment by increas ing the Lifespan setting for the publisher The longer
55. t selected f default 4 incompatible BEST EFFORT Reliability selected Publisher RELIABLE B BE Liveliness and Lease Duration Liveliness is used to detect the state of the publisher even when it is not actively sending data For a publisher the Liveliness value is the maximum time interval within which a publisher will signal that it is active For a subscriber the Liveliness value is the maximum time interval within which a subscriber expects to be notified that the publisher is alive A subscriber s Liveliness must be greater than or equal to the publisher s Liveliness Valid set tings range from 0 to 31 536 000 000 ms 1 year or INF for infinity the default History History controls the amount of data that is kept in the send queue This is normally used in con nection with Durability and or Reliability If Durability is selected then History determines how much previously sent data is sent to late joining subscribers Valid settings range from 0 to 100 000 000 The default is 1 3 8 Publish and Subscribe Task Panes 3 3 6 7 3 3 6 8 3 3 7 3 3 8 Deadline For a publisher the Deadline value is the time interval within which the publisher commits to updating data at least once if not more frequently For a subscriber the Deadline value is the maximum time interval between data updates that the subscriber expects from the publisher If a publisher fails to send a data upda
56. te within the subscriber s requested Deadline interval the subscriber will get a deadline missed notification Valid settings range from 1 ms to 1 year or INF for infinity the default A subscriber s Deadline value must be greater than or equal to the publisher s A subscriber s deadline must also be gt its minimum separation see Time Based Filter Section 3 3 6 3 Lifespan Lifespan is only available when creating a publisher The purpose of the Lifespan QoS is to avoid delivering stale data Each data sample written has an associated expiration time beyond which the data should not be delivered The middleware attaches timestamps to all data sent and received The expiration time of each sample is computed by adding the specified Lifespan duration to the destination timestamp When you specify a finite Lifespan Connext DDS will compare the current time with those timestamps and drop data when the specified Lifespan expires The default setting is an infinite duration meaning the data will never expire If you have multiple publishers for the same instance they should all use the same Lifespan value Valid settings range from 1 ms to 1 year or INF for infinity the default Using a Content Filtered Topic The Use filter check box is only available when creating a subscriber If selected a filter is cre ated for data updates to a topic based on the content of the data Only data that satisfies the filter
57. tenv NDDS DISCOVERY PEERS builtin udpv4 mypeerhost1 builtin udpv4 mypeerhost2 l Edit the profile in RTI SHAPES DEMO QOS PROFILES xml or lt workspace gt RTI RII Shapes Demo 5 y USER RTI SHAPES DEMO QOS PROFILES xml For example if the other machine has an IP address of 10 30 42 8 discovery initial peers element builtin udpv4 10 30 42 8 element initial peers multicast receive _addresses gt discovery 3 3 Publish and Subscribe Task Panes Connext DDS applications publish write and subscribe to read Topics Publish A Topic has a name and a type the type defines the structure of the data Square Shapes Demo can publish and subscribe to three Topics Square Circle and Circle Triangle Triangle Clicking any of these options will open a dialog that allows you to set the subscribe QoS for the publisher subscriber men Circle Triangle Color Key Apply QoS from Profile PURPLE Choose the profile BLUE Default Default RED GREEN QoS Values YELLOW Ownership Liveliness CYAN 7 Exdusive AUTOMATIC MAGENTA Lease Duration ms ORANGE 0 INF Durability History VOLATILE 1 Deadline ms INF Extended Attributes Lifespan ms Shape fill style VI Reliability 9 Solid D Transparent Horizontal hatch Use filter 9 Read Take Vertical hatch Content Filter Topic Read method to use Rotation Speed Y 3 3 Publish and Subscribe Task Panes
58. the Lifespan the longer it takes for the samples to disappear when you pause publishing M RTI Shapes Demo Domain 0 ci 2 AM RTI Shapes Demo Domain 0 at 2 Publish Publish Square Square Circle Circle Inangle Triangle Subscribe O Square Circle Triangle Reliability and Durability Example In a dynamic system you may want late joining nodes to get the data that was sent before the nodes connected to the network For example suppose you need to initialize the state of these late joining nodes and don t want to be continually sending the state just in case some node joins late The Durability QoS provides late joining nodes with the ability to get previously sent data 1 Start two copies of Shapes Demo which we will call Publisher1 and Subscriber1 If you are reusing demo windows from a previous section delete any existing publishers and sub scribers under Controls click Delete All In Publisher 1 create a circle publisher any color with Transient Local Durability Reli ability and History 200 a Under Publish click on Circle b In the Create New Publisher window e Use the drop down list box to change Durability to Transient Local e Set History to 200 e Click OK Wait for a bit In Subscriberl create a circle subscriber with Transient Local Durability Reliability and History 200 a Under Subscribe click on Circle b In the Create New Subscriber window Usethe drop
59. to use Use fiter Read TakeQ Deadline on Square error message will be displayed in the Output tab of the Subscriber demo application In Publisher1 s Controls sub panel click Pause Publishing The cyan square in Subscriber1 s canvas should freeze Note that now all the samples bor ders have the same thickness this indicates that all of them are historical data In Subscriberl select the Output tab to see messages notifying the application that the prom ised deadline of 4000 ms has been missed as seen in Figure 4 5 Click Resume Publishing The cyan squares in Subscriberl s canvas will start moving again mirroring the move ment in Publisher1 s canvas 16 Click Delete All in the Controls sub panel of each demo window 4 5 Failover Example In most mission critical systems there are failover mechanisms to handle unexpected behaviors In this exercise we combine the previous two exercises to illustrate hot failover behavior where 4 8 Failover Example Figure 4 5 Missed Deadline Name Data Type Type Color Partitions Read Take QoS Settings Square Shape Extended Pub CYAN Defaut Defaut 16 45 29 Requested deadine missed for Square 16 45 33 Requested deadine mssed for Square Select the Output tab in Subscriber1 to see the deadline missed messages the primary publisher goes down and the subscriber immediately detects the loss and starts taking data from the secondary publishe
60. ve Ownership and Strength Ownership determines whether or not the instance specified by color of the Topic is exclu sively owned by one publisher that is if multiple publishers of Red Squares can send data to this instance at the same time or not If the Exclusive check box is selected for a publisher the Strength box will become available for input The publisher with the highest Ownership Strength number is the only publisher that can write data to this instance 3 6 Publish and Subscribe Task Panes 3 3 6 2 Table 3 1 3 3 6 3 If the Exclusive check box is selected for a subscriber it means that the subscriber only wants data from one publisher the one with the highest ownership strength The publisher and subscriber must use the same setting so either check this box for both or leave it unchecked for both Otherwise their QoS are incompatible and the publisher and sub scriber will not communicate Durability Durability controls whether the publisher will store the data that it sends so that it can be sent to new subscribers that join the system later The possible settings for this QoS are LJ VOLATILE Default Data samples are not stored 1 TRANSIENT Connext DDS will attempt to store samples in memory The data will survive the data writer L TRANSIENT LOCAL Connext DDS will attempt to store samples in memory The data will not survive the data writer L PERSISTENT Connext DDS will store previously
61. will be made available to the subscriber Controlling the Read Method When creating a subscriber you can choose whether it will use read or take With read the default Connext DDS will continue to store the data in the data reader s receive queue The same data may be read again until it is taken in subsequent take calls Graphically a new sample is shown with a thicker border LI With take Connext DDS will remove the data from the data reader s receive queue The data returned by Connext DDS is no longer stored by Connext DDS 3 9 Other Controls 3 4 3 4 1 3 4 2 3 4 3 3 4 4 Other Controls The Controls sub panel includes various commands that you can use to Help control the demo Slow Down Delete All Pause Publishing Hide History Configuration Delete All This command deletes all the publishers and subscribers that have been created in the demo application All objects moving in the application window will disappear and no data will be sent or received NOTE Delete All removes all the entities but it does not destroy the partici pant The quick reset is to select Configuration Stop Start If you have started multiple copies of Shapes Demo you will need to click Delete All in each copy to delete their respective publish ers and subscribers Pause Publishing The Pause Publishing command is only effective on publishers It pauses the sending of coordi nate data for the s

Download Pdf Manuals

image

Related Search

Related Contents

Benutzerhandbuch RM-III (Teil 1)  Philips Power multiplier SPS3530C  Argosy Research Mobile Video HDD User's Manual  Olympus E-30 User's Manual  Manual de usuario PpP-Sem3  Samsung DVD-P380 User Manual  Bedienerführung 4798 - Support  Siig 2-Port FireWire 800 CardBus  

Copyright © All rights reserved.
Failed to retrieve file