Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Communication between Name and Storage servers

bogotolec edited this page Oct 7, 2020 · 5 revisions

Initialization

First,

  1. in the config of Storage server we define IP address of Name server
  2. in the config on Name Server we define Network, where we expect Storage Server connections from

After Storage server was launched, it sends message that it was launched to the Name server

After this action, Name server will add the Storage Server into the list of Storage Servers. Now there are several possibilities for new communications between Name Server and Storage server.

Name Server opens connection

Possible reasons of communication:

  1. Give token for giving file to client
  2. Give token for getting file from client
  3. Give token for getting file from server
  4. Evaluation of custom command
  5. Ping Storage Server

For all these scenarios, there is a single schema of communication:

Request format:

  1. Give file to user or to storage server

  1. Get the file from user

  1. Get the file from server

  1. Eval of the given command

  1. Ping

Response format:

Storage Server opens connection

This might be in only one case - Reporting. Report format

Response for report the same as Storage Server's response: Single byte with status code

Communication between Storage Servers

This might be in only one case - when one storage server needs to download a file from another.

And, then

Communication with the Name Server was described above, and communication between Storage Servers as the same as between Storage Server and Client

Clone this wiki locally