1 / 56

Mastering Rational Rose RealTime Distributed Models and Connexis

Mastering Rational Rose RealTime Distributed Models and Connexis. Objectives. Describe the importance of user-defined unwired ports Describe the communication service offered by the RTS layer Describe the main features and services available through Connexis. Topics. Distribution Overview

ramla
Download Presentation

Mastering Rational Rose RealTime Distributed Models and Connexis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mastering Rational Rose RealTimeDistributed Models and Connexis

  2. Objectives • Describe the importance of user-defined unwired ports • Describe the communication service offered by the RTS layer • Describe the main features and services available through Connexis

  3. Topics • Distribution Overview • Dynamic Connections • Connexis

  4. Processor 2 T e T a T c T d T b Process 1 Process 2 T x Process 1 Challenges of Distribution • Message (format, data type, encoding, ...) • Transport (TCP, UDP, RPC, shared memory, ...) • Addressing (reliability and high availability) • Performance Processor 1

  5. Distributed Applications • Many nodes • Ethernet, backplanes, and more Administration Call Server Shelf Controller H/W Control ... COTS Server e-Infrastructure Element

  6. Distribution Open socket. Establish connection. Receive msg to transmit. Encode and send msg. Processor 1 Processor 2 Capsule A Capsule B Open Socket. Establish connection. Listen. Decode msg framing. Decode msg header and data. Forward msg to destination.

  7. Rose RealTime Generated Application Capsule A Capsule B portX portY Wired ports Wired Port Communication • Wired ports are defined at design time • Wired connections are created and destroyed with the capsule instance

  8. Topics • Distribution Overview • Dynamic Connections • Connexis

  9. Unwired ports Unwired Port Communication Unwired ports are: • Used to model dynamic communication channels • Registered or bound to other unwired ports • Dynamically connected at run time instead of at design time • Used for modeling client/server designs where a service is shared by a large number of clients Rose RealTime Generated Application Capsule A Capsule B portX portX

  10. Internal Layer Service Internal Layer Service (ILS) The Internal Layer Service (ILS) is used to: • Connect unwired ports within the same executable or instance of the Target RSL • Register ports locally • Establish connections between local unwired ports (called “bindings”) Rose RealTime Generated Application Capsule A Capsule B portX portX portx.pong().send(); portX.ping().send();

  11. Publisher-Subscriber Pattern • For a given service, there is: • One server, the publisher • Many clients, the subscribers • The service is uniquely identified by name • All subscribers are bound to the first publisher registered for binding under that name • Subscribers will be registered with the publisher up to the maximum replication factor of that publisher

  12. No Publisher Available • If no publisher exists, the subscriber registrations are queued (in order) waiting for the publisher to register • Subscribers not bound continue to be queued until an instance of the publisher becomes available due to one of the following: • A subscriber deregistering • A publisher with a larger multiplicity registering • The publisher resizing

  13. Published vs. Unpublished Ports • Service Access Point (SAP) • A term used to describe an unwired port that is participating in a connection as the subscriber (or client) • SAPs always have a maximum cardinality of 1 • Service Provision Point (SPP) • A term used to describe an unwired port that is participating in a connection as the publisher (or server) • SPPs typically have a cardinality of N > 1

  14. Registering Unwired Ports • Unwired ports can be registered in two ways: • Automatic registration - using information contained in the “Registration override” box • Application registration - by the application developer

  15. Automatic Registration Registration is attempted using the name provided in the “Registration override” box. If no text has been entered into the “Registration override” field, the port will be registered under its own name with the ILS. Registration is attempted once at startup. Application Registration Port registration must be handled by the application code. The “Registration override” box is ignored. Registration is done at run time when the application calls a communication service operation. Automatic vs. Application Registration

  16. Registration String • A registration string is used to identify a unique name and service under which subscribers and publishers will connect. • The string has the following format: [[[<service_name>]:][//<IP address>]/]<registration_name> If the service name is not provided, Rose RealTime defaults to the Internal Layer Service (ILS). • Here are some examples: • name • service1:name • service2:name • service3://address/name

  17. Scenario: Publisher Registers with the ILS • port2 is registered with ILS • Two subscribers, port1 and port3, attempt to make connections to the publisher • port1 connects to port2 because port2 has been registered with the ILS • Only capable of connecting ports locally • port3 fails to connect to port2 because port3 is attempting to connect using the ILS • Only capable of connecting ports locally

  18. Topics • Distribution Overview • Dynamic Connections • Connexis • Adding Connexis Support • Locator Services • Connexis Viewer • Distributed Design Using Connexis

  19. C++ Introducing Connexis Connexis: A software development framework that extends Rational Rose RealTime and lets you model, build, deploy, and visualize distributed, embedded applications

  20. C++ Connexis Benefits • Integrated with the Rose RealTime toolset • Full life cycle • Supports patterns for creating high-availability applications • Allows designers to focus on building revenue-generating features, not distribution code

  21. C++ Processor 1 Processor 2 Capsule A Capsule B PingPong PingPong Distribution With Connexis • Communication infrastructure • Connection status and tracing • Fault tolerance • Flexible transports • UDP/IP • TCP/IP

  22. C++ Connexis Architecture Rose RealTime Model Connexis Viewer Connexis Locator DCS Transport Target Agent Connexis Architecture Control Data

  23. C++ Connexis Architecture (cont.) UML Model Locator Service Distributed Connection Service Transport Control Data Control Paths - components involved in registering and deregistering endpoints Data Path - data passes through Transport component

  24. C++ Connexis Capsules • Development Configurations • RTDBase_Agent • RTDBase_Locator_Agent • Production Configurations • RTDBase • RTDBase_Locator

  25. C++ Establishing Connexis Connections • Local connections • Explicit endpoint connections • Locator connections The connection method is determined at run-time by the registration string used when the port is registered with the Target Run-Time Services Library

  26. C++ Connexis Customization • Configure connection audits • Adjust buffer counts and sizes • Adjust thread priorities and stack sizes • Adjust message delivery timing characteristics

  27. C++ Topics • Distribution Overview • Dynamic Connections • Connexis • Adding Connexis Support • Locator Services • Connexis Viewer • Distributed Design Using Connexis

  28. C++ Adding Connexis Support to a Model Adding Connexis support to a model involves the following steps: • Sharing the Connexis packages • Configuring a model for Connexis • Adding the appropriate port registration code • Initializing the Connexis capsule role • Configuring a component for Connexis • Adding Connexis command-line arguments

  29. C++ Sharing the Connexis Packages • Connexis functionality is defined in a set of packages that must be shared into your model • The Connexis > Share Connexis Packages option under the Tools menu helps you to quickly include all Connexis elements

  30. C++ Configuring a Capsule for Connexis • Select Configure Capsule for Connexis from a capsule’s context menu.

  31. C++ Adding the Appropriate Port Registration Code • Connexis uses unwired ports • Unwired ports must be registered with the Connection Service by automatic or application registration • The registration string determines how the connection is established with Connexis

  32. C++ Initializing the Connexis Capsule Role • The Connexis capsule role in the application must be initialized before any ports can be registered with it • The recommended approach for ensuring this is to subscribe to the RTDInitStatus publisher on the Connexis capsule and wait for the rtBound event The subscriber port can be created and configured by selecting DCS Initialization and Control Port in the Configure Capsule for Connexis dialog box

  33. C++ Configuring a Component for Connexis • Select Connexis >Configure Component from a component’s context menu to create a component dependency to a DCS library.

  34. C++ Adding Connexis Command Line Arguments • Several Connexis command-line options allow for configuring how an application behaves relating to Connexis • Can be added to the Parameters box in a Component Instance Specification or when starting the application from the command-line

  35. C++ Topics • Distribution Overview • Dynamic Connections • Connexis • Adding Connexis Support • Locator Services • Connexis Viewer • Distributed Design Using Connexis

  36. C++ The Locator Service • Locator Service maintains a registry of publishers and subscribers and matches them. • Benefits: • Allows dynamic modification of the network topology • Load sharing, backup services

  37. C++ Locator Service • Allows endpoint locations to remain transparent to the application • Can be used to find a service anywhere in the distributed application • Finds appropriate endpoints and feeds them back to the connection service

  38. C++ Locator Registration Examples Example 1: Basic Locator registration • Publisher:<port_name>.registerSPP("dcs:/service1"); • Subscriber:<port_name>.registerSAP("dcs:/service1"); Example 2: Custom ranking • Publisher:<port_name>.registerSPP("dcs:/service1 (locator_rank, 1)"); Example 3: Specifying the protocol • Subscriber:<port_name>.registerSAP("dcs:/service1 (locator_transport, crm)");

  39. C++ Scenario: Publisher Registers with the Locator

  40. C++ Topics • Distribution Overview • Dynamic Connections • Connexis • Adding Connexis Support • Locator Services • Connexis Viewer • Distributed Design Using Connexis

  41. C++ Connexis Viewer • Examines connection status in realtime • Sees published services and subscriptions • Traces publishers, subscribers, transport, and locator events • Filters information • Sees applications in one or multiple instances • Collects and display metrics

  42. C++ Connexis Viewer: Actual View

  43. C++ Connexis Viewer: Tree Object Definitions Session Publisher Processor (from the Model) Subscriber (Bound) Processor (User defined) Subscriber (Unbound) Component Instance (from the Model) Bound Connection Filter (Active) Component Instance (User defined) Filter (Inactive) Named Service Waiting for Target Inactive Active Disconnected Component Instance “States”:

  44. C++ Virtual Circuits Virtual circuits represent the Connexis connections that are currently established in the running model Indicates that the Ping capsule has a pingPong subscriber port registered with the “pingpong” service Indicates that the Pong capsule has a pingPong publisher port registered with the “pingpong” service and 1 out of 1 of its instances are connected Represents the virtual circuit (actual connection) between the Ping and Pong capsules

  45. C++ Trace Windows • Event tracing is available on component instances, port references, and virtual circuits • Trace filters can be defined, saved, and applied easily

  46. C++ Metrics Service The Metrics Service collects real-time DCS performance information for a component instance, which can then be used to tune the application

  47. C++ Adding Viewer Support to a Model • The Viewer communicates with the executing model through the Target Agent using the Connexis endpoint (CNXep) • To include the Target Agent in the executable, select Target Agent (Viewer Debugging) in the Configure Connexis Capsule dialog box

  48. C++ Topics • Distribution Overview • Dynamic Connections • Connexis • Adding Connexis Support • Locator Services • Connexis Viewer • Distributed Design Using Connexis

  49. C++ Connexis and High Availability • Redundant Locator Service • Automatic switching to backup service publishers • Load sharing between publishers • Automatically handle overflow situations • Configurable transport audits

  50. C++ Patterns for High-Availability Shelf Controller Device Primary Locator Primary Locator Backup Locator Backup Locator

More Related