
Show HN: I built a peer-to-peer publishing platform - vishnu_ks
https://peerdium.com/60f4108c22bf6d6a9023e94f9dac86bae829804c5b3hs3r5caya6se
======
colatkinson
This is pretty nifty! Out of curiosity, why did you choose WebTorrent over,
say, IPFS? I considered doing something similar using their JavaScript
client[0].

[0]: [https://github.com/ipfs/js-ipfs](https://github.com/ipfs/js-ipfs)

~~~
vishnu_ks
Interesting question. I was also considering to use IPFS js while developing
Peerdium. But it seems like it's not fully ready yet. For example, take a look
at this

> DHT (automatic content discovery) and Circuit Relay (pierce through NATs and
> dial between any node in the network) are two fundamental pieces that are
> not finalized yet.

Another reason was that I had to still run an IPFS node if articles should be
made available for more than 8 hours. I didn't want to do anything with
storing articles.

~~~
marknadal
Nice app! Great work, you deserve all the HN attention. :D

How were you able to make WebTorrent work reliably? I was trying to write a
WebRTC adapter for
[https://github.com/amark/gun](https://github.com/amark/gun) (I'm the author)
but kept on having STUN/ICE problems.

I'd love some tips! And awesome project. Somebody in our community just made a
decentralized reddit clone, so it is exciting to see new P2P projects popping
up every day! :D

~~~
vishnu_ks
Gun looks pretty cool. I have not fully fixed the STUN/ICE problem. Some of
the users on HN are still not able to see the articles. I think the problem
reduced a bit after I started running a TURN server. But it's not full
eliminated yet. Check out my tweet to Feross. Maybe he has some answers :)
[https://twitter.com/hackerkidx/status/996009992569274369](https://twitter.com/hackerkidx/status/996009992569274369)

~~~
marknadal
@vishnu_ks , I also recently found
[https://github.com/priologic/easyrtc](https://github.com/priologic/easyrtc)
which worked out of the box, and automatically connects to several public
STUN/ICE peers. I'm planning on using it (when I get a chance to finish the
WebRTC adapter), maybe we can tag team something? It worked super well on a
P2P/decentralized 3D VR multiplayer game somebody had built.

~~~
vishnu_ks
Sure. Do let me know when you need some help :)

------
_csoz
This seems like it could be good as an ephemeral pastebin/image/video sharing
with a small group.

off topic, I wish one of these peer-to-peer schemes caught on, if only because
it will incentivize people to buy a desktop computer which will serve as
network node. There's so many interesting things that can be done if people
can be convinced that they are part of the network and not just "tablet
users".

I wonder if anyone is trying to build home routers that double as ipfs/torrent
nodes.

------
egfx
Was going to say, I remember
[https://news.ycombinator.com/item?id=9531265](https://news.ycombinator.com/item?id=9531265)
that had the very same idea as this. The thing is, what's the benefit of an
ephemeral page? What can I do better if someone else is seeding it for me? Is
it that hard to centrally host these bits?

~~~
vishnu_ks
Yes. I think Peerdium is not at all necessary for 99% of the use cases. You
can just use a normal publishing platform. Peerdium can become useful if you
don't want a single point of failure. That is anyone can spin up Peerdium
servers from source code and the links would still work as long as someone is
seeding the content. Also nothing is stored in a server. So if you want to
share some content that you don't want to get stored in someone's private
server then Peerdium can be used as well.

~~~
Vinnl
One feature you might want to consider is adding support for RemoteStorage [0]
to allow people to export a story to a data provider of their choice, so that
they can easily access it later if they care to (and perhaps start re-hosting
it?) :)

[0] [https://remotestorage.io/](https://remotestorage.io/)

~~~
vishnu_ks
This sounds super interesting. Let me read more about this. :)

~~~
ranfdev
You should also check out blockstack, offers similar storage functionality
(the user choose where to store the data) and has easy to use js libs

------
harigov
Good idea. If there were some way to store that data in a more permanent form,
that would have been awesome. Either way, a small nit.

> Peerdium would not have been possible with WebTorrent, QuillJs and Vue.js

I think you meant "Peerdium would not have been possible WITHOUT WebTorrent,
QuillJs and Vue.js"

~~~
Vinnl
Interestingly, I suppose the Peerdium model means it can't be updated now? A
new, corrected page could be published, but it would have a different
identifier and would have to be re-seeded.

~~~
vishnu_ks
Yes. That is correct :)

------
djangowithme
"This means to open and read a post in Peerdium at-least 1 other person should
have the tab opened of the post"

Are you running a server hosting 1 instance of each document so that there is
always at least 1 other person hosting the page?

~~~
vishnu_ks
Nope. I am not seeding the articles. If no one else seeding the article it
won't be available.

------
tomglynch
Just made my own post and would love to see how long it can stay up for (and
if people will host it for me):

[https://peerdium.com/5558335f57ef076dea5566bd09c111be4ea5769...](https://peerdium.com/5558335f57ef076dea5566bd09c111be4ea57691g8slbc1fzuwilms)

~~~
ishaanbahal
Can't open, do you yourself even have the tab open? :P

~~~
tomglynch
I do, though it seems to timeout after a certain amount of time - I can no
longer reload it even though I have it open in 3 tabs.

Edit: Oh wait, think we're back on.

------
bmpafa
This is neat. How does it work with search engines? Just lots of 404s once
articles 'disappear'?

~~~
vishnu_ks
Yup. That is correct. Once the people seeding decided to take it off it is no
longer stored anywhere :)

------
doomjunky
Congrats! This is a really nice project. I'm amazed that the editor is just
200 lines of code and i like the minimalistic design.

Assuming the number in the right side are the spectators. Could you show on
the left side how many peers are seeding?

~~~
vishnu_ks
It's the number of people who have the tab opened == no of people seeding the
post. When you open a post you get the content from other seeders and starts
seeding the post :)

------
hndamien
This would be interesting if combined with something like BAT or AdSense or
Coinhive to earn revenue from viewing then use that revenue to pay for seeding
via something like Sia/ Filecoin.

~~~
vishnu_ks
Never thought about it before. Sounds interesting. Let me see if I can
integrate one of these easily :)

~~~
hndamien
Maybe check out IPFS while you are at it.

~~~
vishnu_ks
Does IPFS solve the monetization problem?

[https://news.ycombinator.com/item?id=17063374](https://news.ycombinator.com/item?id=17063374)

This comment has some insights on why I decided to use WebTorrent over IPFS.

------
slackoverflower
So if the only person reading the article closes it, is the article lost?
Since there is no one else to retrieve the data from for future readers.

~~~
vishnu_ks
Yup. You have the option to save the article as well by clicking on the heart
icon. This allows you to view the article even if no one else is seeing it.

------
xkbd
The concern is that someone has to have a post open before I can access it.
How does this scale? (Oh, you build it for fun. So no problem.)

~~~
vishnu_ks
Yes. So the author has to keep the tab open till the post gets other seeders
:)

------
okonomiyaki3000
Doesn't seem to work for me. Perhaps because I'm behind a corporate proxy?
Maybe I'll try when I get home.

~~~
vishnu_ks
Yeah. Torrent ports are often blocked in corporations and some universities.
You should check out at home :)

------
snissn
Doesn't seem to load on ios + safari

~~~
vishnu_ks
I am not sure it's an issue with iOS + safari. More likely to be a network
issue.

------
stunpix
ehh... what a naming. For russian speaking people it strongly co-sounds with
"fart". ;) Please consider to rename it if platform targets worldwide.

~~~
vishnu_ks
Thanks for letting know. There is already an issue open for this in the repo
[https://github.com/hackerkid/peerdium/issues/2](https://github.com/hackerkid/peerdium/issues/2)
:)

If there is demand for the service I will try renaming the project :)

~~~
stunpix
Hope it will be demanded. BTW, last notable bad naming was a Fedora project
for RaspberryPI named Pidora which sounded for russians as "faggot" :)

------
beardog
It would be better if you used #idhere instead of /id, so then you are not
(as) responsible for user content.

~~~
vishnu_ks
Can you explain this a bit more? Also no content created by the user is stored
in Peerdium server. Everything is stored in the browser of the user.

~~~
beardog
Sorry for the late reply. Since the ID is not a # variable in the URLs, it is
passed to the web server hosting the content, meaning even if the
data/metadata is not stored on any server you own (it doesn't appear to be),
you could still be expected to block URLs which someone wants to ban.

# variables are not part of server queries, so they are better for user
privacy as well (not stored in server logs). I'm not saying you won't ever get
takedown requests with #, but it is easier to argue to authorities that
Peerdium is merely a user-ran software you are not in control of when using #.

~~~
vishnu_ks
That makes sense. Thanks :)

------
unicornporn
Page stalls at "Loading from peers......."

Oh the irony.

~~~
vishnu_ks
Does your network blocks Torrent ports?

------
colobas
this is very, very cool

~~~
vishnu_ks
Thanks :)

