n0-computer / quic-rpc

A streaming rpc system based on quic
Other
98 stars 14 forks source link

iroh-net transport #102

Open rklaehn opened 2 weeks ago

rklaehn commented 2 weeks ago

Quic-rpc needs an underlying transport that has very cheap substreams, like QUIC.

It would be quite cool to be able to use iroh-net, which is basically p2p quic with dial-by-nodeid.

I have a lot of examples and toy projects with RPC like use cases, like frosty or (https://github.com/rklaehn/munin). Being able to use quic-rpc would be preferable to manual protocol impls at least for complex protocols.

This would be extra useful in conjunction with https://github.com/n0-computer/quic-rpc/issues/101

matheus23 commented 1 week ago

I was just looking into this. I think you can already get pretty far by glueing together iroh-net and quic_rpc::transport::quinn::QuinnConnection on the client side and QuinnServerEndpoint::handle_connections on the server side.

That said, it'd be nice if it were a little more convenient to create these. It would also be nice to be able to use the ReconnectHandler that's created in QuinnConnection::new internally.

rklaehn commented 6 days ago

One thing you probably want to do here is to add a mechanism to reject incoming connections from unknown node ids. Basically like authorized_keys from ssh. Otherwise every program that is using this is remote controllable from all over the world.

For the local rpc stuff at least we only listen on localhost usually...

fogodev commented 5 days ago

One thing you probably want to do here is to add a mechanism to reject incoming connections from unknown node ids. Basically like authorized_keys from ssh. Otherwise every program that is using this is remote controllable from all over the world.

For the local rpc stuff at least we only listen on localhost usually...

But quinn transport aren't also like this? Who has your server address can send requests to you, from all over the world.