Skip to content

Distributed File System built in a Microservices environment.

Notifications You must be signed in to change notification settings

Elia-Renzoni/MessDFS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 

Repository files navigation

MessDFS

MessDFS is a distributed file system built in a microservices environment that allows users to manage a remote space to work with their CSV files.

Project Features

  • Possibility to work with remote files and directories.
  • Possibility to read friends' files.

Microservices Communication

There are two microservices: the first one controls the remote resources of each user, such as directories and files, while the second one stores all the information on a PostgreSQL instance. This information is essential to ensure exclusive access for users to their own directories and files. Therefore, the communication between the two microservices revolves around this aspect, where the storage microservice communicates with the auth microservice when it needs to verify if the user of the transaction is the owner of the indicated directories or if a user can read another user's file based on friendship relations. Additionally, the storage microservice also communicates with auth when a user decides to delete a directory, removing both the logical and physical directory.

API

Storage

  • insert data into a csv file
http://<IP address>:8081/csvi
{
    "txn_user": "<transaction user>",
    "query_type": "insert",
    "user": "<directory name>",
    "file_name": "<file name>",
    "query_content": ["<values>"]
}
  • directory creation
http://<IP address>:8081/ndir
{
    "txn_user": "<transaction user>",
    "dir_to_create": "<directory>"
}
  • update csv file
http://<IP address>:8081/csvu
{
    "txn_user": "<transaction user>",
    "query_type": "update",
    "user_name": "<directory name>",
    "file_name": "<file name>",
    "query_content": {
        "<column name>": ["id", "old data value", "new data value"]
    }
}
  • read data
http://<IP address>:8081/csvr/{txn user}/{friend name}/{directory}/{file name}?id=<id value>
  • delete directory
http://<IP address>:8081/ddir/{txn user}/{directory to delete}
  • delete file
http://<IP address>:8081/dfile/{txn user}/{file to delete}/{directory}
  • delete data
http://<IP address>:8081/csvd/{txn user}/{directory}/{file name}?id=<id value>

Auth

  • signup
http://<IP address>:8083/signup
{
    "username": "<name>",
    "password": "<password>"
}
  • add friend
http://<IP address>:8083/add-friend
{
    "username": "<name>",
    "friend_username": "<friend username>"
}
  • add directory
http://<IP address>:8083/add-directory
{
    "username": "<name>",
    "directory": "<directory>"
}
  • delete directory
http://<IP address>:8083/delete-dir?directory=<directory>
  • delete-friend
http://<IP address>:8083/delete-friend?friend=<friend name>
  • login
http://<IP address>:8083/login?username=<username>&password=<password>
  • check ownership
http://<IP address>:8083/ownersship?txn=<username>&dir=<directory>
  • check friendship
http://<IP address>:8083/friendship?txn=<name>&friend=<name>
  • get directories
http://<IP address>:8083/directories?username=<name>
  • get friends
http://<IP address>:8083/friends?username=<name>
  • search users
http://<IP address>:8083/search-friend?username=<name>

About

Distributed File System built in a Microservices environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published