New Distributed Systems

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/109

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:29 AM on 8/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

110 Terms

1
New cards

What is the definition of a Distributed System (textbook)?

A collection of independent, autonomous hosts connected through a communication network, coordinating exclusively by passing messages.

2
New cards

What are the 3 architectural constraints of a distributed system?

No shared memory (must use network stack), no shared clock (no global 'tick'), no shared OS (nodes run their own local OS instances).

3
New cards

Tanenbaum & Van Steen's definition emphasizes what property?

Appears to users as a single coherent system. Broken into: Autonomous (nodes fail independently) and Coherent (users don't need to know which machine handled a request).

4
New cards

What does Lamport's definition highlight?

Partial failure: 'You know you have a distributed system when the crash of a computer you've never heard of stops you from getting any work done.'

5
New cards

Why are links between nodes described as unreliable ('the sad reality')?

Unlike internal bus lines, network links have varying latency, packet loss, and network partitions - must be treated as first-class design concerns.

6
New cards

What are the 3 motivations for distribution?

Resource Sharing (hardware/software/data stores), Collaboration (sharing info across distances), Inherent Distribution (system is naturally spread out, e.g. ATMs across Namibia).

7
New cards

Why do distributed microprocessor systems outperform mainframes economically?

Low performance/price ratio (cost-effective), total power scales across many CPUs (e.g. 10,000), while mainframes are limited by single-chip cycle speed.

8
New cards

What are the reliability/growth advantages of distributed systems?

Higher Availability via redundancy (survive component failures) and Incremental Growth (scale out gradually, avoiding disruptive 'forklift upgrades').

9
New cards

What is Concurrency as a core characteristic, and why is it hard?

Components execute simultaneously across machines. Race conditions and resource contention are harder to manage than on one machine because there's no shared clock/memory - coordination requires slow, unreliable network communication instead of fast local locks.

10
New cards

Why is 'Lack of a Global Clock' a core challenge?

No global 'correct time' exists, so local timestamps can't reliably order events across machines - this is why logical/vector clocks are used to determine causality.

11
New cards

What does 'Independent Failures' mean vs a Single Point of Failure (SPOF)?

Centralized systems have one SPOF; distributed systems face partial failure - one node down while others stay healthy. Software must be 'failure-aware'.

12
New cards

What layers of Heterogeneity must a distributed system bridge?

Hardware (ARM vs x86), Operating Systems (Linux vs Windows), Networks (TCP/UDP, Fiber/Satellite/5G), Programming languages, and Data formats.

13
New cards

What is Middleware, and what forms does it take in modern architectures?

The software layer masking heterogeneity, sitting above the OS. Modern forms: API Gateways, Message Brokers, Service Meshes (Istio/Linkerd/RabbitMQ).

14
New cards

What are the 3 stages of Failure Handling?

Detection (heartbeats/timeouts find failed nodes), Masking (hide failures via retries/redundant replicas), Recovery (bring a failed node back into a consistent state).

15
New cards

What is Transparency, and why is it 'the critical concept' of distributed systems?

Concealing the physical distribution of processes/resources so users experience the system as if it were local - the core illusion goal.

16
New cards

List the 6 Types of Transparency with one example each.

Access (read local/remote files the same way, RMI/RPC/NFS); Location (use a URL not an IP); Migration (move a service between regions unnoticed); Replication (hide multiple database copies); Concurrency (hide multiple users editing simultaneously); Failure (request succeeds despite a node crash).

17
New cards

What is the difference between Vertical and Horizontal scaling?

Vertical (Scale Up): add CPU/RAM to one machine, has a physical/financial ceiling. Horizontal (Scale Out): add more nodes, preferred for web-scale, theoretically infinite growth.

18
New cards

Why should 'every centralized component be questioned'?

Centralized components (e.g. an unpartitionable SQL database, a single auth server) are both scalability bottlenecks AND Single Points of Failure (SPOFs) that threaten the entire system's reliability.

19
New cards

What defines the Client-Server architecture?

An asymmetric relationship: the Client actively initiates requests and is user-facing; the Server passively listens, manages resources, and responds.

20
New cards

What are the 3 tiers in a Multi-tier (N-tier) architecture?

Presentation Tier (UI), Application Logic Tier (business rules), Data Tier (persistent storage, SQL/NoSQL).

21
New cards

What defines Peer-to-Peer (P2P) architecture?

Decentralized - every node acts as both client and server (a 'servent'). No central authority, highly resilient to censorship/traffic spikes (e.g. BitTorrent, Blockchain).

22
New cards

What defines Microservices architecture, and what's the Ballerina strength?

System decomposed into small independent services communicating via REST/messaging; each can use a different language and scale independently. Ballerina has networking built into the language itself.

23
New cards

What technologies do Cloud-Native architectures commonly use?

Containers, Kubernetes, Service discovery, Auto-scaling, Cloud infrastructure.

24
New cards

What are the 3 Pillars from the Week 1 summary?

Abstraction (system appears as a single unit - transparency), Resilience (design for the crash - partial failure is expected), Flexibility (modular to handle heterogeneity and horizontal growth).

25
New cards

What is IPC, and why is it called 'the heart of distributed systems'?

Communication between processes over the network. It's called this because message passing is literally what makes a distributed system distributed.

26
New cards

Describe the IPC 'Island Analogy'.

Each process is an island (own address space, code, data). The OS is the bridge connecting islands. The API is the 'bridge deck' - high-level rules for data formatting, protocols, and security.

27
New cards

What are 4 reasons processes cooperate (with examples)?

Information Sharing (banking database), Computation Speedup (Google Search), Modularity/Reliability (Netflix microservices), Convenience (WhatsApp messaging).

28
New cards

Compare Shared Memory vs Message Passing (pros/cons).

Shared Memory: fast, efficient, simple - but complex synchronization, scalability limits, lock contention. Message Passing: loose coupling, safety, fault isolation - but network delays, message loss, serialization overhead. Distributed systems use message passing (e.g. Apache Kafka).

29
New cards

What are the 2 basic operations every messaging system provides?

Send(destination, message) and Receive(source, buffer). Additional (not universal) operations: Connect() and Disconnect() - e.g. UDP is connectionless.

30
New cards

List the OSI model layers (top to bottom) with example protocols.

Application (HTTP/FTP/SMTP), Presentation (TLS/SSL), Session (Sockets), Transport (TCP/UDP), Network (IP), Data Link (Ethernet/Wifi), Physical (Fiber) - 7 layers.

31
New cards

Describe the Ballerina Communication Model's send/receive process.

Send (source): message encapsulated moving down the OSI stack, converted to bits. Traverse: frames through switches (L2), packets routed (L3). Receive (destination): bits decapsulated moving up the stack until the original message is processed.

32
New cards

What 4 things identify a process/service for addressing?

Host Address (IP - identifies the machine), Port Number (identifies the specific service on that machine), Service Name (human-friendly, e.g. http/smtp/ssh), URL (protocol+host+port+path combined).

33
New cards

What are the 2 parts of every IPC message?

Header (metadata: type, source/destination ID, length, sequence number, priority) and Body (the actual payload/content).

34
New cards

Compare Direct vs Indirect communication.

Direct: process-to-process, tight coupling, usually synchronous, both must be active, moderate scalability (HTTP, gRPC, TCP). Indirect: via a broker, loose coupling, usually async, processes can run independently, high scalability (Kafka, RabbitMQ, JMS).

35
New cards

Compare Unicast vs Multicast.

Unicast: one sender to one receiver (HTTP Request, TCP Socket). Multicast: one sender to multiple receivers (service discovery, replicated systems, event notifications).

36
New cards

Why does Multicast matter? Give 4 reasons.

Replication (updating multiple servers at once), Service Discovery (finding services automatically), Event Distribution (updates to many subscribers), Fault Tolerance (keeping replicas consistent).

37
New cards

Compare Synchronous vs Asynchronous communication timing.

Synchronous: sender is blocked waiting for the reply (Send Call -> blocked -> Receive Reply unblocks). Asynchronous: sender's call is non-blocking, free to do other work while waiting for the reply.

38
New cards

What are the 3 failure scenarios in blocking IPC calls?

Indefinite Blocking (hangs forever if link fails silently), Timeout (returns an error after blocking too long, enabling recovery), Deadlock (blocking calls issued in wrong sequence, e.g. P1 waits for P2 and P2 waits for P1).

39
New cards

What are the 4 Key IPC Design Questions?

Direct or indirect? Synchronous or asynchronous? Buffered or unbuffered? Fixed-size or variable-size messages? These affect Performance, Scalability, and Reliability.

40
New cards

What is the benefit and cost of Buffering messages?

Benefit: absorbs traffic bursts, improves performance, decouples sender/receiver. Cost: additional memory usage.

41
New cards

What problem does Marshalling solve?

Applications use high-level data structures but networks only send binary bytes, and architectures differ in byte-ordering, character encoding, and numeric formats. Marshalling flattens data into a standard format (e.g. JSON) for transmission; Unmarshalling rebuilds it on the receiving end.

42
New cards

Give examples of the heterogeneity challenges marshalling addresses.

Byte-ordering: Big-endian (UNIX SPARC) vs Little-endian (Wintel). Types: ASCII vs Unicode encoding. Numeric Formats: integer sizes, floating-point, signed vs unsigned.

43
New cards

Compare Text vs Binary serialization formats.

Text (JSON, XML): human-readable, easy to debug, larger messages. Binary (Protocol Buffers, Apache Avro): smaller messages, faster processing, less readable.

44
New cards

What default ports are given for HTTP, HTTPS, MySQL, and Ballerina Service?

HTTP: 80, HTTPS: 443, MySQL: 3306, Ballerina Service: 8080.

45
New cards

Compare TCP vs UDP.

TCP: connection-oriented, reliable byte stream (used when correctness matters). UDP: connectionless, 'best-effort' datagram service - fast but unreliable.

46
New cards

How does TCP achieve reliable messaging? List 4 mechanisms.

Segmentation (large messages split into segments), Sequence Numbers (unique number per segment), Acknowledgements (three-way handshake: SYN, SYN-ACK, ACK), Retransmission (resend if no ACK before timeout).

47
New cards

What is the TCP three-way handshake, step by step?

1) Client sends SYN (requests connection, synchronizes sequence numbers). 2) Server responds SYN-ACK (acknowledges + sends its own sequence number). 3) Client sends ACK (acknowledges server's sequence). Only then is the reliable connection established.

48
New cards

What are the parts of an HTTP Request?

Request Line (command/address/version), Headers (optional metadata), Blank Line (separates headers from body), Body (optional, e.g. JSON payload).

49
New cards

Map HTTP methods to CRUD operations.

POST = Create/Insert, GET = Read/Select (never changes the resource), PUT = Update/Override, DELETE = Remove.

50
New cards

Match HTTP status codes 200, 201, 400, 401, 404, 500 to their meanings.

200 OK = Success, 201 Created = Success for POST, 400 Bad Request = Missing parameters, 401 Unauthorized = Missing authentication, 404 Not Found = Resource doesn't exist, 500 Server Error = Server-side problem.

51
New cards

What are the REST Principles?

Stateless, Cacheable, Scalable, Platform Independent.

52
New cards

What role does an API Gateway play in microservices?

Single entry point for all client requests; handles Authentication, Authorization, Rate Limiting, Logging, Caching, and Request Routing to the correct microservice.

53
New cards

What are the key characteristics of RMI (Remote Method Invocation)?

Java-specific; uses an RMI Registry to locate remote objects; works over TCP; suitable for tightly coupled systems.

54
New cards

What makes gRPC different from plain REST/HTTP?

Uses HTTP/2 for transport (multiplexed, efficient) and Protocol Buffers (binary) for serialization - smaller, faster, language-agnostic, ideal for microservices.

55
New cards

Describe the Publish-Subscribe messaging pattern.

Publishers send events to Topics (e.g. student.registered, payment.successful) via a Message Broker (e.g. Apache Kafka); Subscribers receive events. Decouples producers and consumers - they don't need to know about each other or be online at the same time.

56
New cards

What is the definition of a Distributed System (textbook)?

A collection of independent, autonomous hosts connected through a communication network, coordinating exclusively by passing messages.

57
New cards

What are the 3 architectural constraints of a distributed system?

No shared memory (must use network stack), no shared clock (no global 'tick'), no shared OS (nodes run their own local OS instances).

58
New cards

Tanenbaum & Van Steen's definition emphasizes what property?

Appears to users as a single coherent system. Broken into: Autonomous (nodes fail independently) and Coherent (users don't need to know which machine handled a request).

59
New cards

What does Lamport's definition highlight?

Partial failure: 'You know you have a distributed system when the crash of a computer you've never heard of stops you from getting any work done.'

60
New cards

Why are links between nodes described as unreliable ('the sad reality')?

Unlike internal bus lines, network links have varying latency, packet loss, and network partitions - must be treated as first-class design concerns.

61
New cards

What are the 3 motivations for distribution?

Resource Sharing (hardware/software/data stores), Collaboration (sharing info across distances), Inherent Distribution (system is naturally spread out, e.g. ATMs across Namibia).

62
New cards

Why do distributed microprocessor systems outperform mainframes economically?

Low performance/price ratio (cost-effective), total power scales across many CPUs (e.g. 10,000), while mainframes are limited by single-chip cycle speed.

63
New cards

What are the reliability/growth advantages of distributed systems?

Higher Availability via redundancy (survive component failures) and Incremental Growth (scale out gradually, avoiding disruptive 'forklift upgrades').

64
New cards

What is Concurrency as a core characteristic, and why is it hard?

Components execute simultaneously across machines. Race conditions and resource contention are harder to manage than on one machine because there's no shared clock/memory - coordination requires slow, unreliable network communication instead of fast local locks.

65
New cards

Why is 'Lack of a Global Clock' a core challenge?

No global 'correct time' exists, so local timestamps can't reliably order events across machines - this is why logical/vector clocks are used to determine causality.

66
New cards

What does 'Independent Failures' mean vs a Single Point of Failure (SPOF)?

Centralized systems have one SPOF; distributed systems face partial failure - one node down while others stay healthy. Software must be 'failure-aware'.

67
New cards

What layers of Heterogeneity must a distributed system bridge?

Hardware (ARM vs x86), Operating Systems (Linux vs Windows), Networks (TCP/UDP, Fiber/Satellite/5G), Programming languages, and Data formats.

68
New cards

What is Middleware, and what forms does it take in modern architectures?

The software layer masking heterogeneity, sitting above the OS. Modern forms: API Gateways, Message Brokers, Service Meshes (Istio/Linkerd/RabbitMQ).

69
New cards

What are the 3 stages of Failure Handling?

Detection (heartbeats/timeouts find failed nodes), Masking (hide failures via retries/redundant replicas), Recovery (bring a failed node back into a consistent state).

70
New cards

What is Transparency, and why is it 'the critical concept' of distributed systems?

Concealing the physical distribution of processes/resources so users experience the system as if it were local - the core illusion goal.

71
New cards

List the 6 Types of Transparency with one example each.

Access (read local/remote files the same way, RMI/RPC/NFS); Location (use a URL not an IP); Migration (move a service between regions unnoticed); Replication (hide multiple database copies); Concurrency (hide multiple users editing simultaneously); Failure (request succeeds despite a node crash).

72
New cards

What is the difference between Vertical and Horizontal scaling?

Vertical (Scale Up): add CPU/RAM to one machine, has a physical/financial ceiling. Horizontal (Scale Out): add more nodes, preferred for web-scale, theoretically infinite growth.

73
New cards

Why should 'every centralized component be questioned'?

Centralized components (e.g. an unpartitionable SQL database, a single auth server) are both scalability bottlenecks AND Single Points of Failure (SPOFs) that threaten the entire system's reliability.

74
New cards

What defines the Client-Server architecture?

An asymmetric relationship: the Client actively initiates requests and is user-facing; the Server passively listens, manages resources, and responds.

75
New cards

What are the 3 tiers in a Multi-tier (N-tier) architecture?

Presentation Tier (UI), Application Logic Tier (business rules), Data Tier (persistent storage, SQL/NoSQL).

76
New cards

What defines Peer-to-Peer (P2P) architecture?

Decentralized - every node acts as both client and server (a 'servent'). No central authority, highly resilient to censorship/traffic spikes (e.g. BitTorrent, Blockchain).

77
New cards

What defines Microservices architecture, and what's the Ballerina strength?

System decomposed into small independent services communicating via REST/messaging; each can use a different language and scale independently. Ballerina has networking built into the language itself.

78
New cards

What technologies do Cloud-Native architectures commonly use?

Containers, Kubernetes, Service discovery, Auto-scaling, Cloud infrastructure.

79
New cards

What are the 3 Pillars from the Week 1 summary?

Abstraction (system appears as a single unit - transparency), Resilience (design for the crash - partial failure is expected), Flexibility (modular to handle heterogeneity and horizontal growth).

80
New cards

What is IPC, and why is it called 'the heart of distributed systems'?

Communication between processes over the network. It's called this because message passing is literally what makes a distributed system distributed.

81
New cards

Describe the IPC 'Island Analogy'.

Each process is an island (own address space, code, data). The OS is the bridge connecting islands. The API is the 'bridge deck' - high-level rules for data formatting, protocols, and security.

82
New cards

What are 4 reasons processes cooperate (with examples)?

Information Sharing (banking database), Computation Speedup (Google Search), Modularity/Reliability (Netflix microservices), Convenience (WhatsApp messaging).

83
New cards

Compare Shared Memory vs Message Passing (pros/cons).

Shared Memory: fast, efficient, simple - but complex synchronization, scalability limits, lock contention. Message Passing: loose coupling, safety, fault isolation - but network delays, message loss, serialization overhead. Distributed systems use message passing (e.g. Apache Kafka).

84
New cards

What are the 2 basic operations every messaging system provides?

Send(destination, message) and Receive(source, buffer). Additional (not universal) operations: Connect() and Disconnect() - e.g. UDP is connectionless.

85
New cards

List the OSI model layers (top to bottom) with example protocols.

Application (HTTP/FTP/SMTP), Presentation (TLS/SSL), Session (Sockets), Transport (TCP/UDP), Network (IP), Data Link (Ethernet/Wifi), Physical (Fiber) - 7 layers.

86
New cards

Describe the Ballerina Communication Model's send/receive process.

Send (source): message encapsulated moving down the OSI stack, converted to bits. Traverse: frames through switches (L2), packets routed (L3). Receive (destination): bits decapsulated moving up the stack until the original message is processed.

87
New cards

What 4 things identify a process/service for addressing?

Host Address (IP - identifies the machine), Port Number (identifies the specific service on that machine), Service Name (human-friendly, e.g. http/smtp/ssh), URL (protocol+host+port+path combined).

88
New cards

What are the 2 parts of every IPC message?

Header (metadata: type, source/destination ID, length, sequence number, priority) and Body (the actual payload/content).

89
New cards

Compare Direct vs Indirect communication.

Direct: process-to-process, tight coupling, usually synchronous, both must be active, moderate scalability (HTTP, gRPC, TCP). Indirect: via a broker, loose coupling, usually async, processes can run independently, high scalability (Kafka, RabbitMQ, JMS).

90
New cards

Compare Unicast vs Multicast.

Unicast: one sender to one receiver (HTTP Request, TCP Socket). Multicast: one sender to multiple receivers (service discovery, replicated systems, event notifications).

91
New cards

Why does Multicast matter? Give 4 reasons.

Replication (updating multiple servers at once), Service Discovery (finding services automatically), Event Distribution (updates to many subscribers), Fault Tolerance (keeping replicas consistent).

92
New cards

Compare Synchronous vs Asynchronous communication timing.

Synchronous: sender is blocked waiting for the reply (Send Call -> blocked -> Receive Reply unblocks). Asynchronous: sender's call is non-blocking, free to do other work while waiting for the reply.

93
New cards

What are the 3 failure scenarios in blocking IPC calls?

Indefinite Blocking (hangs forever if link fails silently), Timeout (returns an error after blocking too long, enabling recovery), Deadlock (blocking calls issued in wrong sequence, e.g. P1 waits for P2 and P2 waits for P1).

94
New cards

What are the 4 Key IPC Design Questions?

Direct or indirect? Synchronous or asynchronous? Buffered or unbuffered? Fixed-size or variable-size messages? These affect Performance, Scalability, and Reliability.

95
New cards

What is the benefit and cost of Buffering messages?

Benefit: absorbs traffic bursts, improves performance, decouples sender/receiver. Cost: additional memory usage.

96
New cards

What problem does Marshalling solve?

Applications use high-level data structures but networks only send binary bytes, and architectures differ in byte-ordering, character encoding, and numeric formats. Marshalling flattens data into a standard format (e.g. JSON) for transmission; Unmarshalling rebuilds it on the receiving end.

97
New cards

Give examples of the heterogeneity challenges marshalling addresses.

Byte-ordering: Big-endian (UNIX SPARC) vs Little-endian (Wintel). Types: ASCII vs Unicode encoding. Numeric Formats: integer sizes, floating-point, signed vs unsigned.

98
New cards

Compare Text vs Binary serialization formats.

Text (JSON, XML): human-readable, easy to debug, larger messages. Binary (Protocol Buffers, Apache Avro): smaller messages, faster processing, less readable.

99
New cards

What default ports are given for HTTP, HTTPS, MySQL, and Ballerina Service?

HTTP: 80, HTTPS: 443, MySQL: 3306, Ballerina Service: 8080.

100
New cards

Compare TCP vs UDP.

TCP: connection-oriented, reliable byte stream (used when correctness matters). UDP: connectionless, 'best-effort' datagram service - fast but unreliable.