麻豆淫院


Communication scheme makes popular applications 'gracefully mobile'

Communication scheme makes popular applications 'gracefully mobile'
One of Mosh's advantages over SSH, the program it updates for the mobile-computing age, is that it doesn't need to wait for a response from a remote computer before displaying keystrokes on-screen. Mosh's guesses about what to display are underlined until confirmed.

The Secure Shell, or SSH, is a popular program that lets computer users log onto remote machines. Software developers use it for large collaborative projects, students use it to work from university servers, customers of commercial cloud-computing services use it access their accounts, and system administrators use it to manage computers on their networks.

First released in 1995, SSH was designed for an Internet consisting of stationary machines, and it hasn鈥檛 evolved with the mobile Internet. Among other problems, it can鈥檛 handle roaming: If you close your laptop at the office and reopen it at home, your SSH session will have died; the same goes for an SSH session on a tablet computer that switches from a Wi-Fi connection to the cellular network.

At the Usenix Annual Technical Conference in Boston this month, researchers at MIT鈥檚 Computer Science and Artificial Intelligence Laboratory presented a paper describing a new remote-login program called Mosh, for mobile shell, which solves many of SSH鈥檚 problems. The researchers also believe that the communication scheme underlying Mosh could improve the performance of a host of other mobile applications.

Even before they presented the paper, they made Mosh freely available on a number of different websites; it鈥檚 now been downloaded at least 70,000 times. 鈥淭hat鈥檚 from the ones that we鈥檙e able to track,鈥 says Keith Winstein, a graduate student in MIT鈥檚 Department of Electrical Engineering and Computer Science and lead developer of Mosh.

Echo location

Besides roaming, another of the problems that Mosh addresses is the delayed 鈥渆choing鈥 of keystrokes in SSH. During a standard SSH session, when a user strikes a key on the keyboard, nothing appears onscreen until information about the keystroke travels to the remote machine, which performs a computation and sends back the result. That鈥檚 because, in many applications commonly run through SSH, keystrokes don鈥檛 necessarily correspond directly to displayed symbols: In an email program, for instance, the 鈥淣鈥 key might call up the next email; similarly, when a user enters a password, it shouldn鈥檛 appear onscreen.

Mosh has an algorithm running in the background that deduces when keystrokes should be displayed and when they shouldn鈥檛. Until the remote computer confirms Mosh鈥檚 predictions, the characters onscreen are underlined. 鈥淚 have never seen it display anything wrong,鈥 says Hari Balakrishnan, a professor in the Department of Electrical Engineering and Computer Science and Winstein鈥檚 coauthor on the Usenix paper.

The reason Mosh handles roaming so much better than SSH does is that it abandons the Transmission Control Protocol, or TCP 鈥 the framework that governs almost all the traffic in today鈥檚 Internet.

鈥淭CP has some wonderful ideas embedded in it 鈥 congestion control, ways of doing reliability and so forth,鈥 Balakrishnan says. 鈥淏ut it has this one big, big problem: It provides a reliable, in-order byte-stream abstraction between two fixed endpoints. If you were to pick the worst possible abstraction for the mobile world, it would be that.鈥

With mobile applications, Balakrishnan explains, it鈥檚 not as crucial that every byte of information be displayed in exactly the order in which it was sent. If you鈥檝e lost connectivity while using the map application on a smartphone, for instance, when the network comes back up, you probably want an accurate map of your immediate surroundings; you don鈥檛 want to wait while the phone reloads data about where you were when the network went down.

State currency

Winstein and Balakrishnan developed their own communications protocol, which they call SSP, for state synchronization protocol. SSP, Balakrishnan says, works more like the protocols that govern videoconferencing, where getting timely data about the most recent state of the application is more important than getting exhaustive data about previous states.

Mosh is already proving itself useful: At his computer in his office, Balakrishnan pulls up the connection log for one of the servers in MIT鈥檚 Athena network; a third of the people logged into it are using Mosh. But in ongoing research, Winstein and Balakrishnan are investigating how SSP can be improved and extended so that other applications can use it as well.

鈥淲e have sort of a broader agenda here,鈥 Winstein says. 鈥淢osh is a gracefully mobile application. But there鈥檚 a lot of even more popular network applications that have the same problems, like Gmail, or Google Chat, or Skype. None of these programs gracefully handle mobility, even though they鈥檙e intended for mobile devices.鈥

鈥淢osh is a fine bit of engineering, focused on the precise requirements of the application at hand,鈥 says Jon Howell, a researcher at Microsoft Research who specializes in web applications. Winstein, Howell says, 鈥渟pent a lot of effort on the gritty practical details of correct terminal behavior.鈥

Howell points out that there鈥檚 a good deal of existing research on state synchronization, the technique underlying SSP, and he鈥檚 not sure that SSP offers any clear advantages over its predecessors. 鈥淚f [Winstein] pushes the SSP idea farther, I suspect he'll find himself covering some of the [same] territory,鈥 Howell says. 鈥淧erhaps he'll discover a new strategy or a new class of applications for which synchronization is particularly useful.鈥

More information: Paper: "Mosh: An interactive remote shell for mobile clients" ()

Mosh project site:

This story is republished courtesy of MIT News (), a popular site that covers news about MIT research, innovation and teaching.

Citation: Communication scheme makes popular applications 'gracefully mobile' (2012, June 28) retrieved 6 June 2025 from /news/2012-06-scheme-popular-applications-gracefully-mobile.html
This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no part may be reproduced without the written permission. The content is provided for information purposes only.

Explore further

Researchers show how to use portable devices' built-in motion sensors to improve data rates on wireless networks

0 shares

Feedback to editors