Fundamental to any distributed system are communication patterns: point-to-point, request-reply, transactional queues, and publish-subscribe. Large distributed systems often employ two or more communication patterns. Using a single middleware that supports multiple communication patterns is a very cost-effective way of developing and maintaining large distributed systems. This talk will begin with an introduction of Data Distribution Service (DDS) – an OMG standard – that supports data-centric publish-subscribe communication for real-time distributed systems. DDS separates state management and distribution from application logic and supports discoverable data models. The talk will then describe how RTI Connext Messaging goes beyond vanilla DDS and implements various communication patterns including request-reply, command-response, and guaranteed delivery. You will also learn how these patterns can be combined to create interesting variations when the underlying substrate is as powerful as DDS. We’ll also discuss APIs for creating high-performance applications using the request-reply communication pattern.
2. Agenda
• Communication Models
• Data Distribution Service Standard
• Data-Centricity 101
– Demo
• Communication Patterns
– Request/Reply
– Guaranteed Delivery
10/11/2012 2
14. Everyday Example: Schedule Meeting via Emails
Alternative Process #1 (message-centric):
1. Email: “Meeting Monday at 10:00.”
2. Email: “Here’s dial-in info for meeting…”
3. Email: “Meeting moved to Tuesday”
4. You: “Where do I have to be? When?”
5. You: (sifting through email messages…)
14
15. Everyday Example: Schedule Meeting Using a Calendar
Alternative Process #2:
1. Calendar: (add meeting Monday at 10:00)
2. Calendar: (add dial-in info)
3. Calendar: (move meeting to Tuesday)
4. You: “Where do I have to be? When?”
5. You: (check calendar. Contains
consolidated-state)
The difference is state!
The infrastructure consolidates changes and maintains it
15
16. What’s the Difference? State.
• Objects have identity and “State” (“data”) is a
attributes
– The meeting will run 1:00– snapshot of those
2:00 in the conference room. attributes and
– My friend’s phone number is characteristics.
555-1234 his email is…
– The car is blue and is
traveling north from
Sunnyvale at 65 mph. If the infrastructure
• …whether they exist in maintains the state,
the real world, in the the application does
computer, or both not need to re-
• …whether or not we construct it…
observe or acknowledge
them
17. Why is it better to have the (data-centric)
middleware manage the state?
• Reconstructing the state of an object is hard
– Must infer based on all previous messages
– Maintaining all these messages is expensive
– Each app makes these inferences duplicate effort
• Reconstructing state is not robust
– Many copies of state may be different bugs
vs. Uniform operations on state fewer bugs
– Any missing change compromises integrity
• State awareness results in better performance
– Middleware can be smart about what to send and when
• Data-type awareness simplifies programming
– Middleware supports direct definition and instantiation of the data-
model
20. DDS Real-Time Quality of Service (QoS) Attributes
QoS Policy QoS Policy
DURABILITY USER DATA
User QoS
HISTORY TOPIC DATA
Volatility
READER DATA LIFECYCLE GROUP DATA
WRITER DATA LIFECYCLE PARTITION
Presentation
LIFESPAN PRESENTATION
Infrastructure
ENTITY FACTORY DESTINATION ORDER
RESOURCE LIMITS OWNERSHIP
Redundancy
RELIABILITY OWNERSHIP STRENGTH
Delivery
TIME BASED FILTER LIVELINESS
Transport
DEADLINE LATENCY BUDGET
CONTENT FILTERS TRANSPORT PRIORITY
41. Beyond DDS: Required Subscriptions
• DataWriter can be configured with:
– a list of required subscriptions
• Required subscriptions are named subscriptions identified by a
role name
• DataWriter must store a sample until both:
– Acknowledged by all active reliable readers
– Acknowledged by all required subscriptions
• DataReader identifies itself:
– As serving a required subscription
– Uniquely via a virtual GUID
42. Beyond DDS: Durable Subscriptions
• Concept
– It is a required subscription with durability >= TRANSIENT
– Features that allows to keep data until received by durable
subscriptions for which readers may or may not exist at
any given time
– Data is not lost even if the DataWriter crashes
• Benefits and Use Cases
• In combination with other features durable subscriptions
provides guaranteed messaging
• Requires persistence service
– To persist data
– To persist existence of durable subscriptions and their stats
43. Beyond DDS: Collaborative DataWriters
• Concept:
– Multiple DataWriters can relay samples from a common
stream (data source). The DataReaders reconstruct the
original stream and deliver to the application the complete
set of samples
• Benefits & Use cases:
– High availability and fault tolerance
• Multiple DataWriters publishing the same samples
– Load balancing and data partition
• Multiple DataWriters publishing different sets of samples from the
same source
– Scalability
• Partition across different machines and cores