Skip to content

The founding principle

At the heart of PeerStorage is a system that reliably stores data on devices that continually disconnect. Here is an illustration of a way to create a virtual block device from disparate devices, each providing a portion of its own memory.

Each square is a “data store”. It is composed of :

  • Gray cells, they contain bits of data.
  • Colored cells, they contain parity bits.

Try for yourself to understand how it works:

  • Click on the gray cells to change data bits. Observe how the parity bits also change.
  • Click on colored cells to destroy a “store”. Observe how the data is reconstructed from nothing.
  • Try to change values while “store” is rebuilding. Note that your changes are taken into account.
  • Try to destroy more than one “store” at a time. If bits are lost they are replaced by ‘-‘.

Experiment with different sizes. Observe how the redundancy ratio varies (total cells / gray cells).

Rebuild all "stores"
Change array size
Change parity distribution
A simple calculation of probabilities based on the following assumptions:
  • we move to 3 dimensions instead of the 2 of the demonstration,
  • the side of the “cube” is 11 “data stores”, so there is a total of 1331,
  • the redundancy ratio is 1.33, ie 1331/1000,
  • every minute, 10% of the “data stores” are disconnected,
  • it takes 5 seconds to rebuild a “data store”.
Over a year, the probability of losing data is one in ten million (10-7).