1.
A system in a computing context generally refers to a single, cohesive collection of components
(hardware and software) designed to work together, often within a single machine or central location. A
distributed system is a collection of independent computers that are networked together to appear to
the user as a single, coherent system, coordinating actions by passing messages.
Definitions
System (Centralized System): A computing system where all processing, data storage, and control are
handled by a single computer or a central server in one location. All components are tightly coupled and
share memory, making it simpler to manage but vulnerable to a single point of failure.
Distributed System: A collection of autonomous computers (nodes) physically separated and linked by a
network. They collaborate to achieve a common goal, sharing resources and coordinating via message
passing, while presenting a unified front to the end user, who is typically unaware of the underlying
architecture.
Differentiation with Diagram
The key difference lies in the architecture and control. A traditional system has a single control point,
while a distributed system has multiple, interconnected, autonomous nodes.
2. Types of Distributed System
Pre-requisites: Distributed System
A Distributed System is a Network of Machines that can exchange information with each other through
Message-passing. It can be very useful as it helps in resource sharing. It enables computers to
coordinate their activities and to share the resources of the system so that users perceive the system as
a single, integrated computing facility.
Types of Distributed Systems
Client/Server Systems
Peer-to-Peer Systems
Middleware
Three-tier
N-tier
1. Client/Server Systems: Client-Server System is the most basic communication method where the
client sends input to the server and the server replies to the client with an output. The client requests
the server for resources or a task to do, the server allocates the resource or performs the task and sends
the result in the form of a response to the request of the client. Client Server System can be applied with
multiple servers.
2. Peer-to-Peer Systems: Peer-to-Peer System communication model works as a decentralized model in
which the system works like both Client and Server. Nodes are an important part of a system. In this,
each node performs its task on its local memory and shares data through the supporting medium, this
node can work as a server or as a client for a system. Programs in the peer-to-peer system can
communicate at the same level without any hierarchy.
3. Middleware: Middleware can be thought of as an application that sits between two separate
applications and provides service to both. It works as a base for different interoperability applications
running on different operating systems. Data can be transferred to other between others by using this
service.
4. Three-tier: Three-tier system uses a separate layer and server for each function of a program. In this
data of the client is stored in the middle tier rather than sorted into the client system or on their server
through which development can be done easily. It includes an Application Layer, Data Layer, and
Presentation Layer. This is mostly used in web or online applications.
5. N-tier: N-tier is also called a multitier distributed system. The N-tier system can contain any number of
functions in the network. N-tier systems contain similar structures to three-tier architecture. When
interoperability sends the request to another application to perform a task or to provide a service. N-tier
is commonly used in web applications and data systems.
3.2. Cloud
A cloud is a network of servers hosted or managed by an external company. In order to access a cloud
service, we typically utilize a website or application. Additionally, the website or application connects us
to the information or services not present in the local system.
Data centers run a cloud service that is shared among many users. Hence, we don’t need to purchase
hardware or software when using a
cloud service. Furthermore, data is
stored in a central location accessible
from any device. We primarily access
cloud services through the Internet,
but a virtual private network can also
be used.
The most common cloud service is
cloud computing. Using could
computing, a company rents out
server space, bandwidth, and other resources from a third-party vendor to fulfill the business
requirement. Furthermore, cloud computing includes servers, storage, databases, and software
available over the Internet. Additionally, it enhances efficiency, reduces operational cost, and accelerate
execution speed
3. Grid
A grid is a distributed computing architecture that connects a network of computers to form an on-
demand robust network. A network of computers utilizes grid computing to solve complex problems.
Furthermore, it makes sure a business or organization runs smoothly. Additionally, it uses many
computers in different
locations. These computers are
connected to complete a
specific task or process.
The computers in a grid work
together to perform a task.
Additionally, each computer
performs a part of the task.
When a computer
finishes a part of the task, it
passes the rest of the work on
to another computer.
Further, grid computing
contains a large number of
servers and computers. Moreover, each of them executes independently. Let’s take a look at the grid
computing architecture:
4. Cluster
A cluster is a network topology containing two or more computers connected to each other.
Furthermore, a local network connects the computers or nodes on the cluster. Generally, we place all
the nodes in the same location in a cluster. Additionally, it follows centralized architecture.
The cluster can work with
any operating system or
architecture. Additionally, the
nodes on the cluster can be
synchronous or asynchronous.
Synchronous nodes share data
at the same time.
Asynchronous nodes send data
out at different times.
The nodes in a cluster can be both synchronous and asynchronous, but it depends on the type of cluster.
Clusters differ from clouds as clusters contain two or more computer systems connected to the cluster
head node, acting like a single system. On the other hand, a cloud includes servers, storage, and
databases ready to use over the Internet:
[Link] naming is a system for identifying resources, typically in a distributed system, that uses unique,
unstructured identifiers.
Definition of Flat Naming
No inherent structure: Names are often random strings of bits or characters (like a MAC address or
UUID), offering no human-readable information about the resource's location, type, or purpose.
Global uniqueness: Every resource within the system must have a distinct identifier to prevent naming
conflicts.
Location independence: The name does not provide any clues on how to physically or logically locate the
access point of the associated entity. This allows the resource to move without its name needing to
change.
Resolution mechanism needed: Because the name is unstructured and location-independent, a specific
name resolution mechanism (such as broadcasting, forwarding pointers, or Distributed Hash Tables) is
required to map the flat name to its current network address.
Comparison with Structured Naming
Flat naming is often contrasted with structured naming, which uses a hierarchical organization (like a file
system path or a Domain Name System URL) that inherently provides location information and is
typically human-readable.
5. Structured naming and attribute-based naming are two different approaches to identifying and
locating entities in distributed systems, with the key distinction being how the entity is referred to: by its
hierarchical name or by its descriptive properties.
Structured Naming
Structured naming systems use human-readable names organized into a hierarchy. Name resolution in
these systems involves traversing the hierarchy to find the entity's address.
Structure: Names are composed of simple names separated by delimiters, forming a path, much like a
file system path (e.g., /usr/local/bin) or a domain name ([Link]).
Resolution: The naming system resolves the name by following the path through a series of name
servers, starting from a root or initial context.
Lookup: To find an entity, the user must know its exact, complete, and correct hierarchical name.
Examples: The Domain Name System (DNS) and file systems are prime examples of structured naming.
Advantage: Provides a clear, organized, and human-friendly way to refer to resources with good
scalability through distributed management of the hierarchy.
Disadvantage: Locating an entity depends heavily on its current position in the hierarchy, which can
make mobility and location independence a challenge; name changes can be complex to manage.
Attribute-Based Naming
Attribute-based naming systems (also known as directory services) identify entities based on a collection
of attributes and their values.
Structure: An entity is described by a set of (attribute, value) pairs (e.g., (type=printer,
location=buildingA, color=color)).
Resolution: The system performs a search or query to find all entities that match the specified attributes.
This often involves a distributed database lookup.
Lookup: Users can search for an entity by providing a partial or full description of what they are looking
for, without needing to know a specific name or location.
Examples: Directory services like LDAP (Lightweight Directory Access Protocol) use attribute-based
naming to store and retrieve information about network resources and users.
Advantage: Offers highly flexible searching and filtering capabilities, is inherently location-independent
(as attributes can be independent of physical location), and supports dynamic changes in entity location
or status.
Disadvantage: Lookup operations can be more computationally expensive than hierarchical name
resolution, as they involve matching attribute values across a potentially large database.
[Link] is the process of coordinating events, data, or processes to ensure they operate in
unison or maintain consistency across multiple locations or systems. It prevents conflicts and ensures
the integrity of shared resources, especially in computing and data management environments.
What is Synchronization?
In various contexts, synchronization involves different mechanisms:
Data Synchronization: This is the process of automatically aligning and updating data across different
systems, databases, or devices to ensure all datasets reflect the same information at any given time.
Common examples include syncing contacts between a phone and computer or ensuring consistent
records across different business departments.
Process/Thread Synchronization (in Computing): This refers to the mechanisms used to coordinate the
execution of multiple threads or processes that access shared resources (like memory or files). It uses
primitives like locks, semaphores, and monitors to enforce rules, such as mutual exclusion, ensuring only
one process can access a critical section of code at a time to prevent race conditions and data
corruption.
Clock Synchronization: This ensures all devices within a network have a consistent notion of time, which
is critical for ordering events, logging, and time-sensitive applications like online transactions or
navigation systems.
Physical Synchronization: This can refer to mechanical or electrical systems, such as synchronizing
multiple electrical generators to an power grid to share the load, or automotive synchronizers that
match gear speeds before engagement.
Advantages of Synchronization
The primary advantages of synchronization are centered around maintaining order, consistency, and
efficiency:
Data Accuracy and Consistency: Synchronization ensures that all systems or copies of data are identical
and up-to-date, significantly reducing the risk of errors, discrepancies, and inconsistencies that can lead
to poor decision-making.
Improved Efficiency and Productivity: By automating data transfer and coordination, synchronization
eliminates the need for manual data entry and correction across multiple platforms, saving time and
allowing employees to focus on more strategic tasks.
Enhanced Collaboration: Teams can work together more effectively when accessing a single, reliable
source of truth, avoiding misunderstandings and streamlining workflows.
Prevention of Errors and Conflicts: In multi-threaded programming, synchronization is vital for
preventing race conditions, data corruption, and deadlocks by managing access to shared resources in a
controlled manner.
Better Decision-Making: Access to real-time, accurate, and consistent data across the organization
enables faster, more informed business decisions and improved responsiveness to market changes.
Increased Reliability and Fault Tolerance: In distributed systems, synchronization helps maintain data
integrity across redundant systems, ensuring data can be recovered easily in case of failure.
Scalability and Flexibility: Synchronization facilitates the seamless integration of new systems or devices
as an organization grows, ensuring data remains accessible and consistent regardless of the number of
platforms.