A client-server architecture that communicates with Remote Procedure Calls (RPC). Implemented using Java RMI. The server is multi-threaded such that it can handle multiple outstanding client requests at once.
It's set up to allow multiple concurrent clients to communicate with it and perform three basic operations:
- PUT(key, value)
- GET(key)
- DELETE(key)
- Open up two terminal windows and navigate to
/Project2/src
- In one window, type
javac server/*.java utils/*.java
(hit ↩), followed byjava server.Main <Port#>
, where<Port#>
is the port number the registry is located at (hit ↩) - The server is now running
- In the other window, type
javac client/*.java utils/*.java
(hit ↩), followed byjava client.Main <Port#>
, wherePort#
is the server's registry's port number (it has to match the server's) (hit ↩) - The client is now running
- The predefined protocol is:
PUT:key:value
(hit ↩)GET:key
(hit ↩)DELETE:key
(hit ↩)
- To shut down the application, type
stop
(hit ↩) orshutdown
(hit ↩)