Readit News logoReadit News
Ingon · 3 months ago
I work on connet [1] and from what I've seen iroh seem pretty cool. A few random thoughts I had while watching the presentations/reading the docs:

* the relays serve both for discovery and relay. In connet these are separate responsibilities, e.g. it has control server for discovery and a relay server for relaying connections.

* it seems that the connections to the relays in iroh are TCP (at least what was said in one of the videos), while connet uses QUIC in all cases. This probably makes iroh more resilient, but multiplexing on top of TCP might suffer from head of line blocking.

* it is pretty cool that iroh can seamlessly upgrade from relay to direct connection, connet doesn't do that on a connection level. It will however use direct in the subsequent virtual connections.

* using ALPNs for protocol selection is pretty cool, connet only offers "virtual connections" protocol, where one of the peers is "server" and the other is a "client".

* since there is a separate discovery server (with auth), in connet the endpoints are named separately with logical names, they don't represent peers necessarily. Because of this, you can have multiple peers with "server" role and "client" roles.

Anyhow, thanks for posting this, iroh looks great and I will draw some inspiration from it for sure.

[1] https://github.com/connet-dev/connet

rklaehn · 3 months ago
There might be a small misunderstanding here. Our relays do two things. They relay user data, and relay a small number of special packets to help with hole punching. Other than that they are very simple. They never see unencrypted data, so they don't know anything more about the nodes they serve than what they need to function.

Connections are TCP https websocket connections, because this is most likely to get through even the most restrictive firewalls.

Discovery is handled outside the relays, via either a special DNS server or via the bittorrent mainline DHT. You can even implement your own discovery.

Ingon · 3 months ago
Thanks for the correction, I'm still new to iroh and looking to learn more!

Seems that the relays in iroh play the role of STUN and TURN (maybe even implement these)?

I'd have to read more about DNS discovery (and dht), very interesting.

nerdsniper · 3 months ago
> * the relays serve both for discovery and relay. In connet these are separate responsibilities, e.g. it has control server for discovery and a relay server for relaying connections.

What are the relative advantages/disadvantages of these two strategies?

eminence32 · 3 months ago
Some years ago, "iroh" was supposed to a replacement for ipfs. However since then, they (very smartly, in my opinion) dropped those ambitions and are just focused on being a high-quality library for anyone writing a P2P app (like ipfs).

I often see projects attempting to be a universe tool to solve every possible problem, and I think the iroh folks were smart to scale back and narrow their focus

dignifiedquire · 3 months ago
appreciate the feedback, it was a hard decision to make, but has felt more right everyday since we made it
rkagerer · 3 months ago
Aye. You often solve a technical problem while working to build something and later it turns out that building block has more utility than the thing you set out to build.
aquariusDue · 3 months ago
I attended a workshop for iroh a while ago and really enjoyed it, and from what I can tell on the Discord server the folks developing it are gearing for a 1.0 release soon-ish.

There's also Dumb Pipe and SendMe which are demos (I believe) built on iroh to showcase some of its uses, and at the workshop we were shown a video of a startup using iroh for video game streaming (something similar to the old OnLive).

From what I understood (in spite of my lack of networking knowledge) and if I remember correctly clients have to be on the same relay (I think there's one for Europe and one for North America) and they use the Bittorent DHT Mainline (I had to google the iroh blog post about it because I forgot the exact name) for discovery. There was some stuff about BGP too, but it went over my head sadly.

I hope somebody more knowledgeable chimes in because iroh is really exciting, I feel like I could throw together a p2p application and it wouldn't be a daunting task due to it.

b_fiive · 3 months ago
(disclosure: I work on iroh): you're selling yourself short! All of this is accurate, except for maybe the BGP stuff :)

Dumb Pipe & Sendme me are indeed demos, we do provide a set of default, public relays to use for free. The relay code is also open source, and if you want to pay us we can run a network for you.

We try to provide a few different options for discovery, the one we think has the most general utility is a custom DNS server, but both local mDNS and Bittorrent Mainline are also pluggable options.

divineg · 3 months ago
Pardon me for jumping in the discussion, but I didn't know where else to ask this. Does Iroh support streaming, instead of moving blobs? I want to write a little p2p tool to forward one port from one machine to another. Also, forwarding UDP packets doesn't require the congestion control of QUIC. Does Iroh allow disabling it for a certain "message" or stream?
outside1234 · 3 months ago
Was the workshop recorded?
outside1234 · 3 months ago
For those interested, this lower level walkthrough is great: https://www.youtube.com/watch?v=ogN_mBkWu7o

There is also a high level walkthrough in the same video library.

ridiculously · 3 months ago
I was never angry with you. I was sad, because I was afraid you'd lost your route.
softfalcon · 3 months ago
Sharing tea with a fascinating stranger is one of life’s true delights.
schainks · 3 months ago
Failure is only the opportunity to begin again. Only this time, more wisely.
kubafu · 3 months ago
I came here for this. Thanks!
tyoung · 3 months ago
Makes me cry everytime.
ventare · 3 months ago
This may be, the worlds most perfect comment. Bravo.
dignifiedquire · 3 months ago
this made my day
ndyg · 3 months ago
Iroh is intriguing. Dumbpipe is magical, and its implementation is easy to understand. I use dumbpipe daily to expose cross-stream (https://github.com/cablehead/xs) stores I run on different servers to my local laptop's `xs` client.
cprecioso · 3 months ago
A bit off topic I guess, but what’s your usage for xs? I read the website, I think that I understand it and find it intriguing, but I’m not sure what one would use it for.
ndyg · 3 months ago
A basic use case, to tie it back to the topic :)

When I'm working on a remote machine, it's nice to be able to easily pass things back and forth between it and my local laptop. I start a stream on the remote server and use `dumbpipe` to make the stream available on my local laptop.

```

# remote

xs serve ./store --expose :3001 ; dumbpipe listen-tcp --host 127.0.0.1:3001

# local

dumbpipe connect-tcp --addr 127.0.0.1:3001 <ticket>

$env.XS_ADDR ":3001" ; .cat

```

I can then do things like:

```

# local

cat local.file | .append local.file

# remote

.head local.file | .cas

```

Or register a local handler for the topic "pasteboard" that puts the contents on my local clipboard. Then, from the remote machine, I can run: `"foo" | .append pasteboard`

conradev · 3 months ago
Iroh is very cool and their YouTube explainers are pretty great: https://youtube.com/@n0computer

I just need good FFI now, which is on the roadmap!

makeworld · 3 months ago
Can't wait to be able to use it in Go or Python :)
bestouff · 3 months ago
This thing is written in Rust. I wanted to use it on an embedded system in Rust (Embassy) using a CAN transport but unfortunately there's neither a no_std version nor a CAN plugin. Otherwise it looks good.
b_fiive · 3 months ago
Yeah, no_std is going to be very hard. We need a no_std implementation of QUIC that can be wielded by mere mortals first, which I don't think we'll be able to start on for at least a year.

Right now we can get down to an ESP32, which we think is a decent start.

akavel · 3 months ago
Hm, how does this answer relate to the answer you gave to this comment: https://news.ycombinator.com/item?id=44381084 ? where, as far as I understand, you say it's possible to swap out quic for something else? asking sincerely, I'm confused here.
dignifiedquire · 3 months ago
this would be great to have, but as we rely heavily on quic, we first need an implementation of quic in no_std which is the current biggest challenge
Python3267 · 3 months ago
How does this compare to libP2P? https://libp2p.io/
b_fiive · 3 months ago
less configuration. more reliable. less pure p2p (iroh uses relays)