-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KCP transport (reliable UDP) #193
Comments
Yeah, i'd love to try this out. Should be fairly simple to plug it in |
They also have a multiplexer: https://github.com/xtaci/smux |
Easy enough to plug the muxer in, it passes our test suite too: https://github.com/whyrusleeping/go-smux-smux |
Only rough part of plugging kcp in seems to be that their |
Oh wow, this looks sweet! https://github.com/xtaci/smux. I like this team, they modularize things! //cc @Stebalien |
Ooh nice! Personally, I wouldn't bother with KCP given that QUIC is around the corner (unless QUIC doesn't work out) but their SMUX library looks great and can be used over TCP. |
I have finished my KCP transport implementation, it uses smux to basically build a mock-tcp connection. From my initial tests with even the default configs the performance is quite impressive. https://github.com/paralin/go-libp2p-kcp I replicated the echo example, with GRPC over the connection as a bonus (so, |
@paralin Hey! Great work there. A couple things:
|
@whyrusleeping Not sure why, but without smux in place libp2p wouldn't work at all over KCP. I suspected it was because: "Control messages like SYN/FIN/RST in TCP are not defined in KCP, you need some keepalive/heartbeat mechanism in the application-level." For this reason I believe we need some kind of SYN/ACK in the transport level, although we really shouldn't need it. I just haven't had a chance yet to write any tests to figure out the issue. We can pass a PacketConn to KCP, so establishing a socket dialing out with SO_REUSE should be fine. In terms of plugins this should be easy with the existing interfaces and the Go plugin mechanism. |
Interesting... I'll bet it's something like "the other side doesn't get the
connection until we send a packet". If you could investigate that further
it would be really helpful.
On the plugins, if we get that working, then we can also add tor and webrtc
transports :)
…On Sun, Dec 31, 2017, 9:26 PM Christian Stewart ***@***.***> wrote:
@whyrusleeping <https://github.com/whyrusleeping> Not sure why, but
without smux in place libp2p wouldn't work at all over KCP. I suspected it
was because: "Control messages like SYN/FIN/RST in TCP are not defined in
KCP, you need some keepalive/heartbeat mechanism in the application-level."
For this reason I believe we need some kind of SYN/ACK in the transport
level, although we really shouldn't need it. I just haven't had a chance
yet to write any tests to figure out the issue.
We can pass a PacketConn to KCP, so establishing a socket dialing out with
SO_REUSE should be fine.
In terms of plugins this should be easy with the existing interfaces and
the Go plugin mechanism.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABL4HEi8L8Z9KHPXmhnTvGLVL8O6xOkHks5tGGyagaJpZM4NaO6D>
.
|
@paralin Do you think you could take a look at adding a Right now we just have The tricky part here is that we would likely have to have some global If you don't have time or don't want to, no worries, I figured I would ask here anyways, and someone else could pick it up :) |
I'd be happy to, but I'm a bit busy at the moment so it'll be a little while. |
@whyrusleeping Please have a look at paralin/go-libp2p-kcp#1 re/KCP integration with reusable UDP file descriptors (assuming the CC didn't send you a notification). |
(QUIC has shipped) |
don't expire backoffs until 2x backoff period
compress qlogs when the QUIC connection is closed
move AddrList to pstoremen, unexport it
Let's check it out:
https://github.com/xtaci/kcp-go
It's used by Lantern and Syncthing among others
The text was updated successfully, but these errors were encountered: