Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Users can set the amount of storage they want to offer to the network #37

Open
WilfredTA opened this issue Apr 1, 2018 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@WilfredTA
Copy link
Member

WilfredTA commented Apr 1, 2018

  1. Users can set the amount of storage their Batnode offers
  2. Batnode tracks max storage (which is set by the user)
  3. On Batnode initialization, current storage is set as a property to Batnode object
  4. When a user tries to store a file on a host candidate, the candidate's available storage is calculated and compared: shard size <= max storage - available storage
  5. Optimization challenge: checking available storage without reading each file and adding up the data it uses
  6. Optimization challenge: if two nodes contact a host node at the same time, asking if it has enough storage for their shard, the host node will say yes to both of them because it has stored neither, but by saying yes to both, it agrees to store more data than it has the capacity to store. There needs to be an in-memory data structure of available storage that can be updated immediately when a node agrees to store a shard even if it hasn't already stored that shard.
  • An edge case to this, though, is that this data structure may be rendered inaccurate if the shard it agreed to store never made it over the wire!
@WilfredTA WilfredTA added the enhancement New feature or request label Apr 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant