Enterprise Integration Patterns
Conversation Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Advertise AvailabilityConversation Patterns » Discovery

A participant is able to receive messages in a conversation initiated by another participant.

How can a participant let others know that it is available?

  • Central services for discovery are bound to get out of sync with reality, e.g. because obsolete services do not de-register.
  • Centralized administration may result in a single point of failure and in delays in registering live services.
  • Dynamic Discovery can flood the network with requests if new conversations start frequently or when initiators join networks frequently.
  • The number of available providers is often small compared to the number of initiated conversations.

Participants periodically broadcasts their existence to potential initiators.

The Advertise Availability conversation involves the following participants:

  • The Providers periodically broadcast Available messages to any available Initiators.
  • The Initiator listens to Available messages. When the Initiator is ready to engage in a conversation it uses the stored Available messages to determine the appropriate conversation partner and initiates the conversation directly.

Advertise Availability works best when initiators are long-lived so that they can track broadcast availability messages before they need to start a conversation. This allows keeping the broadcast frequency low, thus reducing bandwidth consumption.

Advertise Availability also works well where initiators enter new environments where they have no information at all and should not start flooding the network with requests. Advertise Availability allows them to listen in without affecting the network until they decide to initiate a conversation.

Example: WiFi Hotspots

Wireless network access points (aka "Hot Spots") broadcast their availability regularly for new devices that came into range to discover them.

Example: Simple Service Discovery Protocol (SSDP)

The UPnP (Universal Plug and Play) stack includes a registry-free mechanism for service discovery called Simple Service Discovery Protocol (SSDP). SSDP uses the HTTP Asynchronous Request-Response protocol over a UDP datagram transport, which can broadcast packages on a local sub-network. Participants announce their presence (or their intention to disappear) via the HTTP verb ""NOTIFY""to a multicast group of other participants.

Related patterns: Dynamic Discovery, 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