This is a legacy project and no longer maintained

Rocks protect sockets-based applications from network failures, particularly failures common to mobile computing, including:
  • Link failures (e.g., unexpected modem disconnection);
  • IP address changes (e.g., laptop movement, DHCP lease expiry);
  • Extended periods of disconnection (e.g., laptop suspension).
Rock-enabled programs continue to run after any of these events; their broken connections recover automatically, without loss of in-flight data, when connectivity returns. Rocks work transparently with most applications, including SSH clients, X-windows applications, and network service daemons.

Download

Features

  • Reliable: Rocks detect connection failures within seconds and reconnect automatically when connectivity is restored. Reconnection succeeds even when one end of the connection obtains a new IP address.

  • Safe: Rocks recover lost in-flight data no matter when failures occur, safely interoperate with ordinary sockets, and authenticate resumed connections.

  • User level: You can install and use rocks as an ordinary user. They do not require any kernel modifications.

  • Transparent: You can use rocks with existing programs without re-programming, re-compiling, or re-linking.

  • Easy to use: Rocks come with simple command-line tools for enabling rocks in ordinary programs.

For more details about rocks (and the related racks system) we encourage you to read our paper.


NAME

rock, rockd - run a program over reliable sockets  

SYNOPSIS

rock [-k] [-l] [-d [ user ] ] command [arg ...]

DESCRIPTION

Rock runs the specified command over reliable sockets (rocks), protecting from failure the network connections created by the command process and its children. Recoverable failures include those caused by host IP address change, extended periods of network disconnection, and link failure.

Rocks must be enabled at both ends of the connection. Rock by default assumes that the command process communicates with rock-enabled remote peers. Connections with ordinary peers, those that do not support rocks, silently revert to ordinary socket behavior.

The -d option enables reliable socket connections to ordinary peers by redirecting the connection through a new rockd process, started by rock, on the remote host. Rockd must be in the path of the remote user, either $USER or user. Use of this option is currently limited to the commands ssh and scp.

The -k option also loads the ckpt checkpoint library in the process.

The -l option forces suspended rocks to reconnect to localhost. This is useful for process migration of a set of processes communicating over rocks.

Failed connections that cannot be recovered by rocks after 72 hours are silently closed.  

EXAMPLES

Start a rocks-enabled sshd on host nob:
nob# rock sshd

Start a new rocks-enabled shell, then ssh over rocks to nob:

% rock sh
% ssh nob

Start a rocks-enabled remote shell on a host ("oldskool") that does not have a rocks-enabled sshd:

% rock -d ssh oldskool
 

FILES

librocks.so
Dynamic library loaded into the command process and its children. It must be in the LD_LIBRARY_PATH (see ld.so(8)) of the command or in the INSTALL_LIB_DIR set when rock was compiled.

SEE ALSO

Rock loads code into the command process using LD_PRELOAD, which has its own limitations; see ld.so(8).

The ckpt checkpoint library is available at

Victor C. Zandy and Barton P. Miller. "Reliable Network Connections". ACM MobiCom'02, Atlanta, GA, 2002.  

BUGS

Currently rocks only protect TCP connections.

Rocks are not firewall friendly.

Connection recovery does not succeed when both ends change IP address while disconnected (but note the -l option)

Rockd requires you to type your password twice.