Distributed storage of map objects
System has three components:
- master server (manages clients and workers, process commands of distributed map)
- worker (single part of distributed map - stores map entries)
- client (console application - allows to send commands to server)
Commands from clients are sent to the server. Server process commands to store data into and get data from distributed map.
- put key:value (puts entry into distributed map (key - integer, value - string))
- get key (gets value by thie given key from distributed map)
- quit (disconnects client form server)
- shutdown (shutdowns server)
preconditions:
- docker must be installed
usage:
- build application by running of build.sh
- start master server (run-server.sh) with the given number of workers (by default - 2 workers)
- start clients (run-clients.sh) and send commands to the server
logging:
- system logs to /tmp/distributed_map.log
- all data stored in memeory and workers can be added/removed manually, so
- if we stop the server, all data will be lost
- if we manually stop some worker, all data stored in this worker will be lost
- if we manually start new worker after server is started and some data is stored in distributed map, part of stored data will not be available
- the system has not been tested under high load
- Netty in Action by Norman Maurer, Marvin Allen Wolfthal
- https://netty.io/
- https://docs.docker.com/
- Intellij Idea
- Maven
- Netty
- Spring boot
- Logback
~40 hours
- use-case "shutdown" doesn't not work correctly (client nodes don't stop)