Skip to main content
Distributed Systems Architectures
  1. Notes/

Distributed Systems Architectures

Architectures in distributed systems describe how components are connected, how data is exchanged, and how servers and clients coordinate. The chosen architecture directly influences fault-tolerance, consistency guarantees, latency profiles, and scalability patterns.

Architectures

Key Concepts

  • Connector: The mechanism for communication and coordination between components (e.g., RPC framework, message queue, shared memory, HTTP). The choice of connector constrains latency, ordering guarantees, congestion control, and fault semantics.
  • Idempotent: An operation is idempotent if executing it once has the same effect as executing it multiple times. This is critical in unreliable networks where retries are common. Example: PUT overwriting a value is idempotent; POST appending to a log is not. Idempotency enables retry-on-failure without introducing divergence in replicated state machines.
  • Shared Data Space: A persistent coordination medium (e.g., tuple space, shared database, or distributed key-value store) that allows components to interact indirectly without direct coupling. This is common in systems requiring eventual consistency or blackboard-style coordination.

1. Traditional / Layered Architectures

  • Organize functionality into layers, typically:
    • Application Interface Layer (UI): User interaction and presentation.
    • Processing Layer: Query formulation, logic execution, business rules.
    • Data Layer: Database or storage backend.
  • Communication style is synchronous request-response.
  • Tightly coupled: changes in one layer can cascade through other layers.
  • Scalability is weak due to vertical integration and cross-layer dependencies.
  • Suited for monolithic systems with clear, rigid separation of responsibilities.

2. Object Style Architecture

  • Components are modeled as objects with encapsulated state and behavior.
  • Interactions occur through procedure calls (often synchronous).
  • More decoupled than layered style, facilitating modular development and replacement of components.
  • Supports parallel and distributed execution across multiple servers.
  • Organization tends to be horizontal: scaling is achieved by instantiating additional objects across nodes.
  • Provides natural encapsulation boundaries for fault isolation, but RPC overhead can become a bottleneck if not optimized.

3. RESTful Architecture

  • Organized around resources identified by unique URIs.
  • Core HTTP methods:
    • GET – Retrieve a resource.
    • POST – Create a new resource.
    • PUT – Update or replace an existing resource.
    • DELETE – Remove a resource.
  • Stateless: each request includes all necessary information, allowing servers to remain sessionless.
  • Scalability is excellent since any server can handle any request without dependency on past interactions.
  • Best suited for web APIs, microservices, and large-scale service-oriented architectures.

4. Publish-Subscribe (Pub-Sub) / RTPS

  • Asynchronous communication pattern: publishers emit events, subscribers consume them.
  • One event may have many subscribers, supporting broad dissemination.
  • Topics define communication channels, typically characterized by triples: (name, datatype, quality-of-service).
  • Supports persistence: new subscribers can receive historical messages (e.g., durable subscriptions).
  • Well-suited for real-time and reactive systems requiring scalability and loose coupling.
  • Peer-to-peer topology enables distributed scaling, but requires careful fault-tolerance strategies (e.g., replicated brokers, gossip protocols).

Architecture Comparison

AspectLayeredObject-StyleRESTfulPub-Sub
DependencyCoupledDecoupledDecoupledDecoupled
CommunicationSyncSyncHTTP (sync)Async
ScalabilityWeakGood (parallelism)ExcellentGood (distributed)
State Mgmt.Layer-specificObject encapsulatedStatelessMinimal state
Shared DataNoPossibleStateless sharedYes
OrganizationVerticalHorizontalHorizontalPeer-to-peer
Best ForSimple apps with clear tiersModular object-based systemsWeb services, APIsEvent-driven, real-time distributed systems

Computer Vision

Overview of Computer Vision

Overview of Computer Vision

Core concepts in computer vision and machine learning

cv ml
History of Computer Vision

History of Computer Vision

How computer vision evolved through feature spaces

cv
ImageNet Large Scale Visual Recognition Challenge

ImageNet Large Scale Visual Recognition Challenge

ImageNet's impact on modern computer vision

cv ml
Region-CNNs

Region-CNNs

Traditional ML vs modern computer vision approaches

ml cv

Distributed Systems

Overview of Distributed Systems

Overview of Distributed Systems

Fundamentals of distributed systems and the OSI model

distributed-systems
Distributed Systems Architectures

Distributed Systems Architectures

Common design patterns for distributed systems

distributed-systems
Dependability & Relevant Concepts

Dependability & Relevant Concepts

Reliability and fault tolerance in distributed systems

distributed-systems
Marshalling

Marshalling

How data gets serialized for network communication

distributed-systems
RAFT

RAFT

Understanding the RAFT consensus algorithm

distributed-systems
Remote Procedural Calls

Remote Procedural Calls

How RPC enables communication between processes

distributed-systems
Servers

Servers

Server design and RAFT implementation

distributed-systems
Sockets

Sockets

Network programming with UDP sockets

distributed-systems

Machine Learning (Generally Neural Networks)

Anatomy of Neural Networks

Anatomy of Neural Networks

Traditional ML vs modern computer vision approaches

ml cv
LeNet Architecture

LeNet Architecture

The LeNet neural network

ml cv
Principal Component Analysis

Principal Component Analysis

Explaining PCA from classical and ANN perspectives

data ml

Cryptography & Secure Digital Systems

Symmetric Cryptography

Symmetric Cryptography

covers MAC, secret key systems, and symmetric ciphers

cryptography
Hash Functions

Hash Functions

Hash function uses in cryptographic schemes (no keys)

cryptography
Public-Key Encryption

Public-Key Encryption

RSA, ECC, and ElGamal encryption schemes

cryptography
Digital Signatures & Authentication

Digital Signatures & Authentication

Public-key authentication protocols, RSA signatures, and mutual authentication

cryptography
Number Theory

Number Theory

Number theory in cypto - Euclidean algorithm, number factorization, modulo operations

cryptography
IPSec Types & Properties

IPSec Types & Properties

Authentication Header (AH), ESP, Transport vs Tunnel modes

cryptography