Knowledgebase

Designing Communication Between Components Print

  • softwareengineering, software, guide, howto, solution, zillionkinghost, hosting, support
  • 0

How parts interact.

WHAT SYNCHRONOUS COMMUNICATION IS

A caller waits for a response.

What it provides: simplicity, and an immediate result.

What it costs: the caller is affected by the callee's availability and latency.

WHAT ASYNCHRONOUS COMMUNICATION IS

A message sent, processed later.

What it provides: decoupling, resilience to temporary failure, and absorbing load spikes.

What it costs: complexity, and no immediate result.

WHAT A QUEUE PROVIDES

Work accepted now, performed later, with retries.

WHAT EVENTS PROVIDE

Components reacting to things that happened, without the publisher knowing who listens.

WHY THAT MATTERS

New consumers can be added without changing the publisher.

WHAT IT COSTS

Difficulty tracing what happens as a result of an action.

WHAT TO ALWAYS HANDLE

Messages arriving twice Messages arriving out of order Messages that cannot be processed

WHAT TO DO ABOUT THE FIRST

Make processing safe to repeat.

WHY

Delivery guarantees almost always permit duplicates.

WHAT TO DO ABOUT THE THIRD

A holding area for failed messages, monitored.

WHAT TO DEFINE

The message format, and how it is versioned.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot