Freemount is a low-latency, transport-independent file interaction protocol. It runs over a reliable network medium, such as local sockets, TCP, TLS, and SSH.

The Freemount protocol is optimized to minimize latency. In addition to techniques like compounding (batching requests together) available in later versions of other protocols, Freemount adds macro-operations for common use cases. For example, requesting the entire contents of a file requires just one request message, and the server will send as many response message fragments as are necessary without further prompting. More specific operation is still possible in a single roundtrip by allowing the client to specify its own numeric values for remote file descriptors (so it doesn't have to wait for an open request to complete) and batch requests together in one network packet.

The protocol doesn't specify how a client locates or connects to a server. The Freemount server reference implementation (freemountd) communicates on file descriptors 0 and 1 for use with inetd (or a similar daemon wrapper). Freemount clients, on the other hand, launch connector programs that use POSIX file-descriptor-passing to return a pair of filehandles to the client. A simple TCP connector would connect() a socket, send it twice, and exit, whereas a TLS transport might pass back two pipes to itself and stay running to add and remove encryption. While this mechanism adds complexity, the benefits are that (a) the Freemount wire protocol implementation and client code are network-independent, (b) all logic pertaining to security is encapsulated and runs in its own process, and (c) in the event of connection failure (e.g. laptop sleep) the client can resume its session by rerunning the connector program.


The reference implementation and its build prerequisites are on GitHub.

Get started