[mosh-devel] mosh and SCTP.

Hari Balakrishnan hari at csail.mit.edu
Wed Apr 11 07:23:02 EDT 2012


Hi Mark,

Good question.  Here are some relevant differences:

1) As far as I know, SCTP doesn't support the ability to resume after suspension (and changing IP), particularly if data was outstanding over the connection when the suspension occurred.

2) SCTP delivers data in order and does not have the ability to skip data to allow the receiver to reach the current state promptly.  This capability is important for interactivity.

3) SCTP, like TCP is bulk-transfer-optimized.  So if a buffer were to fill up for whatever reason from the session, it would reduce interactivity.  Mosh's State Synchronization Protocol (SSP) has a different end-to-end flow control method than SCTP (or TCP), which optimizes for interactivity (rather than for bulk throughput). 

4) I'm not sure how widely deployed SCTP is, across different operating systems.

Please note that Mosh doesn't run atop UDP; there's a state synchronization protocol that sits in between.  That protocol uses the principles of "application-level framing", which is a design philosophy that says that one can get better behavior and performance by designing a protocol in concert with the application.  In our case, SSP uses out-of-order delivery (i.e., skipping data when appropriate), roaming across IPs, and a different flow control strategy, to better support an interactive terminal.

Ultimately the problem in not using an ALF approach is, once the app gives the transport some data to deliver, there is no easy way to "pull it back" if the app changes its mind.  The reason is that there is no common vocabulary to name data between the app and the transport protocol.  Mosh+SSP avoids this issue cleanly.

Thanks again for bringing this issue up, and please let us know if you have further comments.

Hari

On Apr 11, 2012, at 7:04 AM, Mark Blackman wrote:

> Hi,
> 
> I just stumbled across mosh today and found it quite interesting, but something
> about the description kept making me think of SCTP, stream control transmission
> protocol.
> 
> I wonder if SCTP has any merits over UDP for the mosh workload in this case.
> The reasons for using UDP are clear and very good, but I can't help thinking
> SCTP might be useful here too.
> 
> Any comments on why UDP is probably more suitable than SCTP for mosh? I can't
> say I've looked into this closely so this is more just a request for education
> in the end.
> 
> Cheers,
> Mark
> 
> 
> 
> _______________________________________________
> mosh-devel mailing list
> mosh-devel at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-devel





More information about the mosh-devel mailing list