The Founding Principle
At the heart of PeerStorage is a system that stores data reliably on devices that keep going offline. Here is an illustration of one way to build a virtual block device from many separate devices, each contributing a share of its own memory.
Each square is a “data store”. It is made of:
- Grey cells, which hold data bits.
- Coloured cells, which hold parity bits.
Try it yourself to see how it works:
- Click grey cells to flip data bits. Watch how the parity bits change as well.
- Click coloured cells to destroy a “store”. Watch how the data is rebuilt from the rest.
- Change values while a “store” is rebuilding. Notice that your changes are taken into account.
- Destroy more than one “store” at a time. If bits are lost they are shown as “-”.
Experiment with different sizes. Watch how the redundancy ratio changes (total cells / grey cells).
| Rebuild all "stores" | |||||
| Change array size | |||||
| Change parity distribution | ||
A simple probability calculation under these assumptions:
- we move to three dimensions instead of the two used in the demo,
- the side of the “cube” is 11 “data stores”, so there are 1,331 in total,
- the redundancy ratio is 1.33, i.e. 1,331 / 1,000,
- every minute, 10% of the “data stores” disconnect,
- it takes 5 seconds to rebuild a “data store”.
Over a year, the probability of losing data is one in ten million (10-7).