Distributed Systems Architectures

Architectural Styles

  • Focuses on how software components are organized and interact within a distributed system.
  • Defines components, their connections, and data exchange.
  • Component: Modular unit with defined interfaces.
  • Connector: Mediates communication between components.
  • Common styles:
    • Layered architectures
    • Object-based architectures
    • Resource-centered architectures
    • Event-based architectures

Layered Architecture

  • Components organized in layers; a layer L<em>jL<em>j calls lower-level layer L</em>iL</em>i (where i < j).
  • Upcalls to higher-level components are rare.
  • Examples include pure, mixed, and upcall layered organizations.
  • Application layering: interface, processing, and data levels.

Object-Based Architecture

  • Components are objects communicating through procedure calls, possibly across a network.
  • Objects encapsulate data and methods, exposing only interfaces (remote objects).
  • Foundation for service-oriented architectures (SOAs).
  • Services operate independently and can be composed into distributed applications.

Resource-Centered Architecture

  • Views a distributed system as a collection of resources managed by components.
  • Resources can be added, removed, retrieved, and modified remotely.
  • Widely adopted for web-based systems using Representational State Transfer (REST).
  • RESTful architectures use a single naming scheme, uniform interface, self-describing messages, and stateless execution.
  • Basic REST operations: POST (create), GET (retrieve), DELETE (delete), PUT (modify).

Event-Based Architecture (Publish-Subscriber)

  • Aims for loose coupling between processes.
  • Processes publish event notifications and subscribe to specific types of notifications.
  • Referential coupling: communication requires knowing the other process's identifier.
  • Temporal coupling: communicating processes must be running concurrently.
  • Shared data space: processes communicate through tuples in a shared space, retrieving tuples using search patterns.

Middleware Organization

  • Separates applications from underlying platforms, providing distribution transparency.
  • Important design patterns:
    • Wrappers: adapt legacy component interfaces.
      • Solutions: 1-on-1 or through a broker.
    • Interceptors: break the control flow to execute application-specific code, adapting middleware.
    • Modifiable Middleware: Adapt middleware dynamically, using component-based design to load/unload components at runtime.

System Architecture

  • Realization of a distributed system by instantiating software components on machines.
  • Can be centralized, decentralized (peer-to-peer), or hybrid.