Chapter 1: Introduction to Distributed Systems
1.1 Evolution and Definition
- Evolution: Computing began with single processors (centralized computing). As demand for processing power grew, multiprocessor systems emerged, eventually leading to distributed systems designed for high scalability and resource sharing.
- User Perspective (Tanenbaum): A collection of independent computers that appears to its users as a single, coherent system.
- Operational Perspective (Coulouris): A system in which hardware or software components located at networked computers communicate and coordinate their actions only by message passing. They do not share primary memory.
- Two Main Aspects: Hardware (autonomous machines) and Software/Middleware (provides the single-system view).
1.2 Components and Characteristics
A distributed system has three major components: Data (information retention/manipulation), Processing (handling data objects), and Presentation (user interaction).
Key Characteristics:
- Multiple Autonomous Processing Elements: Independent components with no master-slave relationship.
- Non-Shared Local Memory: Processes interact via message passing, not shared memory.
- Transparency: Conceals the geographical spread of the system, providing the illusion of a single desktop environment.
- Hidden Heterogeneity: Differences in hardware, operating systems, and network communication are hidden from the user.
- Scalability & Availability: Easy to expand and continuously available even during partial failures.
1.3 Goals of a Distributed System
To make building a distributed system worth the effort, it must meet four primary goals:
- Make Resources Accessible: Easy access to remote resources (printers, data) to promote collaboration and economics (e.g., groupware, e-commerce).
- Distribution Transparency: Hiding the complexities of distribution.
- Access: Hides differences in data representation.
- Location: Hides where a resource is physically located.
- Migration & Relocation: Hides that a resource or user has moved.
- Replication: Hides that multiple copies of a resource exist.
- Concurrency: Hides that a resource is shared by multiple competitive users.
- Failure: Hides the failure and recovery of a resource.
- Openness: The ability to interact with services from other open systems regardless of the underlying environment, usually achieved through standard rules/protocols and an Interface Definition Language (IDL).
- Scalability: The system must be scalable across three dimensions: Size (adding users/resources), Geographically (users are far apart), and Administratively (spans multiple independent organizations).
1.4 Scalability Problems and Solutions
- The Problem: Centralized services, centralized data (e.g., a single phonebook), and centralized routing algorithms create bottlenecks, leading to performance drops and complex management.
- Scaling Techniques (Solutions):
- Hide Communication Latencies: Use asynchronous communication instead of synchronous; move work to the client side (e.g., checking form entries locally).
- Distribution: Split a component into smaller parts and spread them across the system (e.g., Domain Name System - DNS).
- Replication & Caching: Copy components across the system to balance loads and increase availability. (Note: This introduces data consistency challenges).
1.5 Architectural Models
- Client-Server Model: Based on a request-reply behavior. A server implements a service, and a client requests it.
- Levels of Distribution: User-interface level, Processing level, and Data level.
- Thin Clients: Only the user interface is on the client machine.
- Fat Clients: Application processing and interface are on the client machine (harder to manage).
- Multi-tier Architecture: e.g., A 3-tier architecture where a server acts as a client to a database.
- Modern Architectures:
- Vertical Distribution: Tiers correspond directly with logical application organization (placed on different machines).
- Horizontal Distribution: Splitting clients or servers into logically equivalent parts (e.g., Peer-to-Peer systems where a node acts as both client and server).
1.6 Advantages and Challenges
Why go Distributed? (Pros):
- Resource and data sharing.
- Better price/performance ratio than centralized mainframes.
- High reliability and fault tolerance (loss of instances can be hidden).
- Incremental growth (flexibility to add, upgrade, or remove components).
Challenges (Cons):
- Difficulties in developing distributed software.
- Networking issues (lost messages, overloading).
- Security: Susceptible to Denial of Service (DoS) attacks, privacy breaches, and malicious mobile code.
- Handling Failure: Requires mechanisms for detecting, masking (e.g., retransmitting messages), tolerating, and recovering from failures, often using redundancy.
1.7 Types of Distributed Systems
1. Distributed Computing Systems (High Performance):
- Cluster Computing: Homogeneous infrastructure (similar hardware/OS), connected via LAN, utilizing a single managing/master node.
- Grid Computing: Heterogeneous infrastructure, federation of autonomous systems across multiple administrative domains, spanning WANs.
- Cloud Computing: Delivery of computing services over the internet (Pay-as-you-go). Includes IaaS (Infrastructure), PaaS (Platform), and SaaS (Software). Deployed as Public, Private, or Hybrid clouds.
2. Distributed Information Systems:
- Used for management and integration of business functions (e.g., Enterprise Application Integration - EAI).
- Distributed Transactions: Must follow ACID properties:
- Atomic: Happens completely or not at all.
- Consistent: System remains consistent after the transaction.
- Isolated: Transactions do not interfere with one another.
- Durable: Changes are saved permanently.
3. Distributed Pervasive (Ubiquitous) Systems:
- Next-generation systems utilizing small, mobile, battery-powered, wireless sensors and devices embedded in the physical world.
- Examples: Smart Home systems, Electronic Healthcare (body-area networks), and Sensor Networks.
1.8 Hardware and Software Concepts (Reading Assignment)
- Hardware:
- Multiprocessors: Share memory (e.g., bus-based, crossbar switch, omega network).
- Multicomputers: Do not share memory; communicate via message passing. Can be Homogeneous (SANs) or Heterogeneous.
- Software:
- DOS (Distributed OS): Tightly coupled, manages hardware resources, very high transparency. (Used for multiprocessors/homogeneous systems).
- NOS (Network OS): Loosely coupled, offers local services to remote clients, low transparency. (Used for heterogeneous systems/LANs/WANs).
- Middleware: An additional software layer placed on top of a NOS to provide distribution transparency, scalability, and openness (e.g., using Remote Procedure Calls - RPCs).