Skip to content

Distributed file system using Raft Consensus protocol

Notifications You must be signed in to change notification settings

Deependra-Patel/cs733

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cs733

Assignment 1

File Server in go

Commands :

  1. Write: create a file, or update the file’s contents if it already exists.
    Usage : write <filename> <numbytes> [<exptime>]\r\n<content bytes>\r\n
    Response : OK <version>\r\n
  2. Read: Given a filename, retrieve the corresponding file.
    Usage: read <filename>\r\n
    Response : CONTENTS <version> <numbytes> <exptime>\r\n <content bytes>\r\n
  3. Compare and swap. This replaces the old file contents with the new content provided the version is still the same.
    Usage: cas <filename> <version> <numbytes> [<exptime>]\r\n <content bytes>\r\n
    Response : OK <version>\r\n
  4. Delete file
    Usage: delete <filename>\r\n
    Response: OK\r\n

Errors :

  1. ERR_VERSION\r\n (the contents were not updated because of a version mismatch)
  2. ERR_FILE_NOT_FOUND\r\n (the filename doesn’t exist)
  3. ERR_CMD_ERR\r\n (the command is not formatted correctly)
  4. ERR_INTERNAL\r\n (any other error you wish to report that is not covered by the rest)

Bugs :

  1. If the power fails, then all the data is lost

About

Distributed file system using Raft Consensus protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published