Enterprise Integration Patterns
Conversation Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Scatter-GatherConversation Patterns » Intermediaries

A participant requires a responses from a number of participants.

How can a participant solicit responses from a number of participants without connecting to all of them?

  • A participant may want responses from multiple partners, for example top select the best offer.
  • A participant may not be aware of all partners who can respond to its request.
  • Sending requests to each partner can introduce complexity and overhead.

A Scatter-Gather propagates a request to multiple providers and aggregates the responses.

The Scatter-Gather conversation involves the following participants:

  • The Requestor initiates the conversation by sending a Request message to the Provider
  • The Scatter-Gather waits for incoming requests, which it relays to a (known or unknown) number of Providers. It also processes Response messages from Providers.
  • The Providers wait for incoming Request messages and respond with Response messages.

Scatter-Gather is the conversational view of the asynchronous Scatter-Gather. Instead of using an asynchronous flow of messages, it engages with both the Requestor and the Providers in a Asynchronous Request-Response conversation. A stateful Scatter-Gather can simplify the role of the Aggregator in Scatter-Gather.

Most Scatter-Gather do not make requests to the Providers sequentially, but concurrently.

Internet commerce commonly uses Scatter-Gather in form of so-called "aggregators" when purchasing products or services. Unfortunately the name collides with the Aggregator pattern, which is only a portion of the solution. These "aggregators" are a powerful economic force because they typically have a high search page rank, which gives them more search traffic than the actual providers. For example, Internet searches for "insurance" will likely have an insurance aggregator as the top listing. Such business provide a benefit to the consumer (the Requestor in our vocabulary) as it selects the best deals or orders all offers by price. Providers are commoditized in this process, meaning the Requestor does not distinguish the selection by the brand of the Provider or the product details, but only selects by price. This puts Providers under economic pressure and often increases the power of the Scatter-Gather, which often translates into higher commissions being paid from the Provider to the Scatter-Gather.

The Requestor has to trust the Scatter-Gather to ask the "right" Providers and to select the "best" result neutrally and in the best interest of the Requestor.

Example: Check24

Check24 is a popular German Internet portal that aggregates offers for many products and services, including insurance, banking, utilities, mobile phones, and travel.

Related patterns: Aggregator, Scatter-Gather, Asynchronous Request-Response

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