Giter Site home page Giter Site logo

minidfs's Introduction

miniDFS

Simple version of Distributed File System

Design a Mini Distributed File System (Mini-DFS), which contains

  • A client
  • A name server
  • Four data servers img

Mini-DFS is running through a process. In this process, the name server and data servers are different threads

Basic functions of Mini-DFS

  • Read/write a file
  • Upload a file: upload success and return the ID of the file
  • Read the location of a file based on the file ID and the offset

File striping

  • Slicing a file into several chunks
  • Each chunk is 2MB
  • Uniform distribution of these chunks among four data servers

Replication

  • Each chunk has three replications
  • Replicas are distributed in different data servers

Name Server

  • List the relationships between file and chunks
  • List the relationships between replicas and data servers
  • Data server management

Data Server

  • Read/Write a local chunk
  • Write a chunk via a local directory path

Client

  • Provide read/write interfaces of a file

Mini-DFS can show

  • Read a file (more than 7MB)
  • Via input the file and directory
  • Write a file (more than 3MB)
  • Each data server should contain appropriate number of chunks
  • Using MD5 checksum for a chunk in different data servers, the results should be the same
  • Check a file in (or not in) Mini-DFS via inputting a given directory
  • By inputting a file and a random offset, output the content

compile

make

run

./miniDFS
put source_file_path dest_file_path
ls
locate FileID Offset
fetch FileID Offset dest_file_path
...
read source_file_path dest_file_path
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.