0% found this document useful (0 votes)
2 views23 pages

Introduction to Distributed System

A distributed system consists of multiple independent computers (nodes) that work together as a unified system, sharing data and resources over a network. These systems are used in various applications such as online banking, e-commerce, and social media, and can be classified into types like client-server, peer-to-peer, and cloud-based systems. While they offer advantages such as scalability and fault tolerance, they also face challenges related to complexity, security, and data management.

Uploaded by

samnjenga727
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views23 pages

Introduction to Distributed System

A distributed system consists of multiple independent computers (nodes) that work together as a unified system, sharing data and resources over a network. These systems are used in various applications such as online banking, e-commerce, and social media, and can be classified into types like client-server, peer-to-peer, and cloud-based systems. While they offer advantages such as scalability and fault tolerance, they also face challenges related to complexity, security, and data management.

Uploaded by

samnjenga727
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Croszeduverse - Amos Peter Blogs

INTRODUCTION TO DISTRIBUTED SYSTEM

A distributed system is a group of independent computers, called nodes, that work together
as a single system. These nodes communicate over a network to share data, resources, and
tasks to achieve a common goal. It ensures coordination between multiple systems while
appearing unified to the user.

• Consists of multiple independent computers (nodes) working together in a network.

• Nodes communicate and share data, resources, and tasks efficiently.

• Appears as a single system to users, and failure of one node does not stop the entire
system.

Example: An online shopping platform like Amazon uses distributed systems where multiple
servers handle different tasks such as product search, payments, and order processing. Even
if one server fails, the platform continues to function without affecting the user experience.

Distributed System

Real-World Examples

These examples show how distributed systems are used in real applications to handle large-
scale data, improve performance, and ensure reliability.

• Online Banking Systems: Banks use distributed systems where branches and ATMs
share data with central servers while operating independently, ensuring continuous
transactions

1
Croszeduverse - Amos Peter Blogs

• E-Commerce Platforms: Platforms like Amazon or Flipkart process orders, payments,


and inventory across multiple servers to handle high traffic and ensure smooth user
experience

• Social Media Platforms: Applications like Facebook, Twitter, and Instagram use
multiple data centers to store and process massive user data efficiently

• Online Gaming Systems: Multiplayer games like PUBG distribute game states across
servers to reduce latency and provide real-time gaming experience

Types of Distributed Systems

Distributed systems can be classified into different types based on how nodes are organized,
how they communicate, and how tasks are distributed across the system.

1. Client-Server Systems

A client-server system is a distributed system where a central server provides services and
multiple clients request those services over a network.

• Server manages data and processing

• Clients send requests and receive responses

Example: Gmail or online banking systems.

2. Peer-to-Peer (P2P) Systems

A peer-to-peer system is a distributed system where all nodes are equal and can act as both
client and server without a central authority.

• No central server exists

• Nodes directly share resources with each other

Example: BitTorrent, blockchain networks.

3. Clustered Systems

A clustered system is a group of closely connected computers that work together as a single
system to improve performance and reliability.

• Nodes work in a tightly connected network

• Tasks are shared for high performance

Example: Google search clusters, supercomputers.

2
Croszeduverse - Amos Peter Blogs

4. Cloud-Based Distributed Systems

A cloud-based distributed system uses cloud infrastructure where computing resources are
distributed across multiple data centers and accessed over the internet.

• Resources are scalable on demand

• Services are accessed over the internet

Example: AWS, Microsoft Azure, Google Cloud.

Working

A distributed system works by dividing tasks among multiple nodes, which communicate and
coordinate over a network to achieve a common goal.

• Each node runs its own application and maintains local data

• Nodes communicate through the network using protocols or middleware services

• Data and tasks are distributed across nodes for parallel processing

• Nodes process data locally and share results with other nodes when required

• Data may be stored in distributed databases instead of a single centralized system

• The system ensures coordination, consistency, and fault tolerance across all nodes

Working

Advantages

3
Croszeduverse - Amos Peter Blogs

Distributed systems offer multiple benefits that improve performance, scalability, and
reliability of applications.

• Resource sharing improves efficiency by allowing nodes to share data, files, and
hardware, reducing overall system costs.

• Scalability allows the system to handle increasing workloads easily by adding more
nodes without major changes.

• Reliability and fault tolerance ensure that failure of one node does not crash the entire
system, maintaining continuous operation.

• Performance is improved as workloads are distributed across multiple nodes,


enabling faster processing and response times.

Disadvantages

Despite their benefits, distributed systems also introduce challenges related to complexity,
security, and data management.

• Complexity makes designing, managing, and maintaining distributed systems more


difficult than centralized systems.

• Security challenges arise due to multiple nodes, increasing the risk of unauthorized
access and cyberattacks.

• Network dependency means system performance heavily relies on network speed,


latency, and reliability.

• Data consistency issues occur when keeping data synchronized across multiple
nodes, especially in real-time systems.

Difference Between Distributed Systems and Microservices

Distributed systems and microservices are related concepts, but they are not the same. They
differ in purpose and scope within software architecture.

Distributed System

A distributed system is a collection of multiple independent computers (nodes) that work


together and appear as a single system.

• Focuses on coordination and communication between multiple machines

• Used to improve scalability, performance, and reliability

4
Croszeduverse - Amos Peter Blogs

Microservices

Microservices is an architectural style where an application is divided into small, independent


services that communicate over a network.

• Focuses on designing applications as loosely coupled services

• Each service handles a specific functionality and can be developed and deployed
independently

Difference

• All microservices-based applications are distributed systems

• Not all distributed systems follow a microservices architecture

5
Croszeduverse - Amos Peter Blogs

Architecture Styles in Distributed Systems

Architecture styles in distributed systems define how components interact and are structured
to achieve scalability, reliability, and efficiency. This article explores key architecture styles—
including Peer-to-Peer, SOA, and others—highlighting their concepts, advantages, and
applications in building robust distributed systems.

Architecture Styles in Distributed Systems

What are Distributed Systems?

Distributed Systems are networks of independent computers that work together to present
themselves as a unified system. These systems share resources and coordinate tasks across
multiple nodes, allowing them to work collectively to achieve common goals. Key
characteristics include:

• Multiple Nodes: Consists of multiple interconnected computers or servers that


communicate over a network.

• Resource Sharing: Enable sharing of resources such as processing power, storage,


and data among the nodes.

• Scalability: This can be scaled by adding more nodes to handle increased load or
expand functionality.

6
Croszeduverse - Amos Peter Blogs

• Fault Tolerance: Designed to handle failures of individual nodes without affecting the
overall system’s functionality.

• Transparency: Aim to hide the complexities of the underlying network, making the
system appear as a single coherent entity to users.

Architecture Styles in Distributed Systems

To show different arrangement styles among computers Architecture styles are proposed.

1. Layered Architecture in Distributed Systems

Layered Architecture in distributed systems organizes the system into hierarchical layers,
each with specific functions and responsibilities. This design pattern helps manage
complexity and promotes separation of concerns. Here’s a detailed explanation:

• In a layered architecture, the system is divided into distinct layers, where each layer
provides specific services and interacts only with adjacent layers.

• This separation helps in managing and scaling the system more effectively.

Layered Architecture in Distributed Systems

7
Croszeduverse - Amos Peter Blogs

Layers and Their Functions

Presentation Layer

• Function: Handles user interaction and presentation of data. It is responsible for user
interfaces and client-side interactions.

• Responsibilities: Rendering data, accepting user inputs, and sending requests to the
underlying layers.

Application Layer

• Function: Contains the business logic and application-specific functionalities.

• Responsibilities: Processes requests from the presentation layer, executes business


rules, and provides responses back to the presentation layer.

Middleware Layer

• Function: Facilitates communication and data exchange between different


components or services.

• Responsibilities: Manages message passing, coordination, and integration of various


distributed components.

Data Access Layer

• Function: Manages data storage and retrieval from databases or other data sources.

• Responsibilities: Interacts with databases or file systems, performs data queries, and
ensures data integrity and consistency.

Advantages of Layered Architecture in Distributed System

• Separation of Concerns: Each layer focuses on a specific aspect of the system,


making it easier to develop, test, and maintain.

• Modularity: Changes in one layer do not necessarily affect others, allowing for more
flexible updates and enhancements.

• Reusability: Layers can be reused across different applications or services within the
same system.

• Scalability: Different layers can be scaled independently to handle increased load or


performance requirements.

Disadvantages of Layered Architecture in Distributed System

8
Croszeduverse - Amos Peter Blogs

• Performance Overhead: Each layer introduces additional overhead due to data


passing and processing between layers.

• Complexity: Managing interactions between layers and ensuring proper integration


can be complex, particularly in large-scale systems.

• Rigidity: The strict separation of concerns might lead to rigidity, where changes in the
system’s requirements could require substantial modifications across multiple layers.

Examples of Layered Architecture in Distributed System

• Web Applications: A common example includes web applications with a


presentation layer (user interface), application layer (business logic), and data
access layer (database interactions).

• Enterprise Systems: Large enterprise systems often use layered architecture to


separate user interfaces, business logic, and data management.

2. Peer-to-Peer (P2P) Architecture in Distributed Systems

Peer-to-Peer (P2P) Architecture is a decentralized network design where each node, or "peer,"
acts as both a client and a server, contributing resources and services to the network. This
architecture contrasts with traditional client-server models, where nodes have distinct roles
as clients or servers.

• In a P2P architecture, all nodes (peers) are equal participants in the network, each
capable of initiating and receiving requests.

• Peers collaborate to share resources, such as files or computational power, without


relying on a central server.

9
Croszeduverse - Amos Peter Blogs

Peer-to-Peer (P2P) Architecture

Key Features of Peer-to-Peer (P2P) Architecture in Distributed Systems

Decentralization

• Function: There is no central server or authority. Each peer operates independently


and communicates directly with other peers.

• Advantages: Reduces single points of failure and avoids central bottlenecks,


enhancing robustness and fault tolerance.

Resource Sharing

• Function: Peers share resources such as processing power, storage space, or data
with other peers.

• Advantages: Increases resource availability and utilization across the network.

Scalability

• Function: The network can scale easily by adding more peers. Each new peer
contributes additional resources and capacity.

• Advantages: The system can handle growth in demand without requiring significant
changes to the underlying infrastructure.

10
Croszeduverse - Amos Peter Blogs

Self-Organization

• Function: Peers organize themselves and manage network connections dynamically,


adapting to changes such as peer arrivals and departures.

• Advantages: Facilitates network management and resilience without central


coordination.

Advantages of Peer-to-Peer (P2P) Architecture in Distributed Systems

• Fault Tolerance: The decentralized nature ensures that the failure of one or several
peers does not bring down the entire network.

• Cost Efficiency: Eliminates the need for expensive central servers and infrastructure by
leveraging existing resources of the peers.

• Scalability: Easily accommodates a growing number of peers, as each new peer


enhances the network's capacity.

Disadvantages of Peer-to-Peer (P2P) Architecture in Distributed Systems

• Security: Decentralization can make it challenging to enforce security policies and


manage malicious activity, as there is no central authority to oversee or control the
network.

• Performance Variability: The quality of services can vary depending on the peers'
resources and their availability, leading to inconsistent performance.

• Complexity: Managing connections, data consistency, and network coordination


without central control can be complex and may require sophisticated protocols.

Examples of Peer-to-Peer (P2P) Architecture in Distributed Systems

• File Sharing Networks: Systems like BitTorrent allow users to share and download files
from multiple peers, with each peer contributing to the upload and download
processes.

• Decentralized Applications (DApps): Applications that run on decentralized networks,


leveraging P2P architecture for tasks like data storage and computation.

3. Data-Centic Architecture in Distributed Systems

Data-Centric Architecture is an architectural style that focuses on the central management


and utilization of data. In this approach, data is treated as a critical asset, and the system is

11
Croszeduverse - Amos Peter Blogs

designed around data management, storage, and retrieval processes rather than just the
application logic or user interfaces.

• The core idea of Data-Centric Architecture is to design systems where data is the
primary concern, and various components or services are organized to support
efficient data management and manipulation.

• Data is centrally managed and accessed by multiple applications or services,


ensuring consistency and coherence across the system.

Data-Centic Architecture

Key Principles of Data-Centic Architecture in Distributed Systems

Centralized Data Management:

• Function: Data is managed and stored in a central repository or database, making it


accessible to various applications and services.

• Principle: Ensures data consistency and integrity by maintaining a single source of


truth.

12
Croszeduverse - Amos Peter Blogs

Data Abstraction:

• Function: Abstracts the data from the application logic, allowing different services or
applications to interact with data through well-defined interfaces.

• Principle: Simplifies data access and manipulation while hiding the underlying
complexity.

Data Normalization:

• Function: Organizes data in a structured manner, often using normalization


techniques to reduce redundancy and improve data integrity.

• Principle: Enhances data quality and reduces data anomalies by ensuring consistent
data storage.

Data Integration:

• Function: Integrates data from various sources and systems to provide a unified view
and enable comprehensive data analysis.

• Principle: Supports interoperability and facilitates comprehensive data analysis


across diverse data sources.

Scalability and Performance:

• Function: Designs the data storage and management systems to handle increasing
volumes of data efficiently.

• Principle: Ensures the system can scale to accommodate growing data needs while
maintaining performance.

Advantages of Data-Centic Architecture in Distributed Systems

• Consistency: Centralized data management helps maintain a single source of truth,


ensuring data consistency across the system.

• Integration: Facilitates easy integration of data from various sources, providing a


unified view and enabling better decision-making.

• Data Quality: Data normalization and abstraction help improve data quality and
reduce redundancy, leading to more accurate and reliable information.

• Efficiency: Centralized management can optimize data access and retrieval


processes, improving overall system efficiency.

13
Croszeduverse - Amos Peter Blogs

Disadvantages of Data-Centic Architecture in Distributed Systems

• Single Point of Failure: Centralized data repositories can become a bottleneck or


single point of failure, potentially impacting system reliability.

• Performance Overhead: Managing large volumes of centralized data can introduce


performance overhead, requiring robust infrastructure and optimization strategies.

• Complexity: Designing and managing a centralized data system can be complex,


especially when dealing with large and diverse datasets.

• Scalability Challenges: Scaling centralized data systems to accommodate increasing


data volumes and access demands can be challenging and may require significant
infrastructure investment.

Examples of Data-Centic Architecture in Distributed Systems

• Relational Databases: Systems like MySQL, PostgreSQL, and Oracle use Data-Centric
Architecture to manage and store structured data efficiently, providing consistent
access and integration across applications.

• Data Warehouses: Platforms such as Amazon Redshift and Google BigQuery are
designed to centralize and analyze large volumes of data from various sources,
enabling complex queries and data analysis.

• Enterprise Resource Planning (ERP) Systems: ERP systems like SAP and Oracle ERP
integrate various business functions (e.g., finance, HR, supply chain) around a
centralized data repository to support enterprise-wide operations and decision-
making.

4. Service-Oriented Architecture (SOA) in Distributed Systems

Service-Oriented Architecture (SOA) is a design paradigm in distributed systems where


software components, known as "services," are provided and consumed across a network.
Each service is a discrete unit that performs a specific business function and communicates
with other services through standardized protocols.

• In SOA, the system is structured as a collection of services that are loosely coupled
and interact through well-defined interfaces. These services are independent and can
be developed, deployed, and managed separately.

• They communicate over a network using standard protocols such as HTTP, SOAP, or
REST, allowing for interoperability between different systems and technologies.

14
Croszeduverse - Amos Peter Blogs

Service-Oriented Architecture (SOA)

Key Principles of Service-Oriented Architecture (SOA) in Distributed Systems

Loose Coupling:

• Function: Services are designed to be independent, minimizing dependencies on one


another.

• Principle: Changes to one service do not affect others, enhancing system flexibility
and maintainability.

Service Reusability:

• Function: Services are created to be reused across different applications and


contexts.

• Principle: Reduces duplication of functionality and effort, improving efficiency and


consistency.

Interoperability:

• Function: Services interact using standardized communication protocols and data


formats, such as XML or JSON.

• Principle: Facilitates communication between diverse systems and platforms,


enabling integration across heterogeneous environments.

15
Croszeduverse - Amos Peter Blogs

Discoverability:

• Function: Services are registered in a service directory or registry where they can be
discovered and invoked by other services or applications.

• Principle: Enhances system flexibility by allowing dynamic service discovery and


integration.

Abstraction:

• Function: Services expose only necessary interfaces and hide their internal
implementation details.

• Principle: Simplifies interactions between services and reduces complexity for


consumers.

Advantages of Service-Oriented Architecture (SOA) in Distributed Systems

• Flexibility: Loose coupling allows for easier changes and updates to services without
impacting the overall system.

• Reusability: Services can be reused across different applications, reducing


redundancy and development effort.

• Scalability: Services can be scaled independently, supporting dynamic load


balancing and efficient resource utilization.

• Interoperability: Standardized protocols enable integration across various platforms


and technologies, fostering collaboration and data exchange.

Disadvantages of Service-Oriented Architecture (SOA) in Distributed Systems

• Complexity: Managing multiple services and their interactions can introduce


complexity, requiring effective governance and orchestration.

• Performance Overhead: Communication between services over a network can


introduce latency and overhead, affecting overall system performance.

• Security: Ensuring secure communication and consistent security policies across


multiple services can be challenging.

• Deployment and Maintenance: Deploying and maintaining a distributed collection of


services requires robust infrastructure and management practices.

16
Croszeduverse - Amos Peter Blogs

Examples and Use Cases of Service-Oriented Architecture (SOA) in Distributed Systems

• Enterprise Systems: SOA is commonly used to integrate various enterprise


applications such as ERP, CRM, and HR systems, allowing them to work together
seamlessly.

• Web Services: Many modern web applications leverage SOA principles to interact
with external services via APIs, enabling functionalities such as payment processing,
data retrieval, and authentication.

5. Event-Based Architecture in Distributed Systems

Event-Driven Architecture (EDA) is an architectural pattern where the flow of data and control
in a system is driven by events. Components in an EDA system communicate by producing
and consuming events, which represent state changes or actions within the system.

Event-Based Architecture

Key Principles of Event-Based Architecture in Distributed Systems

• Event Producers: Components or services that generate events to signal state


changes or actions.

• Event Consumers: Components or services that listen for and react to events,
processing them as needed.

• Event Channels: Mechanisms for transmitting events between producers and


consumers, such as message queues or event streams.

17
Croszeduverse - Amos Peter Blogs

• Loose Coupling: Producers and consumers are decoupled, interacting through events
rather than direct calls, allowing for more flexible system interactions.

Advantages of Event-Based Architecture in Distributed Systems

• Scalability: Supports scalable and responsive systems by decoupling event


producers from consumers.

• Flexibility: Allows for dynamic and real-time processing of events, adapting to


changing conditions.

• Responsiveness: Enables systems to react immediately to events, improving


responsiveness and user experience.

Disadvantages of Event-Based Architecture in Distributed Systems

• Complexity: Managing event flow, ensuring reliable delivery, and handling event
processing can be complex.

• Event Ordering: Ensuring correct processing order of events can be challenging,


especially in distributed systems.

• Debugging and Testing: Troubleshooting issues in an event-driven system can be


difficult due to asynchronous and distributed nature.

Examples and Use Cases of Event-Based Architecture in Distributed Systems

• Real-Time Analytics: Systems like stock trading platforms use EDA to process and
respond to market events in real time.

• IoT Systems: Internet of Things (IoT) applications use EDA to manage and respond to
data from various sensors and devices.

• Fraud Detection: Financial institutions use EDA to detect and respond to suspicious
activities or anomalies in real time.

6. Microservices Architecture for Distributed Systems

Microservices Architecture is a design pattern where an application is composed of small,


independent services that each perform a specific function. These services are loosely
coupled and interact with each other through lightweight communication protocols, often
over HTTP or messaging queues.

18
Croszeduverse - Amos Peter Blogs

Microservices Architecture

Key Principles of Microservices Architecture for Distributed Systems

• Single Responsibility: Each microservice focuses on a single business capability or


function, enhancing modularity.

• Autonomy: Microservices are independently deployable and scalable, allowing for


changes and updates without affecting other services.

• Decentralized Data Management: Each microservice manages its own data, reducing
dependencies and promoting scalability.

• Inter-service Communication: Services communicate through well-defined APIs or


messaging protocols.

Advantages of Microservices Architecture for Distributed Systems

• Scalability: Services can be scaled independently based on demand, improving


resource utilization.

• Resilience: Failure in one service does not necessarily impact others, enhancing
system reliability.

• Deployment Flexibility: Microservices can be developed, deployed, and updated


independently, facilitating continuous delivery.

19
Croszeduverse - Amos Peter Blogs

Disadvantages of Microservices Architecture for Distributed Systems

• Complexity: Managing multiple services and their interactions can be complex and
requires effective orchestration.

• Data Consistency: Ensuring data consistency across services can be challenging due
to decentralized data management.

• Network Overhead: Communication between microservices can introduce latency


and require efficient handling of network traffic.

Examples of Microservices Architecture for Distributed Systems

• E-Commerce Platforms: Platforms like Amazon use microservices to handle different


aspects of their operations, such as user authentication, payment processing, and
order management.

• Streaming Services: Companies like Netflix employ microservices to manage


different functionalities, such as recommendation engines, content delivery, and user
interfaces.

• Financial Services: Banks and financial institutions use microservices to manage


various functions, including transaction processing, customer management, and
compliance.

7. Client Server Architecture in Distributed Systems

Client-Server Architecture is a foundational model in distributed systems where the system is


divided into two main components: clients and servers. This architecture defines how tasks
and services are distributed across different entities within a network.

• In Client-Server Architecture, clients request services or resources, while servers


provide those services or resources.

• The client initiates a request to the server, which processes the request and returns
the appropriate response.

• This model centralizes the management of resources and services on the server side,
while the client side focuses on presenting information and interacting with users.

20
Croszeduverse - Amos Peter Blogs

Client Server Architecture

Key Principles of Client Server Architecture in Distributed Systems

Separation of Concerns:

• Function: Clients handle user interactions and requests, while servers manage
resources, data, and business logic.

• Principle: Separates user interface and client-side processing from server-side data
management and processing, leading to a clear division of responsibilities.

Centralized Management:

• Function: Servers centralize resources and services, making them accessible to


multiple clients.

• Principle: Simplifies resource management and maintenance by concentrating them


in one or more server locations.

Request-Response Model:

• Function: Clients send requests to servers, which process these requests and send
back responses.

• Principle: Defines a communication pattern where the client and server interact
through a well-defined protocol, often using HTTP or similar standards.

21
Croszeduverse - Amos Peter Blogs

Scalability:

• Function: Servers can be scaled to handle increasing numbers of clients or requests.

• Principle: Servers can be upgraded or expanded to improve performance and


accommodate growing demand.

Security:

• Function: Security mechanisms are often implemented on the server side to control
access and manage sensitive data.

• Principle: Centralizes security policies and controls, making it easier to enforce and
manage security measures.

Advantages of Client Server Architecture in Distributed Systems

• Centralized Control: Easier to manage and update resources and services from a
central location.

• Simplified Maintenance: Updates and changes are made on the server side, reducing
the need for client-side modifications.

• Resource Optimization: Servers can be optimized for performance and reliability,


serving multiple clients efficiently.

• Security Management: Centralized security policies and controls make it simpler to


protect resources and data.

Disadvantages of Client Server Architecture in Distributed Systems

• Single Point of Failure: Servers can become a single point of failure, impacting all
connected clients if they go down.

• Scalability Challenges: Handling a large number of client requests can overwhelm


servers, requiring careful load management and scaling strategies.

• Network Dependency: Clients depend on network connectivity to access server


resources, which can impact performance and reliability.

• Performance Bottlenecks: High demand on servers can lead to performance


bottlenecks, requiring efficient resource management and optimization.

22
Croszeduverse - Amos Peter Blogs

Examples of Client Server Architecture in Distributed Systems

• Web Applications: In a typical web application, web browsers (clients) request web
pages or data from web servers.

• Email Systems: Email clients connect to email servers to send, receive, and manage
email messages.

• Database Access: Database clients request data and perform queries on database
servers.

23

You might also like