0% found this document useful (0 votes)
18 views

Distributed Systems Detailed Explanation

Fggjnn

Uploaded by

maulisingh08
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)
18 views

Distributed Systems Detailed Explanation

Fggjnn

Uploaded by

maulisingh08
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
You are on page 1/ 5

Distributed Systems Detailed Explanation

1. (a) What is a Distributed System?

A Distributed System is a network of independent computers that collaborate to present themselves

as a single, coherent system to users.

The computers communicate by passing messages, sharing resources such as computational

power, data, and software, while maintaining

high availability and fault tolerance. Each node in the system functions autonomously but works

together to accomplish tasks, allowing

for scalability and redundancy.

Examples of distributed systems include cloud platforms such as Amazon Web Services (AWS),

where many servers distributed across the

globe provide services to users in a unified manner.

(b) Goal of Distributed Systems

The primary goals of distributed systems are:

- Transparency: Users should interact with the system as though it's a single, unified system, even

though it's distributed. This includes:

- Access transparency: Users access remote resources as if they are local.

- Location transparency: The physical location of resources shouldn't matter to the user.

- Scalability: The system should efficiently handle a growing number of nodes or tasks by distributing

the load evenly across the network.

- Fault Tolerance: The system should continue to function even if some of its components fail, using

redundancy and error detection mechanisms.


- Concurrency: Multiple users should be able to access shared resources simultaneously without

conflict or data corruption.

- Resource Sharing: All users should be able to access resources, such as data, hardware, or

services, across the distributed network seamlessly.

(c) System Model in Distributed Systems

The system model of a distributed system describes how components in the system are structured,

how they communicate, and how resources

are shared. Distributed systems can be understood in terms of three different models:

1. Physical Model: Defines how the hardware components (e.g., computers, servers) are physically

distributed and connected over a network.

- Example: A global cloud system with servers in different regions connected via the internet.

2. Logical Model: Describes how processes interact logically, focusing on communication, task

delegation, and coordination between system components.

- Example: In a client-server model, clients send requests, and servers respond to those requests,

regardless of their actual physical locations.

3. Architectural Model: Describes the software organization of the system, which includes how

services, applications, or layers interact.

- Example: A peer-to-peer (P2P) system where all nodes are equal and can act as both clients and

servers.

(d) Issues in the Design of Distributed Systems

Several key issues must be addressed when designing a distributed system:

1. Heterogeneity: Different computers may have different hardware, operating systems, and network

protocols. A distributed system must work seamlessly across these diverse environments.
2. Transparency: Hiding the distributed nature of the system from users is challenging but necessary

for ease of use and consistency.

3. Scalability: As the number of nodes or users increases, the system must handle increased load

without sacrificing performance.

4. Fault Tolerance: The system must detect and recover from failures automatically, ensuring

minimal disruption to services.

5. Concurrency: Many processes may need to access the same resources at the same time,

requiring careful synchronization to avoid inconsistencies or conflicts.

6. Security: Ensuring secure communication and resource sharing in a distributed system is

essential since data is transmitted over potentially unsecured networks.

Unit-II

2. (a) Define Message Passing

Message Passing is a form of communication used in distributed systems where different processes

(or nodes) send and receive messages to

exchange data. Unlike shared-memory systems, there is no common memory, and all

communication occurs by transmitting data between nodes.

Message passing can be synchronous (where the sender waits for the receiver to get the message)

or asynchronous (where the sender continues without waiting).

Examples include APIs, messaging protocols like REST, or middleware like Apache Kafka.

(b) Remote Procedure Call (RPC) Model

Remote Procedure Call (RPC) is a communication model where a procedure (or function) is

executed on a remote server, but it appears to the

client as if it were a local call. The client doesn't need to manage the details of the network
communication; the system abstracts it away.

Example:

A client application needs to fetch user data from a remote database server. Using RPC, the client

sends a request to the server, which executes the requested operation and returns the results.

Steps in RPC:

1. The client calls a procedure as if it were local.

2. The arguments are packed (marshaled) into a message and sent to the server.

3. The server receives the message, unpacks the arguments, and executes the procedure.

4. The result is sent back to the client in a similar fashion.

(c) Describe Marshaling, with Suitable Example

Marshaling refers to the process of converting the parameters or arguments of a procedure into a

format that can be sent over the network.

Unmarshaling is the reverse process of converting the received data back into its original format for

use by the remote procedure.

Example:

In an RPC call where a client sends two integers to a server to add them, the integers must be

serialized into a byte stream before being

sent over the network. The server then deserializes (unmarshals) the byte stream back into integers,

performs the operation, and sends the result back.

(d) What is RMI? Explain

Remote Method Invocation (RMI) is a Java-specific mechanism for invoking methods on an object

located on another Java Virtual Machine (JVM),


possibly running on a different physical machine. Unlike RPC, which is procedural, RMI is

object-oriented and allows for remote method invocation

in a more structured manner.

RMI allows objects to call methods on other objects located remotely, hiding the complexity of

network communication. This enables distributed

applications to maintain an object-oriented approach while interacting with objects that may be

located anywhere on the network.

Key Components of RMI:

1. Remote Objects: Objects that reside on remote JVMs.

2. Stub and Skeleton: The stub acts as a proxy on the client side, while the skeleton resides on the

server side, handling incoming requests.

Example:

In a distributed banking application, a client can invoke the getBalance() method of a remote object

representing a user's bank account. The

server hosting the bank account processes the request and returns the result.

You might also like