Code Monkey home page Code Monkey logo

home-space's People

Contributors

indomitable avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

home-space's Issues

Wrong password cool down

When ever user enters wrong password twice, add 1 min cool down, if password is entered wrong again 2 mins, 4 time wrong 4 mins. Every next time double the cooldown period. Max cooldown 32 mins.

Clean downloads folder

Whenever user wants to download multiple files or whole directory a zip file is created in the downloads system folder. These files should be deleted to save space.

Add node locking

Add node locking table which prevents modifications in nodes during some operations:

  1. Copy : Add write lock of source so no files can be moved or removed.
  2. Move: Add write lock on source - no files should be modified during move and write lock on destination - to properly revert changes on failure.
  3. Delete: Add write lock on source.

Node upload status endpoint

Create new endpoint which returns status of a node:

  • Node doesn't exist - return: NO_CONTENT
  • Node is file - return file hash
  • Node is folder return json content with folder tree: folder names and file names and their hash sums.

Import command

Import algorithm:

  • client request upload status from server.
  • server can return 2 responses: NO_CONTENT ( nothing uploaded ) or file containing hash sums of files in the destination folder if something was uploaded ( run upload twice or upload was cancelled and started again ).
  • if response is no content then upload starts normally
  • if something was uploaded: checks local file hash and if hash is same file is skipped if not or is missing it is uploaded.

Job manager

In order to make some operations faster some jobs should be executed in the background:

Clean uploads folder

Add background job to clean uploaded chunks: When user uploads big files they are uploaded on chunks once uploaded, the chunks are not needed. in order not to spend time to delete, they are left in the uploads folder.

Clean versions

If user uploads same file multiple times it will create multiple versions of it but since there are no changes these versions are not needed. We need a clean command which packs versions and leave only versions with changes.

Redirect to login page when renew token fails

Currently when user's access token and refresh token are expired ( due to long inactivity ) renew request fails but user stays in the current page.
Expected result user should be redirected to the login page.

Atomic operations

File operations usually consist from 2 operations: File system and Database these 2 operations should be done as one atomic operation. For example:
    File move operation has 2 operations: move physical file, update db record.
If update db record fails we should revert file move to its original location. It is always better to do first the db operation which can be done in transaction and then to try the file system operation if fails rollback the db operation.

Depends on:

Clean trash folder

  1. User should configure how long they want to keep the delete files, after this time they should be deleted.

  2. When file is copied from one location to another the version entries are not copied but just references from the copied instance. Once file is deleted its history is not deleted because it maybe referenced from another file or if it is restored back to preserve the history. We need a clean command which deletes versions not referenced from any file.

    • Keep history if file in trash box still references them. If file is restored we want to preserved the history.

    • When trash item is deleted check if no other file in trash or in files references the history.

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.