A small distributed key-value system implemented in Java. Includes TCP/UDP clients and servers, plus a Proxy that discovers nodes and forwards requests to the correct node.
- TCPServer / UDPServer: serves a single key-value pair (configured via CLI arguments)
- TCPClient / UDPClient: sends commands to a server/proxy
- Proxy: discovers available nodes using
GET NAMESand forwards requests over TCP or UDP
- GET NAMES
- GET VALUE
- SET
- QUIT
From the project root: javac *.java
Start one or more servers (each with its own key), then start the Proxy, then query via client.
Start TCP server: java TCPServer -port -key -value
Start UDP server: java UDPServer -port -key -value
Start Proxy: java Proxy -port <LOCAL_PORT> -server [-server ...]
Client examples: java TCPClient -address -port -command GET NAMES java TCPClient -address -port -command GET VALUE java TCPClient -address -port -command SET