Tags:conceptdistributedsystems Status:🟩


Distributed Systems

Summary

Distributed systems involve components on networked computers communicating and coordinating via message passing. Key challenges include heterogeneity, openness, security, scalability, failure handling, concurrency, and transparency.

Details

Definition

A distributed system is a system where components on different networked computers interact by exchanging messages.

Key Concepts

  • Network: A collection of entities (nodes) that execute software, interact by exchanging information, and share resources.
  • Node: An entity in a network, either a physical device or an abstract entity depending on the level of abstraction.
  • Communication: Interaction between nodes via message exchange. Assumes the network facilitates communication.

Characteristics of Distributed Systems

No Global Clock: There’s no common time frame for actions across nodes. You cant say lets do all this at 12:00 because it cannot be computed precisely.

8 Common Mistakes in Thinking about Distributed Systems

  1. The network is always reliable
    • Mistake: Assuming networks never fail.
    • Reality: Networks can fail, lose data, or have slow connections, so systems need to handle these issues.
  2. Latency is zero
    • Mistake: Assuming communication happens instantly.
    • Reality: Messages take time to travel across a network, so delays (latency) can impact performance.
  3. Bandwidth is unlimited
    • Mistake: Assuming the network can handle any amount of data.
    • Reality: Networks have limits on how much data they can transmit at once, so large transfers can be slow.
  4. The network is secure
    • Mistake: Assuming data is safe when sent over the network.
    • Reality: Data can be intercepted or altered, so security measures like encryption are needed.
  5. Network structure doesn’t change
    • Mistake: Thinking the network’s layout (topology) remains constant.
    • Reality: Networks often change as nodes are added, removed, or moved, which can affect communication.
  6. There’s only one administrator
    • Mistake: Assuming only one person or group manages the network.
    • Reality: Large systems often have multiple administrators, which can cause inconsistencies in management.
  7. Transport costs are zero
    • Mistake: Assuming sending data has no cost.
    • Reality: Data transfers consume resources (bandwidth, power, time), and managing this can be costly, especially for big data or global systems.
  8. The network is homogeneous
    • Mistake: Assuming all devices on the network are similar.
    • Reality: Networks are made up of diverse devices (servers, phones, IoT devices) with different capabilities, leading to potential compatibility and communication challenges.

Challenges in distributed systems

  • Heterogeneity: Refers to the difficulty of ensuring communication between different systems, devices, or components that may use various programming languages, hardware, or protocols. Middleware and standard interfaces often help bridge these differences.
  • Openness: The ability of a system to be extended and integrated with other systems. Open systems need standardized interfaces and protocols to enable seamless interaction across different platforms.
  • Security: Ensuring that data and resources are protected from unauthorized access or manipulation. Distributed systems must address vulnerabilities in communication and data storage, often through encryption and authentication mechanisms.
  • Scalability: The system’s ability to handle increasing loads (e.g., more users or data) without performance degradation. Distributed systems should be designed to scale both vertically (stronger hardware) and horizontally (more machines).
  • Availability & Failure Handling: Ensuring the system remains operational even when some components fail. This often involves redundancy, failover mechanisms, and strategies for recovering from failures quickly.
  • Concurrency: Managing multiple operations happening simultaneously without conflicts, especially when sharing resources. Proper synchronization and locking mechanisms are essential to avoid race conditions and data inconsistency.
  • Transparency: Hiding the complexity of the distributed system from the user, making it appear as if it’s a single unified system. Users shouldn’t need to know which nodes or components are involved.
  • Quality of Service (QoS): Ensuring the system meets certain performance standards like reliability, speed, and availability, even under varying loads or network conditions. QoS guarantees help manage user expectations for system performance.

Models in distributed systems

Architectural Models: Focus on abstraction and patterns for:

  • Entities
  • Communication
  • Roles & Responsibilities

Communication Entities

  • System-Oriented: Nodes, processes.
  • Problem-Oriented: Objects, components, web services

Communication Paradigms

  • Interprocess Communication: Message passing, sockets, multicast.
  • Remote Invocation: Request-reply, RPC, RMI.
  • Indirect Communication: Group communication, publish-subscribe, tuple spaces, DSM.

Shared Memory

Systems where nodes can read/write to a shared memory (multi-core machines).

Client-Server Architecture

Basic and extended models of client-server architecture.