Distributed Systems
1. Describe precisely what is meant by a scalable system.
Scalability can be achieved by applying different techniques.
What are these techniques.
A scalable system is a system that can handle increasing workload or
users by adding more resources without reducing performance.
In simple words, when the number of users, data, or requests
increases, the system can still work efficiently by expanding its
resources such as servers or storage.
Techniques to Achieve Scalability
1. Vertical Scaling (Scaling Up) – Upgrade the resource.
o In this technique, the power of a single computer is
increased.
o We add more CPU, RAM, or storage to the existing system.
2. Horizontal Scaling (Scaling Out) – Adding more resources.
o In this technique, more computers or servers are added
to the system.
o The workload is divided among many machines.
3. Load Balancing
o Load balancing basically focuses on avoiding a load on a
single server.
o It distributes user requests among multiple servers.
4. Caching
o Frequently used data is stored temporarily in memory.
o This helps the system respond faster.
5. Data Partitioning (Sharding)
o Large data is divided into smaller parts and stored on
different servers.
o This helps manage large amounts of data efficiently.
Distributed Systems
Example:
Websites like online shopping or food delivery systems must support
millions of users at the same time, so they need scalable systems.
2. Explain the concept of Web Service. Illustrate an application
with suitable diagram that combines other web services.
A Web Service is a software system that allows different applications
to communicate with each other over the internet.
The data present in a system is mostly raw i.e. written in different
programming languages and running on different platforms which makes
it difficult for communication purpose.
In this situation web services comes in consideration.
Web services use standard protocols such as HTTP, XML, or JSON to
send and receive data.
Example: Online Travel Booking System.
A travel website may combine different web services to provide
complete service to users.
Flight Booking Web Service – provides flight details and
booking.
Hotel Booking Web Service – provides hotel availability and
reservation.
Payment Gateway Web Service – processes online payment.
Distributed Systems
3. What are the two architectural styles stemming from the
role of individual processes? Discuss in brief, the placement
strategies in Peer-to-Peer architecture.
Client–Server Architecture
In this architecture, the system is divided into clients and servers.
The client sends a request for a service.
The server processes the request and sends the response.
The server usually manages data and resources.
Example: Web browser requesting data from a web server.
Peer-to-Peer (P2P) Architecture
In this architecture, all computers (peers) are equal.
Each peer can act as both a client and a server.
Peers share resources, files, and services directly with each
other.
Example: File sharing systems.
Distributed Systems
Placement strategies decide how peers are organized and connected
in the network.
1. Random Placement
o Peers join the network randomly without any fixed structure.
o It is simple but searching data may take more time.
2. Structured Placement
o Peers are organized using a specific structure or
algorithm.
o This makes searching for data faster and more efficient.
3. Super-Peer Placement
o Some powerful peers act as super peers.
o These super peers manage and coordinate other normal
peers in the network.
4. Explain the concept of Heterogeneity in Distributed System.
How it deals with Heterogeneity?
Heterogeneity means different types of systems working together in
a distributed environment.
In a distributed system, computers may have different hardware,
operating systems, networks, and programming languages, but
they still communicate and work together.
Examples of Heterogeneity
1. Different hardware (PC, laptop, server, mobile).
2. Different operating systems (Windows, Linux, macOS).
3. Different programming languages (Java, Python, C++).
4. Different network technologies.
How Distributed Systems Deal with Heterogeneity
1. Middleware
o Middleware is software that acts as a bridge between
different systems.
Distributed Systems
o It allows different applications to communicate easily.
2. Standard Communication Protocols
o Protocols like HTTP, TCP/IP are used so different systems can
exchange data.
3. Standard Data Formats
o Formats such as XML or JSON help systems understand
shared data.
4. Virtual Machines / Platforms
o Technologies like Java Virtual Machine (JVM) allow
programs to run on different systems.
5. Enlist the main challenges while designing the Distributed
System. Explain the role of mobile code and virtual machine
in handling the design challenge of heterogeneity.
Main Challenges in Designing Distributed Systems
1. Heterogeneity
o Different hardware, OS, and programming languages must
work together.
2. Scalability
o The system should handle increasing users and workload
efficiently.
3. Security
o Data and communication must be protected from
unauthorized access.
4. Fault Tolerance
o The system should continue working even if some
components fail.
5. Transparency
Distributed Systems
o The system should appear as a single system to users even
though many computers are involved.
Role of Mobile Code in Handling Heterogeneity
Mobile code is a program that can move from one computer to
another and execute there.
It allows code to run on different systems without major
changes.
Example: Java applets or scripts downloaded from the
internet.
Role of Virtual Machine in Handling Heterogeneity
A Virtual Machine (VM) provides a common execution
environment for programs.
Programs are written once and can run on any system that
supports the VM.
Example: Java Virtual Machine (JVM) allows Java programs to
run on Windows, Linux, or macOS.
6. Explain what is meant by distribution transparency and give
example of different types of transparency.
Distribution transparency means hiding the complexity of a
distributed system from users.
The system appears to the user as a single system, even though it is
made up of many computers working together.
In simple words, users do not know or need to know that multiple
machines are involved.
Example:
When we use cloud storage, we do not know where the data is actually
stored. The system manages it automatically.
Types of Distribution Transparency
1. Location Transparency……………….
Distributed Systems
o Users do not know the physical location of resources.
o Example: Accessing a file without knowing which server stores
it.
2. Migration Transparency………………….
o Resources can move from one location to another without
affecting users.
3. Replication Transparency………………………
o Multiple copies of data exist, but users see only one copy.
4. Failure Transparency…………………………
o The system continues working even if some components
fail.
5. Concurrency Transparency…………..
o Multiple users can access the same resource at the same
time without conflict.
7. What are fundamental models? Discuss in brief, the
interaction, failure, and security aspects in the fundamental
models.
Fundamental models are basic models used to understand & design
DS.
They help in studying how processes communicate, how failures
occur, and how security is maintained in the system.
The three important fundamental models are:
1. Interaction Model
The interaction model describes how processes communicate with
each other in a distributed system.
It considers factors like communication delay, message passing, and
process execution speed.
Distributed Systems
Since computers are connected through networks, communication may
take time.
Example:
Sending a request from one server to another over a network.
2. Failure Model
The failure model describes different types of failures that may occur
in a DS.
Failures can happen due to hardware problems, software errors, or
network issues.
Types of Failures:
Crash Failure – A system stops working completely.
Timing Failure – A response is delayed beyond the expected time.
3. Security Model
The security model focuses on protecting data and communication in
DS.
It prevents unauthorized access and attacks.
Security mechanisms include:
Authentication – Verifying the identity of users.
Encryption – Protecting data during transmission.
Access Control – Allowing only authorized users to access
resources.
8. Explain in brief, various system models to capture the
properties and design issues of distributed systems.
System models help to understand the behavior, properties, and design
issues of distributed systems.
They describe how different components interact and how the system
handles communication, failures, and security.
The main system models are:
1. Physical Model
Distributed Systems
The physical model describes the actual hardware components of
the distributed system.
It shows how computers, devices, and networks are connected.
Example: Servers, personal computers, and mobile devices
connected through a network.
2. Architectural Model
The architectural model shows how system components are
organized and interact.
It defines the structure of the distributed system.
Examples: Client–Server Architecture & Peer-to-Peer Architecture
3. Fundamental Model
The fundamental model describes the basic assumptions about the
distributed system.
It helps understand system behavior and design challenges.
It includes:
Interaction Model – How processes communicate.
Failure Model – Types of failures that may occur.
Security Model – Protection of data and communication.
9. What are the entities that are communicating in the
distributed system? Discuss in brief, how do they
communicate using communication paradigm?
In a distributed system, the main entities that communicate with each
other are processes.
A process is a running program on a computer.
These processes may run on different machines connected through a
network, and they exchange information to perform tasks.
Sometimes communication may also occur between clients and servers,
where:
Distributed Systems
Client sends a request
Server processes the request and sends a response
1. What is the concept of middleware? Explain in brief,
Message Oriented and Content Centric Middleware.
Middleware is a software layer placed between the operating
system and applications in a distributed system.
It helps different applications or computers communicate and share
data easily.
It hides the complexity of network communication and provides
common services for distributed applications.
Message-Oriented Middleware (MOM)
Distributed Systems
Message-Oriented Middleware allows applications to communicate
by sending and receiving messages.
Working:
One application sends a message to a queue.
The middleware stores and forwards the message to the receiver.
The receiver reads the message when it is available.
Example: Email system or message queue systems.
Content-Centric Middleware
Content-Centric Middleware focuses on data or content instead of
the sender or receiver.
Working:
Applications request specific data or information.
The middleware finds and delivers the required content from
available sources.
Example: Data-sharing systems, sensor networks.
2. What is CORBA? Give a brief description of the marshalling
operation in CORBA with suitable example.
CORBA (Common Object Request Broker Architecture) is a
middleware standard developed by the Object Management Group.
It allows objects written in different programming languages and
running on different machines to communicate with each other in a
distributed system.
The Object Request Broker (ORB) in CORBA acts as a communication
bridge between the client and server objects.
Marshalling in CORBA
Distributed Systems
Marshalling is the process of converting object data and method
parameters into a standard format so that they can be transmitted
over the network.
After reaching the receiver side, the data is converted back to its
original form. This process is called Unmarshalling.
Steps in Marshalling:
Client calls using a request.
Parameters & Objects are converted into a Standard format
(Marshalling).
The message is sent through ORB over the network.
Server receives the message and converts it back to original
data (Unmarshalling).
The server executes the request and sends the result back.
Example
Suppose there is a request:
add(5, 10)
The numbers 5 and 10 are converted into a byte stream
(Marshalling).
The message is sent to the server through ORB.
The server unmarshals the data, performs the addition, and
returns 15.
3. What is DCE? Discuss in brief, the various components of
DCE.
DCE (Distributed Computing Environment) is a middleware
framework used to develop and support distributed applications.
It was developed by the Open Software Foundation to allow different
computers in a network to communicate and share resources.
DCE provides a set of services and tools that help applications run
across multiple systems as if they are part of a single system.
Distributed Systems
Components of DCE
1. Remote Procedure Call (RPC)
RPC allows a program on one computer to call a procedure on another
computer in the network.
It makes remote communication look like a local function call.
2. Directory Service
The directory service helps in locating resources such as servers,
files, or services in the distributed system.
3. Security Service
DCE provides authentication and authorization to ensure that only
authorized users can access resources.
4. Distributed File Service (DFS)
DFS allows users to access files stored on remote machines as if they
are on the local system.
5. Time Service
The time service synchronizes clocks of different computers in the
distributed system to maintain consistency.
4. What is External Data Representation (XDR)? Explain in
brief, three alternative approaches to external data
representation.
External Data Representation (XDR)
XDR (External Data Representation) is a standard format used to
represent data so that different computer systems can exchange
data easily in a distributed system.
Different computers may use different data formats, byte orders, or
architectures.
Distributed Systems
XDR converts the data into a common standard format before
sending it over the network.
After receiving the data, the system converts it back to its original
format.
Alternative Approaches to External Data Representation:
1. COBRA
CORBA (Common Object Request Broker Architecture) is a
middleware standard developed by the Object Management
Group.
It allows objects written in different programming languages
and running on different machines to communicate with each
other in a distributed system.
2. Java Object Serialization
Converts a Java object into a byte stream so it can be sent
over a network.
At the receiver side, the byte stream is converted back into
the original object (deserialization).
3. XML-Based Representation
Stores data in text format using tags, which is easy to read
and understand.
Helps different systems and applications exchange data
easily because XML is platform independent.
5. What is serialization and deserialization in Java? Discuss in
brief, the use of reflection with respect to Java language.
Serialization
Distributed Systems
Serialization is the process of converting a Java object into a byte
stream.
It helps to store the object in a file or send it over a network.
It saves the state (data) of the object.
Used in distributed systems and data transfer.
Deserialization
Deserialization is the reverse process of serialization.
It converts the byte stream back into the original Java object.
It helps to recreate the object from stored data.
Commonly used when reading objects from files or networks.
Reflection in Java
Reflection is a feature that allows a program to inspect classes,
methods, and fields at runtime.
It is provided by the Java Reflection API.
It helps to get information about classes during program
execution.
It allows programs to create objects and call methods
dynamically.
It is widely used in frameworks, debugging tools, and development
environments.
6. What is interceptor? Explain how remote-object invocation is
handled using interceptors.
Distributed Systems
Interceptor
An Interceptor is a software component used in distributed
systems to intercept or capture a request before and after it
is processed.
It works like a middle layer between client and server.
It allows additional services such as logging, security,
monitoring, and transaction handling without changing the
main program.
Remote Object Invocation using Interceptors
i. The client sends a request to invoke a method on a remote
object.
ii. The client-side interceptor captures the request before it is
sent to the server.
iii. The request is then transmitted over the network to the
server.
iv. The server-side interceptor receives and processes the
request before passing it to the remote object.
v. The remote object executes the method and generates the
result.
vi. The server interceptor processes the response and sends it
back to the client.
vii. The client interceptor receives the response and returns the
result to the client application.
Distributed Systems
7. What is adaptive software? Describe the concept of Separation of
concerns and computational reflection in relation to adaptive
software.
Adaptive Software
Adaptive software is software that can change its behavior
automatically according to changes in the environment or
system conditions.
It helps the system adjust to new requirements, network
conditions, or workloads.
Adaptive software is commonly used in distributed systems to
improve performance and reliability.
Separation of Concerns
Separation of concerns means dividing a program into
different parts, where each part handles a specific task or
functionality.
This makes the system easier to develop, understand, and
maintain.
In adaptive software, this concept helps to separate the core
application logic from adaptation mechanisms.
Computational Reflection
Computational reflection is the ability of a program to observe
and modify its own behavior during execution.
It allows the system to analyze its current state and make
changes when required.
In adaptive software, reflection helps the system adapt
dynamically according to system conditions.
Distributed Systems
8. Differentiate between RMI and CORBA.
Basis RMI CORBA
Full Form Remote Method Common Object Request
Invocation Broker Architecture
Programming Works mainly with Supports multiple
Language Java language programming languages
Platform Mostly used in Java- Works on different
Support based systems platforms and languages
Interface Uses Java interfaces Uses IDL (Interface
Definition Definition Language)
Communication Communication is Communication is done
done using Java using ORB (Object
objects Request Broker)
Complexity Simple and easy to More complex system
implement
Usage Used in Java Used in large
distributed heterogeneous
applications distributed systems
Distributed Systems
9. Discuss the following middleware object in RMI:
i. Proxy ii. Dispatcher
1. Proxy
Proxy is a middleware object present on the client side in Java
Remote Method Invocation.
It acts as a local copy or representative of the remote object.
The client program calls methods on the proxy just like a
normal local object.
The proxy receives the method call from the client
application.
It then converts the method call and parameters into a
message so that it can be sent over the network.
After converting the request, the proxy sends the request to the
server where the actual remote object exists.
When the server sends the result back, the proxy receives the
response and returns it to the client program.
2. Dispatcher
Dispatcher is a middleware object present on the server side.
It receives the request sent by the proxy from the client.
The dispatcher analyzes the request and identifies which
method should be executed.
It then forwards the request to the correct remote object on
the server.
The remote object executes the requested method.
After execution, the result is sent back to the dispatcher.
The dispatcher then sends the result back to the proxy on the
client side.
If you draw a small flow like this, you get extra impression marks:
Distributed Systems
Client → Proxy → Network → Dispatcher → Remote Object → Result Back
10. Explain XML-based Web Services Middleware along
with SOAP and REST protocols.
XML-Based Web Services Middleware
XML-based web services middleware is a technology used for
communication between different applications over the
internet.
It allows applications written in different programming
languages and running on different platforms to exchange
data.
The communication is done using XML (Extensible Markup
Language) which provides a standard format for data
exchange.
It is widely used in distributed systems and web applications.
Web services mainly use SOAP and REST protocols for
communication between client and server.
SOAP Protocol
SOAP (Simple Object Access Protocol) is a protocol used to
exchange structured information in web services.
It uses XML format for sending and receiving messages
between applications.
SOAP messages are usually transmitted using HTTP protocol
over the internet.
It provides features like security, reliability, and error handling.
SOAP is commonly used in enterprise-level web services.
REST Protocol
REST (Representational State Transfer) is an architectural style
used for developing web services.
Distributed Systems
It uses standard HTTP methods such as GET, POST, PUT, and
DELETE.
REST services are simple, lightweight, and easy to use
compared to SOAP.
Data can be transferred using XML or JSON format.
REST is widely used in modern web and mobile applications.