|
|
Subscribe / Log in / New account

Entering the mosh pit

Entering the mosh pit

Posted May 17, 2017 17:24 UTC (Wed) by shemminger (subscriber, #5739)
In reply to: Entering the mosh pit by obonaventure
Parent article: Entering the mosh pit

Using UDP and reinventing own flow control and retransmit is foolish.
"Those who do not understand TCP are doomed to reinvent it"


to post comments

Entering the mosh pit

Posted May 17, 2017 21:24 UTC (Wed) by itvirta (guest, #49997) [Link]

> Using UDP and reinventing own flow control and retransmit is foolish.

Perhaps, but it does have the advantage that it works without any kernel support.
Which helps a lot in getting your software to work across different operating systems.

In mosh's case, it also has the upside that it knows more about the underlying data
than a general purpose stream transmission algorithm does. Namely, changes to the
screen can be mercilessly discarded when the client isn't looking.

Entering the mosh pit

Posted May 17, 2017 22:42 UTC (Wed) by renox (guest, #23785) [Link]

Your comment lacks substance, I could also say those who understand TCP try to replace it!
For example I hate having to type sleep 30 to prevent me from trying "too soon" to restart an application which then fail because the TCP connection fail.

Entering the mosh pit

Posted May 17, 2017 23:02 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

> Using UDP and reinventing own flow control and retransmit is foolish.
Nope. Mosh is essentially a media application - it transmits the live video of the remote terminal.

So it's much better to transmit the whole screen state anew if an update packet is lost rather than wait for TCP retries to deliver all the intermediary packets.

For the same reason voice/video conferences use UDP - it's better to simply drop a small update to compensate for it later rather than cause the whole screen to stutter while the stream recovers.

>"Those who do not understand TCP are doomed to reinvent it"
Those who think that TCP is The Answer are foolish in the extreme.

Entering the mosh pit

Posted May 20, 2017 7:28 UTC (Sat) by niner (subscriber, #26151) [Link]

No idea if mosh does it, but since it transfers very little data and may be used over networks with large packet loss, it could even opportunistically retransmit. Just send each package twice or even more to increase the chance that at least one of them arrives.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds