News for hackers. Stuff that matters.
Re:Mosh v1.3 Released by mwcampbell on Saturday April 29, 2017 @06:28PM (#14229119)
The home page says that web apps like Gmail don't support roaming as mosh does. Why would that be the case? After all, web apps use HTTP requests, which are fundamentally transient (though persistent connections are available as an optimization). Do long polling and WebSockets mess this up?
Re:Mosh v1.3 Released by moosingin3space on Saturday April 29, 2017 @11:52PM (#14230088)
A TCP connection is identified by the tuple of (source IP, source port, destination IP, destination port), therefore whenever one side's IP changes (the effect of roaming), the connection has to be re-established.

Mosh is built on UDP, where there are no "connections" and the wire protocol is stateless, so when the client IP changes, that endpoint simply transmits some "session cookie" information to the server, which allows it to carry on, uninterrupted.

HTTP runs over TCP, so it cannot roam like mosh does. QUIC (Google's experimental HTTP/2, TLS, and UDP integration) is interesting in part for this reason.

Re:Mosh v1.3 Released by Buge on Sunday April 30, 2017 @04:50AM (#14230706)
Most interactive webapps such as gmail send many HTTP requests. And those requests do not have to be over the same TCP connection. So the webapp could continue to work even if you change IPs. Any requests going at the time of the change would fail, but ideally the javascript of the app would retry them.
Re:Mosh v1.3 Released by JdeBP on Sunday April 30, 2017 @06:57AM (#14230969)
You've glossed over the part about TCP connections. Try roaming whilst one of those HTTP transactions is in progress.
Re:Mosh v1.3 Released by Shish2k on Monday May 01, 2017 @10:51AM (#14237907)
> Try roaming whilst one of those HTTP transactions is in progress

That specific connection silently fails, then the app silently retries, and succeeds - from the end user's perspective, they've switched IP addresses and the webapp still works fine.

Re:Mosh v1.3 Released by JdeBP on Friday May 05, 2017 @12:47PM (#14274817)
Incorrect. TCP does not work that way and the failure mode is nowhere near that smooth. I suggest actually trying it.

No cheating and watching Keith Winstein's video on the mosh WWW site, which shows what actually happened in the case of one fairly well-known WWW app, now! (-:

Re:Mosh v1.3 Released by moosingin3space on Friday May 05, 2017 @04:53PM (#14276763)
On my Android phone, the user experience is significantly degraded when that happens -- the app has to wait to re-establish a TCP and TLS connection, which is relatively slow.
Re:Mosh v1.3 Released by fulafel on Sunday April 30, 2017 @02:03AM (#14230342)
They expand on the Gmail issue thusly:

> fancy apps like Gmail-in-Chromium or on Android still behave atrociously on dodgy connections or after switching IP addresses. (Have you ever had Gmail leave an e-mail message in "Sending..." for ten hours while merrily retrieving new mail and not indicating any kind of error? Us too.)

So it's about the mobile app, not the web app. Not necessarily HTTP. Maybe someone who knows more about Android can say what happens to existing TCP connections when roaming. Or what protocol the Gmail app is using.

Re:Mosh v1.3 Released by revelation on Saturday April 29, 2017 @08:26PM (#14229560)
HTTP uses TCP, which is always terribly slow to establish a connection, often useless with high packet loss.

Mosh is UDP, so there is no connection establishment (no need for multiple initial round trips before sending one bit of data) and no indiscriminate retransmission of data. Additionally, you can just continue sending data when your IP changes, connections aren't lost. That typically happens when in a train and you're quickly traversing multiple cells.