Search code examples
databasedistributed-computingdistributeddistributed-systemipfs

Do InterPlanetary File Systems (IPFS) use a timing component to organize downloading?


Let me know if this question should be asked somewhere else, or is too broad.

I was looking at the structure of IPFS and had some questions cleared up from a previous post asking about IPFS (Where does IPFS store all the data?). But I am wondering if there is a timing component involved to IPFS.

  1. For example, if a video on IPFS is distributed among multiple peers, (say a 20 minute video split among 4 peers), when putting in a request for the data, how do "pieces" of the video return in the right order? Is it the that the request knows that the video was parsed in a specific order, and uses "pointers" to return the 5 minute clips in the correct order?

  2. If one of the peers is permanently lost, for example, the one that holds the section of the 20 minute video clip from the 10 minute mark to the 15 minute mark, does that mean the data is permanently lost and the video will never work?

  3. And on a side note, is there only one IPFS? I know anyone can run a MySQL or MongoDB on a server, but can there be "private" IPFS systems amongst only a set group of peers?


Solution

    1. Each part has an index which tells its position in the data. They don't need to be retrieved in order to be able to be reassembled in the correct order. Confer BitTorrent and TCP.
    2. Yes. If the data can not be retrieved, it is effectively gone. Although it may be found out of band and restored.
    3. Yes, you can make a client connect to a private set of peers. You just have a private DHT.
    4. Read up on BitTorrent, IPFS took its design from it with a little from Freenet mixed in. Essentially IPFS is Freenet without a network overlay and automatic caching.