Section 8.3

Distributed Systems & Middleware Architectures

Network services, document middleware, stateful distributed file systems, remote object invocations, and generative coordination tuple spaces.

8.3.1 & 8.3.2 Network Hardware, Services & Layering

A distributed system consists of autonomous computing nodes communicating over a shared network fabric that presents itself to users as a single coherent system. The operating system kernel abstracts physical networking hardware (Ethernet switches, fiber transceivers, network interface controllers) into layered software protocol stacks.

Layered Network Model

Layer Primary Protocol Example Responsibility
Application Layer HTTP, NFSv4, SSH Provides user-facing application semantics and distributed services.
Middleware Layer RPC, gRPC, CORBA, Linda Provides transparency: hides location, migration, and failure boundaries.
Transport Layer TCP (stream), UDP (datagram) End-to-end reliability, sequence ordering, flow control, and port multiplexing.
Network Layer IP (IPv4, IPv6) Host addressing, routing packets across multiple autonomous hops.
Data Link & Physical Ethernet (802.3), Wi-Fi (802.11) Frame framing, hardware MAC addressing, and physical signal transmission.

8.3.3 Document-Based Middleware & The Web

The World Wide Web constitutes the most widespread distributed document system. Operating systems interface with Web middleware through standard socket libraries, organizing data around Uniform Resource Identifiers (URIs) and the HyperText Transfer Protocol (HTTP).

HTTP Protocol Evolution

8.3.4 File-System-Based Middleware: NFS & AFS

A distributed file system provides client transparent access to files physically stored on a remote server. The Virtual File System (VFS) interface abstracts whether a file resides on local ext4 storage or a remote server.

NFSv3 (Stateless) vs. NFSv4 (Stateful Leases)

Architecture Dimension NFSv3 NFSv4
Server State Stateless: Server stores zero client session state across calls. Stateful: Server maintains client open/close state, file locks, and leases.
RPC Round-Trips Chatty: LOOKUP, OPEN, READ require separate RPCs. Compound RPCs: Multiple operations combined into one network exchange.
Caching & Consistency Attribute timeouts (typically 3–30s); stale data hazards. Server-issued File Delegations; server notifies client on conflicting writes.
Crash Recovery Trivial: Clients simply retransmit idempotent requests. Lease reclamation grace periods upon server reboot.
NFSv3: Sequential Chatty RPCs Client Server 1. LOOKUP(path) Reply(file handle) 2. ACCESS(permissions) Reply(allowed) 3. READ(offset, len) Reply(data) NFSv4: Single Compound RPC Client Server COMPOUND [LOOKUP + OPEN + READ] COMPOUND_REPLY [Handle + Lease + Data] 1 Round-Trip Latency vs. 3 Round-Trips! Figure 8-5: NFSv3 Sequential Chatty RPCs vs. NFSv4 Batched Compound RPC.
Interactive NFS Round-Trip Latency Simulator

Simulate opening and reading a file over a high-latency WAN connection (Round-Trip Time RTT = 40 ms):

Simulation status: Idle • Elapsed Time: 0 ms • Packets Exchanged: 0
-- Select an NFS protocol version to observe wire latency --

8.3.5 & 8.3.6 Object-Based & Coordination-Based Middleware

Object-Based Middleware

Extends object-oriented programming across networks. A local client holds a proxy object (stub) that exposes identical method signatures to a local interface. Method calls trigger remote object invocations across a network broker (e.g., Java RMI, CORBA).

Coordination-Based Middleware: Linda Tuple Spaces

Pioneered by David Gelernter (1985), the Linda Tuple Space provides a completely different coordination paradigm based on Generative Communication. Processes coordinate by depositing and extracting structured data records called tuples into a shared, distributed, globally associative memory space.

Decoupling Dimensions

The Four Linda Primitives

Primitive Operation Type Behavior
out(t) Deposit Evaluates tuple t and deposits it into the shared tuple space.
in(s) Consume & Remove Searches space for a tuple matching template s. Removes it. Blocks if no match exists.
rd(s) Read Non-Destructively Searches space for a tuple matching template s. Returns copy. Blocks if no match exists.
eval(t) Fork / Compute Spawns active thread to evaluate fields in t concurrently; converts to passive tuple on exit.
Interactive Linda Tuple Space Sandbox

Deposit, inspect, and extract associative data tuples from a simulated distributed tuple pool:

Active Shared Tuple Space:
("config", "max_threads", 8) ("worker", 0, "online")
-- Tuple space initialized with baseline metadata --