I've created this issue to track the development of the floodsub API inside the JS libraries, getting the people interested to rail in quickly and also to give a venue to sync for the ones working on the endeavour.
@gavinmcdermott is leading the charge of getting js-libp2p-floodsub integrated into js-ipfs and with that come up with an API that works for a scenario where floodsub is 'in process'(js-ipfs) or 'remote' (js-ipfs-api/through http).
Currently, we have interop between go and js. One way to level that up is to grab the floodsub-testnet work and attach it to js-ipfs nodes instead, since js-ipfs and js-ipfs-api share the same API, we can make the testnet code spawn both types of nodes and see how the network behaves :)
@diasdavid can we keep the API discussion in the original issue so that we don't have a gazillion places to look for?
The original discussion is here: https://github.com/ipfs/js-ipfs/issues/530.
API should enable the user cancel a subscription
This was added to the spec today, ipfs.pubsub.unsubscribe("topic")
floodsub API should enable the developers to not be target of spam attacks - support for TopicDescriptios
There's comments regarding this in the issue above. Let's continue there.
To make sure information gets passed around: I'm working on refactoring the current js-ipfs-api PR and that work is here: https://github.com/haadcode/js-ipfs-api/blob/fix/pubsub/src/api/pubsub.js and tests are here https://github.com/haadcode/js-ipfs-api/blob/fix/pubsub/test/ipfs-api/pubsub.spec.js.
There's also work that needs to happen on go-ipfs side in order to land js-ipfs-api, mainly this: https://github.com/ipfs/go-ipfs/issues/3304 (_API call to pubsub/sub does not return HTTP header until first message arrives_)
There's a new PR for js-ipfs from @gavinmcdermott here https://github.com/ipfs/js-ipfs/pull/610 (posting here to keep track of all the work that's happening)
@haadcode @gavinmcdermott, I've updated https://github.com/libp2p/js-libp2p to the latests libp2p versions, so that you don't have to go through it yourselves. All you should have to do is update the version :)
Tests for the pubsub interface are now in a PR in interface-ipfs-core: https://github.com/ipfs/interface-ipfs-core/pull/101
For js-ipfs-api, before merging pubsub, we need this to be merged: https://github.com/ipfs/go-ipfs-dep/pull/13#discussion_r90838240 and have go-ipfs-dep 0.4.5-something released (I've been publishing @haad/go-ipfs-dep v0.4.5-beta.x).
@haadcode and @diasdavid - Thanks for the updates here. I'm getting caught back up today and will be back in SF late tonight. That said, I'll be available to wrap up work on outstanding items this week!
PR's are open, now it is all about that merge that release, no red tests 馃帳