Distributed Systems Architecture: Sync/Async vs Coupled/Decoupled

Two fundamental dimensions that help categorize and understand distributed system architectures

And on a pragmatic level, help feasibly integrate the IT Landscapes, made of many separate products.

Right path is not the easy one
The right path is not the easy one

Synchronous vs Asynchronous

This dimension refers to how components interact over time:

Synchronous Communication

  • The caller waits for a response before continuing
  • Blocking operations
  • Example: HTTP request/response, RPC calls
  • Real-time guarantee but potential for increased latency

Asynchronous Communication

  • The caller continues execution without waiting for a response
  • Non-blocking operations
  • Example: Message queues, event streaming, webhooks
  • Better responsiveness, but requires additional complexity for handling responses

Coupled vs Decoupled

This dimension refers to how aware components are of each other:

Tightly Coupled

  • Components have direct knowledge of each other
  • Changes to one component often require changes to others
  • Example: Direct API calls between services
  • Simpler to implement but less resilient to changes

Loosely Decoupled

  • Components have minimal knowledge of each other
  • Changes to one component rarely affect others
  • Example: Event-driven architecture, publish-subscribe patterns
  • More flexible but increased design complexity

A table always helps

Coupled Decoupled
Synchronous
  •  Direct API calls between services
  •  RPC (Remote Procedure Calls)
  • Simple but brittle
  • High dependency between components
  • Service mesh with synchronous communication
  • Service discovery patterns
  • Circuit breakers
  • API gateways
Asynchronous
  • Callbacks
  • Webhooks
  • Response futures/promises
  • Better performance while maintaining direct dependencies
  • Event-driven architecture
  • Publish-subscribe patterns
  • Message queues
  • Maximum flexibility and resilience

Logical Architecture Concerns

This categorisation (sync/async vs coupled/decoupled) primarily addresses logical architecture concerns rather than physical architecture concerns. These dimensions focus on:

  • How components interact and communicate
  • The dependencies between components
  • The flow of control and data
  • The relationships and boundaries between services/components

Physical Architecture Concerns

In contrast, physical architecture would focus on:

  • Infrastructure and deployment patterns (servers, containers, VM’s)
  • Network topology
  • Geographic distribution
  • Hardware specifications
  • Data centre organisation

In Conclusion

The sync/async and coupled/decoupled dimensions inform design choices about component interactions and relationships, which are logical architecture decisions. These logical choices will ultimately influence physical architecture decisions (like whether you need message brokers or load balancers), but they exist at a higher level of abstraction.

That said, these logical architecture decisions do have implications for your physical architecture implementation. For instance, a decoupled, asynchronous system might require message brokers and event stores as physical components.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.