Chapter 1 DS-Chapter 1 Introduction dt-2024-07-05 11-51-17
Chapter 1 DS-Chapter 1 Introduction dt-2024-07-05 11-51-17
Systems
Chapter One
Introduction to DS
• A distributed system is a collection of autonomous computers
connected through a network, working together as a single cohesive
system.
• Characteristics: Distribution of resources, concurrency, and failure
independence.
• Examples: Internet, cloud computing, peer-to-peer networks.
Cont’d…
Cont’d…
• In distributed systems, middleware plays a crucial role by:
• Abstraction of Complexity: Simplifying communication across diverse
components without needing to understand their specific implementations.
• Communication Management: Handling protocols, routing messages, and
supporting various communication patterns.
• Scalability and Load Balancing: Distributing tasks across nodes to optimize
performance.
• Fault Tolerance: Ensuring system reliability through replication and error
recovery.
• Security: Enforcing access control and protecting data.
• Data Management: Including caching, synchronization, and consistency across
distributed data stores.
• Integration: Seamlessly integrating with legacy systems for comprehensive
system functionality.
Cont’d…
• The platforms and technologies used for middleware in distributed systems
can vary widely based on specific requirements and technologies involved.
Here are some commonly used platforms and technologies:
• Message-Oriented Middleware (MOM):
• Examples: Apache Kafka, RabbitMQ, ActiveMQ
• Remote Procedure Call (RPC) Middleware:
• Examples: Apache Thrift, CORBA (Common Object Request Broker Architecture)
• Service-Oriented Architecture (SOA) Middleware:
• Examples: Apache Axis, Oracle Fusion Middleware, IBM WebSphere
• Data Distribution Service (DDS) Middleware**:
• Examples: RTI Connext DDS, OpenDDS, PrismTech OpenSplice
Cont’d…
• Middleware for Web Services:
• Examples: Apache CXF, Spring Web Services, Microsoft WCF (Windows
Communication Foundation)
• Enterprise Service Bus (ESB):
• Examples: MuleSoft Anypoint Platform, Apache ServiceMix, IBM Integration
Bus
• Cloud-Based Middleware:
• Examples: AWS Lambda, Azure Functions, Google Cloud Functions
• Containerized Middleware:
• Examples: Kubernetes-based solutions, Docker Swarm, OpenShift
Why Distributed Systems?
• Advantages: Increased performance, scalability, reliability, fault
tolerance, and resource sharing.
• Challenges: Coordination, communication, consistency, and security.
Design Goals of Distributed Systems
• Scalability: The system should be able to handle an increasing
number of users and resources.
• Reliability: The system should continue to function despite individual
component failures.
• Performance: The system should provide efficient and timely
responses to user requests.
• Transparency: The system should appear as a single, unified entity to
its users.
• Flexibility: The system should be adaptable to changing requirements
and environments.
Types of Distributed Systems
• Cluster Computing Systems:
• Cluster computing systems combine multiple machines or servers to
form a cluster that works together to perform large-scale
computational tasks. They distribute the workload among cluster
nodes and often leverage parallel processing techniques. Examples
include Apache Hadoop and Apache Spark.
Cont’d…
• Grid Computing Systems:
• Grid computing systems connect geographically distributed resources
to form a virtual supercomputer.
• They enable the sharing of computing power, storage, and data across
different organizations or institutions.
• Grid systems are typically used for scientific computing, research
collaborations, and resource-intensive applications.
Cont’d…
• The grid architecture, as proposed by Foster et al., includes four
layers:
• the fabric layer for local resource interfaces,
• the connectivity layer for communication and security protocols,
• the resource layer for managing single resources, and the collective
layer for managing multiple resources.
• This layered approach, forming the grid middleware, ensures efficient
resource access and management across different domains.
• Grid computing is evolving towards a service-oriented architecture
with the Open Grid Services Architecture (OGSA), which standardizes
and simplifies the management and utilization of distributed
resources through web services.
Cont’d…
• Cloud Computing Systems:
• Cloud computing systems provide on-demand access to a pool of
computing resources, including virtual machines, storage, and
services, over the internet.
• The architecture leverages distributed systems principles, including
resource sharing, load balancing, fault tolerance, and decentralized
control, to ensure high availability, reliability, and scalability.
Cont’d…
• Cloud computing models, such as Infrastructure as a Service (IaaS),
Platform as a Service (PaaS), and Software as a Service (SaaS), offer
various levels of abstraction and service delivery, enabling users to
focus on their core business activities while leveraging the
computational power and storage capacity of the cloud.
• They offer scalability, flexibility, and pay-per-use billing models.
Examples include Amazon Web Services (AWS), Microsoft Azure, and
Google Cloud Platform (GCP).
Internet of Things (IoT) Systems:
• IoT systems connect a large number of devices and sensors, often
geographically distributed, to collect and exchange data.
• They involve distributed processing, data aggregation, and
coordination among devices and services.
• IoT systems are used in various domains such as smart homes,
industrial automation, and smart cities.
Cont’d…
• IoT systems exhibit characteristics of distributed systems such as
decentralization, scalability, and fault tolerance.
• They rely on edge computing to process data locally and cloud
computing for centralized data analysis and storage, ensuring efficient
resource utilization and rapid response times.
• The architecture of IoT systems supports seamless integration,
interoperability, and adaptive management of heterogeneous
devices, facilitating the creation of intelligent and autonomous
applications across various domains.
Cont’d…
• Distributed File Systems:
• Distributed file systems are designed to provide a unified view of file
storage across multiple machines.
• They distribute file data and metadata across nodes, allowing clients
to access and manipulate files as if they were stored on a single
machine.
• Examples include the Google File System (GFS) and the Hadoop
Distributed File System (HDFS).
Cont’d…
• Distributed Database Systems:
• Distributed database systems store and manage data across multiple
nodes to provide scalability, fault tolerance, and improved
performance.
• They distribute data across nodes and support distributed query
processing and transaction management.
• Examples include Apache Cassandra and Apache HBase.
Cont’d…
• Electronic Health Care Systems
• These systems use body-area networks (BANs) to monitor health,
requiring:
• Reliable data storage and loss prevention.
• Efficient alert generation and propagation.
• Secure communication and data management.
• Robust system design.
Cont’d…
• Pervasive Distributed Systems
• Pervasive systems, characterized by mobile and embedded devices,
present unique challenges due to their inherent instability and lack of
fixed infrastructure. These systems require:
• Contextual Adaptation: Devices must handle continuous
environmental changes, such as network availability.
• Ad Hoc Composition: Devices should support dynamic configuration
and interaction.
• Sharing: Information sharing must be straightforward and efficient.
Distributed transaction processing Systems
• Distributed transaction processing involves coordinating a transaction
across multiple networked databases or systems to ensure
consistency and reliability. This process typically follows these steps:
• Transaction Initiation: A client starts a transaction that involves
operations on multiple databases or systems.
• Transaction Manager: A central transaction manager or coordinator
oversees the process, ensuring all parts of the transaction are
executed properly. It communicates with local transaction managers
at each participating database.
Cont’d…
• Two-Phase Commit (2PC) Protocol:
• Phase 1 - Prepare: The coordinator sends a prepare request to all
participating systems. Each system performs the necessary operations
and then votes to commit or abort the transaction based on local
success or failure. They respond back to the coordinator with their
vote.
• Phase 2 - Commit/Abort: If all participants vote to commit, the
coordinator sends a commit message, finalizing the transaction. If any
participant votes to abort, the coordinator sends an abort message,
and all participants roll back any changes made during the
transaction.
Cont’d…
• Logging: Each participant logs its actions to ensure recovery in case of
a system failure.
• This log includes details of the prepare and commit/abort decisions.
• Error Handling and Recovery:
• If a failure occurs at any point, recovery mechanisms, often involving
log analysis and re-execution of the transaction, ensure the system
returns to a consistent state.
• Completion: Once the transaction is successfully committed or
aborted, the coordinator informs the client, concluding the
distributed transaction process.
Cont’d…
• Transactions exhibit four key properties, collectively known as ACID:
• Atomicity: Ensures that a transaction is treated as a single unit, which
either completely executes or does not execute at all.
• Consistency: Guarantees that a transaction brings the system from
one valid state to another, preserving system invariants.
• Isolation: Ensures that concurrently executing transactions do not
interfere with each other, providing the illusion that transactions run
sequentially.
• Durability: Once a transaction commits, its changes are permanent,
even in the event of system failures.
Architectural Models
• Client-Server Model
• Clients request services from servers.
• Servers provide services to clients.
• Example: Web applications with web browsers (clients) and web servers.
• Peer-to-Peer Model
• Peers communicate and collaborate directly with each other.
• Peers can act as clients or servers.
• Example: File sharing networks like BitTorrent.
• Hybrid Models
• Combine elements of both client-server and peer-to-peer models.
• Example: Distributed databases with dedicated server nodes and peer replication.
The End