1/109
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
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.
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).
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).
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.'
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.
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).
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.
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').
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.
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.
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'.
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.
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).
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).
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.
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).
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.
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.
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.
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).
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).
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.
What technologies do Cloud-Native architectures commonly use?
Containers, Kubernetes, Service discovery, Auto-scaling, Cloud infrastructure.
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).
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.
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.
What are 4 reasons processes cooperate (with examples)?
Information Sharing (banking database), Computation Speedup (Google Search), Modularity/Reliability (Netflix microservices), Convenience (WhatsApp messaging).
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).
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.
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.
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.
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).
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).
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).
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).
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).
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.
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).
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.
What is the benefit and cost of Buffering messages?
Benefit: absorbs traffic bursts, improves performance, decouples sender/receiver. Cost: additional memory usage.
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.
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.
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.
What default ports are given for HTTP, HTTPS, MySQL, and Ballerina Service?
HTTP: 80, HTTPS: 443, MySQL: 3306, Ballerina Service: 8080.
Compare TCP vs UDP.
TCP: connection-oriented, reliable byte stream (used when correctness matters). UDP: connectionless, 'best-effort' datagram service - fast but unreliable.
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).
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.
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).
Map HTTP methods to CRUD operations.
POST = Create/Insert, GET = Read/Select (never changes the resource), PUT = Update/Override, DELETE = Remove.
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.
What are the REST Principles?
Stateless, Cacheable, Scalable, Platform Independent.
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.
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.
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.
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.
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.
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).
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).
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.'
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.
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).
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.
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').
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.
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.
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'.
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.
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).
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).
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.
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).
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.
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.
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.
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).
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).
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.
What technologies do Cloud-Native architectures commonly use?
Containers, Kubernetes, Service discovery, Auto-scaling, Cloud infrastructure.
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).
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.
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.
What are 4 reasons processes cooperate (with examples)?
Information Sharing (banking database), Computation Speedup (Google Search), Modularity/Reliability (Netflix microservices), Convenience (WhatsApp messaging).
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).
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.
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.
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.
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).
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).
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).
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).
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).
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.
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).
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.
What is the benefit and cost of Buffering messages?
Benefit: absorbs traffic bursts, improves performance, decouples sender/receiver. Cost: additional memory usage.
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.
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.
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.
What default ports are given for HTTP, HTTPS, MySQL, and Ballerina Service?
HTTP: 80, HTTPS: 443, MySQL: 3306, Ballerina Service: 8080.
Compare TCP vs UDP.
TCP: connection-oriented, reliable byte stream (used when correctness matters). UDP: connectionless, 'best-effort' datagram service - fast but unreliable.