You are on page 1of 8

Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

Constantine 2- Abdelhamid Mehri University


Semester 1 2023-2024

Chapter 2: Distributed System Topologies

Pedagogy Staff
Nom Grade Faculté/Institut Adresse e-mail
KITOUNI Ilham MCA Nouvelles Technologies Ilham.kitouni@univ-constantine2.dz

Merniz Amina MCB Nouvelles Technologies amina.merniz@univ-constantine2.dz

Merniz Amina MCB Nouvelles Technologies amina.merniz@univ-constantine2.dz

Dr KITOUNI Ilham 1
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

Content:

• Centralized vs. decentralized topologies


• Peer-to-peer vs. client-server topologies
• Hybrid topologies
• Case studies of distributed systems with different topologies

Example:

A centralized distributed system is one in which there is a single central controller that
manages all of the other components in the system. All communication between the
components must go through the central controller.

A decentralized distributed system is one in which there is no central controller. All of


the components in the system are equal, and they communicate with each other
directly.

A peer-to-peer distributed system is a decentralized distributed system in which all of


the components are equal and they communicate with each other directly. There is no
central controller.

A client-server distributed system is a centralized distributed system in which the


components are divided into two categories: clients and servers. The clients are
responsible for making requests to the servers, and the servers are responsible for
processing those requests and returning responses.

Hybrid distributed systems are distributed systems that combine elements of different
topologies. For example, a hybrid distributed system might have a central controller
that manages some of the components in the system, but it might also have some
components that communicate with each other directly.

Case study

The DNS system is a centralized distributed system. The DNS system is responsible
for translating domain names into IP addresses. There are root DNS servers that are
located around the world. The root DNS servers contain a list of all of the top-level
domains (TLDs). When a client needs to resolve a domain name, it sends a request to
a root DNS server. The root DNS server will then direct the client to a TLD server that
is responsible for the domain name that the client is trying to resolve. The TLD server
will then direct the client to a name server that is responsible for the specific domain
name that the client is trying to resolve.

Centralized vs. Decentralized


Topologies
In distributed systems, the choice of system topology plays a crucial role in determining
the overall performance, scalability, and fault tolerance of the system. Two common
topologies used in distributed systems are centralized and decentralized topologies. In
this activity, we will explore the characteristics and advantages of each topology.

Dr KITOUNI Ilham 2
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

Centralized Topology
In a centralized topology, there is a single central node that acts as the primary point
of control and coordination for the entire system. All other nodes in the system are
connected to and communicate with the central node. The central node is responsible
for managing resources, distributing tasks, and maintaining the overall system state.

One of the key advantages of a centralized topology is its simplicity. With a single
central node, it is relatively easier to design, implement, and manage the system.
Additionally, centralized systems often have lower communication overhead as all
communication flows through the central node, reducing the complexity of message
routing and synchronization.

However, a major drawback of a centralized topology is its single point of failure. If the
central node fails, the entire system may become unavailable or dysfunctional. This
lack of fault tolerance can be a critical limitation in systems that require high availability
and reliability. Moreover, the centralized nature of the topology can also lead to
performance bottlenecks as the central node becomes a potential performance
bottleneck due to increased load and processing demands.

Decentralized Topology
In contrast to the centralized topology, a decentralized topology distributes control and
coordination across multiple nodes in the system. Each node in a decentralized
topology operates independently and can communicate directly with other nodes
without relying on a central point of control. Decentralized systems are often designed
to be more fault-tolerant, scalable, and resilient.

One of the key advantages of a decentralized topology is its increased fault tolerance.
Since there is no single point of failure, the system can continue to operate even if
some nodes fail or become unavailable. Decentralized systems are often more resilient
to network failures, as the absence of a central node means that communication can
still occur between connected nodes even if certain links are disrupted.

Decentralized topologies also offer improved scalability as additional nodes can be


easily added to the system without requiring significant modifications to the existing
infrastructure. This scalability allows for better resource utilization and can handle
increasing workloads more effectively.

However, decentralized topologies can be more complex to design and manage


compared to centralized topologies. The absence of a central point of control requires
careful coordination and synchronization mechanisms to ensure consistency and
coherence across the system. Additionally, decentralized systems may experience
higher communication overhead due to the need for direct communication between
nodes.

Conclusion
Centralized and decentralized topologies are two fundamental approaches to
structuring distributed systems. Each topology has its own advantages and trade-offs,
and the choice of topology depends on the specific requirements and constraints of
the system. Centralized topologies offer simplicity and lower communication overhead

Dr KITOUNI Ilham 3
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

but are more susceptible to single points of failure and scalability limitations. On the
other hand, decentralized topologies provide fault tolerance, scalability, and resilience
but require more complex coordination and synchronization mechanisms.

Peer-to-peer vs. Client-Server


Topologies
In distributed systems, the choice of topology plays a crucial role in determining how
resources are shared, communication is established, and the overall performance and
scalability of the system. Two popular topologies used in distributed systems are peer-
to-peer (P2P) and client-server. Each of these topologies has its own characteristics,
advantages, and limitations. In this section, we will explore the differences between
P2P and client-server topologies.

Peer-to-Peer Topology
In a peer-to-peer topology, all nodes in the system can act as both clients and servers,
meaning they can request and provide resources or services to other nodes in the
network. There is no central authority or dedicated server responsible for managing
the resources or controlling the communication. Instead, each node collaborates with
other nodes to achieve the desired functionality.

One of the key advantages of a P2P topology is its decentralized nature. Since there
is no single point of failure, P2P systems tend to be more resilient and fault-tolerant.
Additionally, the load is distributed among the participating nodes, which can lead to
improved scalability and performance. P2P networks are also more flexible and
adaptable, as nodes can join or leave the network without disrupting the overall
functionality.

However, P2P topologies also have some limitations. The lack of centralized control
can make it challenging to enforce security measures and ensure data consistency
across the network. Additionally, the dynamic nature of P2P networks can make it
difficult to locate and retrieve resources efficiently.

Client-Server Topology
In a client-server topology, the system consists of a central server that provides
resources or services to multiple client nodes. The server is responsible for managing
and distributing resources, while clients request and utilize these resources.
Communication typically occurs through well-defined interfaces and protocols.

One of the primary advantages of a client-server topology is its centralized control. The
server acts as a single point of authority, allowing for easier management of resources,
security enforcement, and data consistency. Additionally, client-server architectures
are well-suited for scenarios where the server possesses specialized resources or
expertise.

However, client-server topologies also have limitations. The centralized nature of the
server can become a bottleneck, leading to scalability and performance issues when
dealing with a large number of clients or resource-intensive tasks. Furthermore, the

Dr KITOUNI Ilham 4
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

reliance on a single server makes the system more vulnerable to failures, as the entire
system can be affected if the server goes down.

Choosing the Right Topology


The choice between a P2P and client-server topology depends on the specific
requirements and characteristics of the distributed application. P2P topologies are
more suitable for scenarios where scalability, fault-tolerance, and flexibility are crucial,
such as file sharing systems or decentralized applications. On the other hand, client-
server topologies are better suited for scenarios that require centralized control,
specialized resources, and strict security measures, such as web servers or database
management systems.

It is worth noting that hybrid topologies combining elements of both P2P and client-
server architectures are also common. These hybrid approaches leverage the
strengths of each topology to achieve a balance between decentralization and
centralized control.

In conclusion, the choice between a peer-to-peer and client-server topology


significantly impacts the design, performance, and scalability of distributed systems.

Hybrid Topologies
In distributed systems, hybrid topologies combine elements from different types of
topologies to create a customized network structure that suits the specific requirements
of an application. By combining centralized, decentralized, peer-to-peer, and client-
server topologies, hybrid topologies offer a flexible approach to designing distributed
systems.

Advantages of Hybrid Topologies


Hybrid topologies provide several advantages over traditional single-type topologies:

1. Scalability: Hybrid topologies offer the ability to scale both vertically and horizontally.
This means that the system can handle an increasing number of users or resources by
adding more servers or by distributing the workload across multiple nodes.
2. Flexibility: Hybrid topologies allow for flexibility in terms of system architecture.
Different components of the system can be designed using the most suitable topology,
depending on the specific requirements of that component.
3. Efficiency: By combining different topologies, hybrid topologies can optimize resource
utilization and minimize network congestion. This leads to improved performance and
reduced latency in distributed systems.
4. Reliability: Hybrid topologies enhance system reliability by incorporating fault-tolerant
mechanisms from different topologies. This means that if one component fails, the
system can still function using alternative resources or backup servers.

Examples of Hybrid Topologies


There are various examples of hybrid topologies that have been used in real-world
distributed systems:

Dr KITOUNI Ilham 5
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

1. Client-Server with Peer-to-Peer: This hybrid topology combines the scalability of


client-server architecture with the decentralized nature of peer-to-peer networks. In this
setup, clients communicate with a centralized server for certain tasks, while also
directly interacting with other clients for specific operations.
2. Centralized with Microservices: By integrating a centralized component with a
microservices architecture, this hybrid topology allows for the benefits of both
approaches. The centralized component handles common functionalities, while
microservices handle specialized tasks, resulting in a flexible and scalable system.
3. Decentralized with Event-driven: This hybrid topology combines the decentralized
nature of a peer-to-peer network with the event-driven architecture. In this setup, nodes
communicate directly with each other and react to events, resulting in a highly
responsive and distributed system.

Considerations for Designing Hybrid Topologies


When designing a hybrid topology for a distributed system, several considerations
should be taken into account:

1. System Requirements: Understand the specific requirements of the application, such


as scalability, fault tolerance, and performance, to determine which types of topologies
to combine.
2. Communication Protocols: Ensure that the different components of the hybrid
topology can communicate effectively by selecting appropriate communication
protocols.
3. Load Balancing: Implement load balancing mechanisms to distribute the workload
evenly across the system, ensuring optimal resource utilization.
4. Security: Incorporate security measures to protect the system from unauthorized
access and ensure data integrity and confidentiality.
5. Monitoring and Management: Implement monitoring and management tools to track
the performance and health of the distributed system, allowing for effective
troubleshooting and maintenance.

By carefully considering these factors, developers can design hybrid topologies that
meet the specific requirements of their distributed applications.

Conclusion
Hybrid topologies provide a flexible and customizable approach to designing
distributed systems. By combining elements from different topologies, developers can
tailor the network structure to meet the specific requirements of their applications. With
advantages such as scalability, flexibility, efficiency, and reliability, hybrid topologies
offer a powerful solution for building robust and efficient distributed systems.

Case Studies of Distributed Systems


with Different Topologies
Case studies of distributed systems with different
topologies
Several case studies of distributed systems with different topologies, including the
following:

Dr KITOUNI Ilham 6
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

o Centralized topology: The World Wide Web


o Decentralized topology: Bitcoin
o Peer-to-peer topology: BitTorrent
o Hybrid topology: Amazon Web Services

In this section, we will explore several case studies of distributed systems that employ
different topologies. These case studies will provide real-world examples of how
various topologies can be used to design and implement distributed applications.

Case Study 1: Centralized Topology - Online Banking


System
An online banking system is an example of a distributed system that utilizes a
centralized topology. In this topology, all the processing and data storage are
concentrated in a central server. The clients, which are the users accessing the
system, interact with the central server to perform banking transactions.

The centralized topology provides a single point of control, making it easier to manage
and secure the system. However, it also poses a single point of failure, as the entire
system relies on the central server. To mitigate this risk, redundancy and backup
systems are typically implemented to ensure high availability.

Case Study 2: Decentralized Topology - Blockchain


Network
A blockchain network is an example of a distributed system that employs a
decentralized topology. In this topology, multiple nodes participate in the network, and
each node stores a copy of the entire blockchain. Transactions are validated and
added to the blockchain through a consensus mechanism among the nodes.

The decentralized topology offers high fault tolerance and resilience as there is no
single point of failure. It also promotes transparency and security, as data stored in the
blockchain cannot be easily tampered with. However, the decentralized nature of the
network can result in slower transaction processing times compared to centralized
systems.

Case Study 3: Peer-to-Peer Topology - BitTorrent


BitTorrent is an example of a distributed system that utilizes a peer-to-peer (P2P)
topology. In this topology, the participants, or peers, in the network share files directly
with each other, without the need for a centralized server. Peers connect to each other
and exchange data in a decentralized manner.

The P2P topology allows for efficient file sharing, as the burden of hosting and
distributing files is distributed among the peers. It also provides scalability, as the
network can grow effortlessly with the addition of new peers. However, managing
security and ensuring fairness in a P2P network can be challenging.

Dr KITOUNI Ilham 7
Distributed Application Development and Middleware (DARM) 2023/2024 Semester 1

Case Study 4: Hybrid Topology - Cloud Computing


Cloud computing is an example of a distributed system that combines multiple
topologies, resulting in a hybrid topology. In cloud computing, resources and services
are provided over the internet, and they can be accessed from anywhere. The system
may have centralized components, such as a central server for managing resources,
as well as decentralized components, such as distributed storage and processing.

The hybrid topology in cloud computing offers flexibility and scalability, as resources
can be dynamically allocated and scaled based on demand. It also provides fault
tolerance and high availability through redundancy and load balancing. However,
managing the complexity of a hybrid system can be challenging, and ensuring data
consistency across different components is crucial.

Conclusion
These case studies demonstrate how different topologies can be employed in
distributed systems to meet specific requirements and address various challenges.
Understanding the strengths and weaknesses of each topology is essential for
designing and implementing efficient and reliable distributed applications.

By studying these real-world examples, developers and architects will gain valuable
insights into the practical applications of distributed systems and how different
topologies can be leveraged to achieve specific goals. This knowledge will enable them
to make informed decisions when designing and developing distributed applications in
their own professional endeavors.

References:

• George Coulouris, Jean Dollimore, Tim Kindberg, Gordon Blair. Distributed


Systems: Concepts and Design. 5th edition. Pearson Education, 2012.
• Andrew S. Tanenbaum, Maarten van Steen. Distributed Systems: Principles
and Paradigms. 3rd edition. Pearson Education, 2017.

Dr KITOUNI Ilham 8

You might also like