I've been trying to implement and understand the working of IPFS and have a few things that aren't clear.
Things i've tried:
Implemented IPFS on my system and stored files on it. Even if I delete the files from my system and close the ipfs daemon, I am still able to access the files from a different machine through IPFS.
I've noticed there's a .ipfs folder in my home directory that contains the part of blocks of data that i add to IPFS.
Questions:
1. Are the blocks stored locally on my system too?
2. Where else is the data stored? On other peers that I am connected to? Because I'm still able to access the file if I close my ipfs daemon.
3. If this is true, and data is stored at several places, possibility of losing my data is still there, if all the peers disconnect from the network?
4. Does every peer on the network store the entire file or just a part of the file?
5. If copy of data is being distributed across the p2p network, it means the data is being duplicated multiple times? How is this efficient in terms of storage?
6. We store data uploaded by other peers too?
7. Minimum System requirements for running IPFS? We just need abundant storage, not necessarily a powerful system?
Thanks in Advance!
When you upload something, the file is chunked by ipfs and stored in your cache folder (.ipfs).
If you check the file existance on another peer of the network (say the main gateway, ipfs.io) that peer requests the file from you and caches it too.
If later you switch off your daemon and you can still see the file on the gateway it's probably because the gateway or some other peer on the web still has it cached.
When a peer wants to download a file but it's out of memory (it can no longer cache), it trashes the oldest used files to free space.
If you want to dive deep into the technology, check first these fundamentals:
The latter should give you an idea of how the mechanism works more or less.
If you are interested in ways to store data in a p2p manner, here some links to interesting projects.