
IPFS Pubsub: Distributed named pubsub channels based in the IPFS Cloud - KirinDave
https://ipfs.io/blog/25-pubsub/
======
whyrusleeping
Hey Everyone! IPFS dev here, If anyone is interested in the future of ipfs
pubsub you can participate in the discussions in our research repo:
[https://github.com/libp2p/research-
pubsub](https://github.com/libp2p/research-pubsub) . One of the next big
things we're planning to do is to implement a new routing algorithm, one
proposal for this is here: [https://github.com/libp2p/research-
pubsub/pull/17](https://github.com/libp2p/research-pubsub/pull/17) (feedback
and review very welcome)

We are also planning on implementing various different modes for
authentication and encryption. Our pubsub currently is plaintext and open for
anyone to publish to any topic

~~~
toomim
When you're talking about a routing proposal, I think you are referring to
this? [https://github.com/vyzo/research-
pubsub/blob/a6cfdd3fec9d595...](https://github.com/vyzo/research-
pubsub/blob/a6cfdd3fec9d595a3f4cb56e94642e77b4dca13f/epidemic-pubsub.md)

~~~
lgierth
Yes that's the document in [https://github.com/libp2p/research-
pubsub/pull/17](https://github.com/libp2p/research-pubsub/pull/17)

------
lgierth
Pubsub is probably one of the lesser known features of IPFS right now, given
that it's still marked as experimental. We're researching more efficient tree-
forming and message routing algorithms, but generally the interface is pretty
stable by now. Pubsub is supported in both go-ipfs and js-ipfs.

A shining example of pubsub in use is PeerPad, a collaborative text editor
exchanging CRDTs over IPFS/Pubsub: [https://peerpad.net](https://peerpad.net)

~~~
mcrider
Off-topic question for you. What language do you recommend developers build
IPFS-backed apps with? I started building an app in Go (which is your
reference language) but Javascript seems to have a lot more APIs available for
it.

~~~
lgierth
If you're looking for raw performance and/or large datasets, go-ipfs is for
you. If you're​ looking for running within websites (and in browsers
generally), then js-ipfs is for you.

------
Xeoncross
IPFS just keeps looking more and more useful. I'm starting to wonder about
planning future text-rich applications (forums, news, blog, etc..) with
article backups to IPFS and a link on the live site.

Would require extra storage and overhead, but the result is maybe even more
helpful than a tor site for important content.

~~~
HarfTarf
make no mistake: ipfs _by_itself_ is no more "anonymous" than torrenting or
other types of file sharing ftp/sftp/ssh/http/whatever...

because they can always get your ip address.

You will need to use some other method if you want anonymity.

~~~
Xeoncross
Sorry, the reference to Tor is misleading. I was not referring to anonymity
but rather _access to content_ from restricted areas like the Middle East or
Asia.

~~~
HarfTarf
In that sense, I would agree, ipfs can provide access to content that would
otherwise be blocked.

~~~
mtgx
Could ISPs throttle IPFS content the same way they did with torrents a while
ago? (and probably will again once net neutrality falls).

~~~
lgierth
Sure -- but libp2p's network transports underneath are pluggable. There's
already Websockets (/ws, think domain fronting! [1]) and Tor (/onion)
transports, so there's various options for evading censorship (I personally
consider bandwidth throttling a form of censorship).

[1] Domain fronting lets you use a well-established web frontend for your web
service. E.g. we could host /ws nodes in Google Cloud, and to the ISP the TLS
handshake looks like it's for google.com, while inside the connection there's
e.g. a `Host: libp2p.googlecloud.com` header. More info:
[https://www.bamsoftware.com/papers/fronting/](https://www.bamsoftware.com/papers/fronting/)

But then again, net neutrality is a political issue! You don't solve it for
good with technology.

------
inopinatus
Back in the day (late 1990s iirc) I used Usenet as a global, distributed,
publish/subscribe bus for system messages between island service POPs.
Messages PGP encrypted and carried by a variety of groups (mostly alt.*). Also
eventually consistent. Very eventually in some cases.

"Floodsub" indeed.

------
problems
So, botnet C&C with no takedowns and more efficient and lower risk than
servers on Tor? Nice.

~~~
KirinDave
Maybe, but remember IPFS nodes can elect to blacklist any given channel, so
any given static C&C site here is just as vulnerable as a DNS point or a given
static IP address.

~~~
lgierth
There's no blocking functionality in IPFS yet - the plan is to have
customizable opt-in blocklists (and allowlists) for content and peers, though,
so communities can govern themselves regarding what content is desired and
what's not.

------
juancampa
I'm a complete IPFS ignorant but I can't help but wonder what's a typical
latency in such a pubsub system? I would imagine it varies widely but some
anecdotal experiences would be nice to hear

------
reustle
Is there some kind of podcast or YouTube series about ipfs and similar
technologies? I'd love to learn more about how they work, what they're working
on, and what's next.

~~~
mishmosh
Check out the IPFS YouTube channel
([https://www.youtube.com/channel/UCdjsUXJ3QawK4O5L1kqqsew](https://www.youtube.com/channel/UCdjsUXJ3QawK4O5L1kqqsew))
and Decentralized Web Primer
([https://www.gitbook.com/book/flyingzumwalt/decentralized-
web...](https://www.gitbook.com/book/flyingzumwalt/decentralized-web-primer))
as starting points.

For a more overarching perspective, I'd suggest A Progress Report on the
Decentralized Web:
[https://www.youtube.com/watch?v=WK4PIGr3RB8](https://www.youtube.com/watch?v=WK4PIGr3RB8)

------
aakilfernandes
How does spam prevention work?

~~~
acover
> Currently, any peer can publish to any pubsub topic. We plan to implement an
> authenticated mode for pubsub topics, where only authorized peers — those
> given a cryptographic key or capability — can publish messages. We are still
> working out the sharing and capability granting model.

------
WindowsFon4life
Great work by vyzo on this. Look forward to using this for all sorts of
content publication!

------
_Marak_
Article is from seven months ago. I'd be curious to see if there is an update
to this.

~~~
KirinDave
Looking over the github I don't see much code changes being committed.

------
sitkack
Could this be used for neartime RSS type functionality? I have zero IPFS
experience.

