Skip to content

OBenner/distributed-key-value-store

Repository files navigation

Distributed key-value store

diagram

Description

In this exercise, you will build and document a system that is intended for accepting and storing the Map<K, V> objects in distributed way.

How does your system work?

This project implements distributed key value storage. The key element of the system is the server module - this module includes the storage itself, implemented with the help of a ConcurrentHashMap and the implementation of network interaction with the client application. When launching this module, the application allows you to access it using the netty server and opening a network communication channel on a specific port.
The server accepts messages in the form of a string, the message separator is the line break characters \r\n.

The server supports interaction with the following commands:

  • PUT key:value Accepts a key:value pair and sends it to the server. Where key is any integer and value is any string.
  • GET key Performs to server and tries to retrieve the value for requested key. If the value is found then it should print it to the console. Otherwise it should print the ERR to console
  • SHUTDOWN Shutdowns the server itself

The client module implements a mechanism for interacting with distributed storage. During execution, the key is used to calculate server number (the storage server) in which the information should be contained.

  • node number = key.hash % count nodes

The client supports interaction with the following commands:

  • PUT key:value Accepts a key:value pair and sends it to the server. Where key is any integer and value is any string.
  • GET key Performs to server and tries to retrieve the value for requested key. If the value is found then it should print it to the console. Otherwise it should print the ERR to console
  • QUIT Disconnects the client from server and closes the client program with printing BYE
  • SHUTDOWN Shutdowns the server itself and then closes all client programs which were connected to it

How to run?

  • build.sh - create docker container for server code
  • run-server.sh - asks about how many nodes you want to run
  • run-client.sh - asks about addresses for server nodes, put with
  • host_server1:port,host_server1:port,host_serverN:port

What consistency guaranties does your system provide?

  • Processor consistency

What documentation, websites, papers, etc did you consult in doing this assignment?

What third-party libraries or other tools does the system use?

sbt,netty

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published