JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2021 DISTRIBUTED SYSTEMS Previous Question Paper (July/August - 2021 - R15)
Answer any five questions
All questions carry equal marks
Main
Discuss about Java RMI with relevant example and diagram.
Answer
Java Remote Method Invocation (RMI) is a mechanism that allows an object residing in one Java Virtual Machine (JVM) to invoke methods on an object residing in another JVM. It enables the development of distributed applications by treating remote objects as local objects, abstracting the complexities of network communication.
The architecture of Java RMI consists of three primary layers:
- Stub/Skeleton Layer: The stub acts as a proxy for the remote object on the client side, while the skeleton handles the incoming requests on the server side.
- Remote Reference Layer: This layer manages the semantics of remote invocation, such as unicast or multicast communication and persistent object references.
- Transport Layer: This layer handles the actual connection setup, data transmission, and management of the TCP/IP-based network communication.
The process flow involves the server creating a remote object, exporting it, and registering it with the RMI Registry. The client then looks up the object in the registry, receives a stub, and invokes methods on it as if it were a local object.
Example:
1. Define a Remote Interface extending java.rmi.Remote.
public interface Calculator extends Remote { public int add(int a, int b) throws RemoteException; }2. Implement the interface and export the object.
public class CalculatorImpl extends UnicastRemoteObject implements Calculator { public int add(int a, int b) { return a + b; } }3. Register the object using Naming.rebind("rmi://localhost/Calc", obj);.
Diagram Description:
The RMI communication process is visualized as a flow: The Client calls a method on the Stub. The Stub marshals the arguments and sends them through the Remote Reference Layer and Transport Layer to the server. On the server, the Transport Layer receives the request, passes it to the Skeleton (or directly to the implementation in modern Java), which unmarshals the arguments, executes the method on the actual Remote Object, and sends the result back through the same layers in reverse order to the client.
What are the advantages and disadvantages of distributed systems over centralized systems?
Answer
Distributed systems offer several advantages over centralized systems, including resource sharing, where hardware and software resources can be accessed by multiple users; scalability, allowing the system to grow by adding more nodes; reliability, as the system can continue to function even if individual components fail; and incremental growth, enabling cost-effective expansion. However, they also face significant disadvantages: complexity in design and implementation; security concerns due to multiple access points and network exposure; network dependency, where performance is limited by bandwidth and latency; and data consistency challenges, as maintaining a coherent state across distributed nodes is difficult.
Write short notes on the design issues of DS.
Answer
Sign in to view the complete answer paper.
Explain about name services domain name systems in distributed systems.
Answer
Sign in to view the complete answer paper.
Explain in detail about distributed file systems.
Answer
Sign in to view the complete answer paper.
What are the requirements of the distributed file system?
Answer
Sign in to view the complete answer paper.
Write short notes on distributed mutual exclusion.
Answer
Sign in to view the complete answer paper.
Discuss about peer to peer systems.
Answer
Sign in to view the complete answer paper.
Explain about working of pastry and tapestry overlays in distributed systems.
Answer
Sign in to view the complete answer paper.
Explain about optimistic concurrency control mechanism in distributed system.
Answer
Sign in to view the complete answer paper.
Explain in detail about Kerberos.
Answer
Sign in to view the complete answer paper.
Write a note on digital signatures.
Answer
Sign in to view the complete answer paper.