Enterprise Integration Patterns
Conversation Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Introduction to Basic ConversationsConversation Patterns » Basic Conversations

Once two or more parties have detected their respective conversation partners and negotiated a connection, they can begin the "real" conversation. Frequently, the initial steps of setting up a conversation are handled by the infrastructure or a lower-level protocol, so that this part of the conversation is sometimes called the application-level conversation in contrast to the infrastructure-level conversation, which deals with the aspects of the conversation that are needed, but do not support the conversation partners in exchanging application-level information.

Basic conversations consist of two conversation partners, the service consumer and the service provider. They engage in a variety of conversation patterns, which differ in the following design aspects:

  • Unidirectional vs. bidirectional. Some conversations need to transmit information only in one direction, while others need to transmit information back and forth between the conversation partners.
  • Asynchronous Messages. Even in bidirectional information exchanges, a conversation partner may not expect to receive unsolicited asynchronous messages, but receives messages only as responses to requests it makes, i.e. synchronously.
  • Single or Multi-Message. In the extreme case, a conversation consists only of a single message, while most conversation consist two or any number of messages.
  • Explicit vs. Implicit Termination. Some conversations have a natural ending point. For example Request-Response always ends after the response message. Other conversations, such as Subscribe-Notify, keep on exchanging messages until the conversation is explicitly terminated.
  • Error Conditions. Simple conversations differ in the way they deal with error conditions. For example, they may retry actions or simply ignore errors.
PatternDirectionAsynchronousMulti-MessageTerminationError Handling
Fire-and-Forgetunidirectionalprovidersingleimplicitnone
Asynchronous Request-Responsebidirectionalprovidertwoimplicitnone
Request-Response with Retrybidirectionalprovidermultipleimplicitretry
Pollingbidirectionalprovidermultipleimplicitnone
Subscribe-Notifybidirectionalconsumer & providermultipleexplicitnone
Quick Acknowledgmentbidirectionalproviderthreeimplicitnone

The conversation patterns in this chapter can stand on their own, but are also frequently combined into larger conversations. As such they form an important vocabulary to more easily describe complex conversations.



Introduction
Overview
Preface
Table of Contents
Introduction
Describing Conversations
Choreography
Orchestration
Hypermedia State
Conversation Vocabulary
Discovery
Dynamic Discovery
Advertise Availability
Consult Directory
Referral
Leader Election
Starting a Conversation
Three-Way Hand Shake
Acquire Token First
Rotate Tokens
Verify Identity
User Grants Access
Basic Conversations
Fire-and-Forget
Asynchronous Request-Response
Request-Response with Retry
Polling
Subscribe-Notify
Quick Acknowledgment
Intermediaries
Proxy
Relay
Load Balancer
Scatter-Gather
Managing Distributed Systems
Heartbeat
Resource Management
Incremental State Build-up
Lease
Renewal Reminder
Ensuring Consistency
Ignore Error
Compensating Action
Tentative Operation
Coordinated Agreement
Appendices
Bibliography