Pushing the Limits of IPFS and OrbitDB
mrh.io
mrh.io
I know that IPFS is some sort of distributed content-addressable thingy. So I expected that ipfs.io would deliver some JS to my browser, which would get it to look-up some distributed hash table in order to find peers with the content (a la torrents).
However I'm not running JS and that page loads just fine. So how does it work?
Does the "deliverying JS to browser" thing that I described make sense at all?
[1] https://github.com/ipfs/js-ipfs
[2] https://github.com/ipfs-shipyard/ipfs-companion
[3] https://github.com/ipfs-shipyard/ipfs-companion/blob/master/...
However, if you install the IPFS client (https://dist.ipfs.io/#go-ipfs), you can get the blog post peer-to-peer through IPFS by running `ipfs get QmY2LufsW3v6AfxTTkp6SGqDGa5AeJhSZXH8RSsdiao4Ds`. Note how the hash in the ipfs.io url is the hash of the content stored in IPFS.
Hope this clarifies it!
It's a bit sad that you require a whole new client. I think that will add enormous friciton to adoption, no?
Highly recommend to read into IPFS and how it works to understand the various use cases and possibilities. A good starting point would be https://ipfs.io/ and https://github.com/ipfs/ipfs.
https://github.com/orbitdb/orbit-db
https://github.com/orbitdb/ipfs-log
https://github.com/ipfs/js-ipfs
One thing I wonder about , Is the browser -> ipfs node communication can be done via webrtc (I think the post refer to websocket)?
So the data sync can happen between browsers .
I did play with webtorrent for a while , and achieved a similar behavior using webrtc . I had one nodejs server , and multiple browser sessions . It worked well for video streaming peer to peer (poc level )
The stack we're using for networking is libp2p, a peer-to-peer framework, which has bunch of implementations for different transports. You can see the full list of those here: https://libp2p.io/implementations/#transports
Currently, most browser-apps using IPFS prefers websockets as it's using a lot less resources compared to webrtc, but once webrtc-quic[0] is ready for prime-time, it would be easy to write a transport for that and hopefully will be a lot more efficient than the current webrtc implementations.
Disclaimer: I work on IPFS/libp2p fulltime
Edit: There's an open issue for a "OrbitDB pinning service" (https://github.com/orbitdb/orbit-db/issues/352), it's in the works atm.
Now, if we can have js-ipfs and go-ipfs nodes on desktop automatically act as signalling servers (if you start with a `--server` flag or something), we'll be able to decentralize the need for signalling servers as well, and remove another point of centralization. Getting us closer to the goal as well.
Maybe in the future we'll be able to have TCP/UDP sockets in the browser, but we'll see when/if that happens.
Disclaimer: I work fulltime on IPFS
They did a big ICO with Filecoin.