Git Product home page Git Product logo

drop-box-it's Introduction

drop-box-it

This project emulates a file synchronization system similar to what Dropbox does, where you have a source directory and a destination directory. So whatever you write in the first one gets synchronized to the latter via HTTP.

To get everything up and running in a hassle-free way, I used Docker compose which will set up everything enabling you to get it up and running with just one command which I'll describe later, but to understand how this project runs look at the docker-compose.yml file.

The project is divided into two services the first one which is more like CLI daemon type thing drop and the second one which is an HTTP server box. Each service is self contain in his domain within pkg and everything gets wired up under cmd. Both services are already preconfigured but feel free to play with the configuration, keep in mind that the default-src directory is ./srcDir and for the destination one is ./destDir.

To see it in action run the command ./script/start wait a few seconds, you'll see every file that is contained within the src directory got synchronized to the destination one, and if you add, change or remove any of the files you'll see how they get synchronized too. Feel free of course to use any src directory is a CLI after all, you can update that value from the docker-compose.yml and then in the drop service update the command.

The body of the request is compressed in order to safe band width.

Run

In order to run tests and linting

./script/test
./script/lint

If you want to see it in action

./script/start

Improvements

  • Add graceful shutdown
  • Add another endpoint in the box service for file sync
  • Add the possibility to sync different clients with different folders at the same time by namespacing the destination folder and having some kind of token to identify the client
  • Only compress the body if is too large and be able to abstract the uncompress on the server side

drop-box-it's People

Contributors

diego1q2w avatar

Watchers

James Cloos avatar  avatar

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.