Block 1: 12:00–12:50 · Distributed Systems Architecture and Communication
Distributed Networking, Web Services,
Monitoring, and Remote Management
3.1 The Distributed-Systems Difference
A distributed system contains independently executing components that communicate through channels with finite capacity, variable delay, and possible interruption. Each component observes only part of the total state. There is no instantaneous, perfectly reliable global view.
- omission: a request or response is lost;
- delay: delivery takes longer than expected;
- duplication: the same logical operation arrives more than once;
- reordering: messages arrive in a different order;
- corruption: bits or application data are invalid, despite lower-layer checks;
- partition: groups of nodes remain operational but cannot communicate;
- crash and restart: a node loses volatile state and later returns; and
- Byzantine or compromised behavior: a component returns misleading or malicious information.
3.2 Latency, Availability, and Consistency
Latency is not a constant; it is a distribution. A system that is usually fast may have a long tail caused by retransmission, radio interference, scheduling, storage, DNS, or overloaded dependencies. Report percentiles and worst observed values rather than only an average.
Availability is the fraction of time a service satisfies its defined objective. A component being powered does not make the application available. Define what operation must succeed, from where, within what time, and with what freshness.
During a network partition, a design may accept local work and reconcile later, or reject work that cannot be coordinated safely. Neither choice is universally correct. Environmental monitoring can often buffer measurements offline. Coordinated actuation may require stronger rules because conflicting commands can cause physical harm.
| Workload | Reasonable degraded mode | Important recovery question |
|---|---|---|
| Temperature monitoring | Store timestamped samples locally | How are duplicates and gaps identified after upload? |
| Dashboard display | Show last value with age and offline state | When must stale data stop being presented as current? |
| Configuration update | Reject or queue until authority is reachable | Which version wins after reconnection? |
| Irrigation command | Continue only under validated local safety policy | How are late or duplicated commands prevented? |
| Robot supervision | Enter a known-safe local state on loss of authority | How is control ownership re-established? |
3.3 Identity, Addressing, Naming, and Discovery
These concepts must not be collapsed:
- identity answers which logical device or service this is;
- address identifies a reachable network interface at a moment in time;
- name is a human- or system-meaningful reference resolved to other information;
- endpoint combines protocol, address or name, and port; and
- discovery finds currently available services and their endpoints.
A persistent identifier should remain stable when DHCP changes an address, a device moves to another network, or a service is replicated. Do not use a mutable IP address as the primary database identity. Conversely, a printed device identifier does not prove that the communicating device is authentic; cryptographic identity is a separate security property.
Discovery choices include configured endpoints, DNS, multicast DNS, service registries, and broker-based rendezvous. Static configuration is simple but difficult to change across a fleet. Multicast DNS is convenient on a local link but should not be assumed to cross routers. A registry supports dynamic systems but introduces another dependency and trust boundary.
3.4 Protocol Layers and End-to-End Diagnosis
An application message crosses several conceptual layers. Ethernet or Wi-Fi transfers frames on a local network; IP routes packets; TCP or UDP provides transport behavior; TLS can add peer authentication, confidentiality, and integrity; HTTP defines request and response semantics; the application defines resources and data meaning.
| Layer | Example evidence | Question answered |
|---|---|---|
| Link | ip -brief link | Is the interface present and administratively operational? |
| Network | ip address, ip route | Which source address and next hop will be used? |
| Naming | getent hosts api.example | What result does the configured resolver return? |
| Transport | ss, nc -vz | Is a socket listening or a TCP connection possible? |
| TLS | openssl s_client or curl -v | Which certificate and negotiation result are observed? |
| HTTP | status, headers, body | Did the request reach an HTTP application and how did it respond? |
| Application | logs, metrics, stored record | Did the intended operation occur correctly and durably? |
Success at one layer does not prove success above it. A successful ping does not prove that HTTPS is listening; a TCP connection does not prove authorization; HTTP 200 does not prove that returned sensor data are fresh or correct.
