Enterprise Integration Patterns
Conversation Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
HeartbeatConversation Patterns » Managing Distributed Systems

Multiple participants collaborate in a distributed system.

How one know that another participant is working properly and is ready to receive messages?

  • A central participant Could ping each system periodically in with a Asynchronous Request-Response conversation. If a valid response is returned, the component is "alive". This request would not be a "regular" request, but an out-of-band request that retrieves the component's status.
  • The disadvantage of this solution is that monitoring depends on a single component making requests, which in itself can become a point of failure. The system also sends up sending a lot of unnecessary request messages.
  • Polling the components also assumes a central monitoring entity is aware of all components' identities. In a loosely coupled system, where components come and go, this may not be a valid assumption. Components would have to register so they can be pinged.

The component supplies a Heartbeat, a series of periodic messages that indicate the component is operating well.

The Heartbeat conversation involves the following participants:

  • The Component sends periodic Heartbeat messages.
  • The Observer detects when the heartbeat is missing and triggers an alert or corrective action.

Related patterns: 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