-
Notifications
You must be signed in to change notification settings - Fork 0
/
Summary.txt
13 lines (8 loc) · 2.57 KB
/
Summary.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
Arpan Rakesh Patel
Late Days Left: 4
Assignment Summary:
The purpose of this assignment is to extend the previous project by incorporating two significant enhancements i.e Java RMI communication and Multithreading. Firstly, communication between the client and server is communicating via Remote Procedure Calls (RPC), utilizing frameworks such as Java RMI. This enabled seamless invocation of remote methods. Secondly, the server is transformed into a multi-threaded system capable of handling concurrent client requests, employing thread pools. Mutual exclusion is implemented to ensure thread safety and prevent data corruption. For the same, it was required to populate the key-value store through the client and perform at least five PUT, GET, and DELETE. Thus, in a nutshell this project focuses on the RPC-based communication and the server's ability to handle concurrent operations.
Technical Impression:
The technical impression of this project is that it demonstrates a multi-threaded key-value store server using RPC (Remote Procedure Call) for communication between the client and server. The server class implements the `RemoteInterface`, defining the remote methods for performing PUT, GET, and DELETE operations on the key-value store. The server utilizes synchronization to handle concurrent client requests and ensure mutual exclusion while accessing the shared key-value store. The server class Server implements the `RemoteInterface`, which defines the remote methods for performing key-value store operations using RPC. The request method in the server handles concurrent operations by synchronizing access to the key-value store, ensuring mutual exclusion.
The client obtains the remote object stub from the RMI registry using `registry.lookup("KeyValueServer")`, and then calls the remote methods on the stub to perform operations on the server. The server is made multi-threaded by using the synchronized keyword in the request method. This allows multiple client requests to be handled concurrently while ensuring thread safety and avoiding data corruption in the key-value store. It supports commands and provides functionality for PUT, GET, and DELETE operations. Additionally, the client pre-populates the key-value store with data and performs a set of predefined operations to demonstrate the functionality.
Overall, the code effectively demonstrates a multi-threaded key-value store server that communicates with the client using RPC. It ensures mutual exclusion, handles concurrent client requests, and provides the necessary functionality for PUT, GET, and DELETE operations on the key-value store.