In addition to the query functionality (put, get), the server has to provide the following control functionality to the ECS. Since all these operations have to be invoked by the ECS remotely you have to define a suitable admin message format to pass the commands along with the parameters.
Initialize the KVServer with the meta-data, it’s local cache size, and the cache displacement strategy, and block it for client requests, i.e., all client requests are rejected with an SERVER_STOPPED error message; ECS requests have to be processed.
start()
Starts the KVServer, all client requests and all ECS requests are processed.
stop()
Stops the KVServer, all client requests are rejected and only ECS requests are processed.
shutDown()
Exits the KVServer application.
lockWrite()
Lock the KVServer for write operations.
unLockWrite()
Unlock the KVServer for write operations.
moveData (range, server)
Transfer a subset (range) of the KVServer’s data to another KVServer (reallocation before removing this server or adding a new KVServer to the ring); send a notification to the ECS, if data transfer is completed.
update(metadata)
Update the meta-data repository of this server.
Note: in my interpretation these operations are received via network from ECS. The ECS starts the KVServer itself by a java -jar ms3-server.jar <port> <debug_level> command, and the server is ready but only accepts ECS connections. For an accidental client connection it responds SERVER_STOPPED, because it was not initialized yet. (Just to clarify why we need the initKVServer command.)
In addition to the query functionality (put, get), the server has to provide the following control functionality to the ECS. Since all these operations have to be invoked by the ECS remotely you have to define a suitable admin message format to pass the commands along with the parameters.
Note: in my interpretation these operations are received via network from ECS. The ECS starts the KVServer itself by a
java -jar ms3-server.jar <port> <debug_level>
command, and the server is ready but only accepts ECS connections. For an accidental client connection it responds SERVER_STOPPED, because it was not initialized yet. (Just to clarify why we need the initKVServer command.)