The Friend Pipe

When you want to send a file to someone, you have multiple choices. You can send emails, you can use file sharing services. You have to make the decision each time. We can use the friend pipe. The friend pipe:
filename | sam

This pipes the file filename to the friend sam. At this point we do not care how the file should be transferred. Only that it is transferred in the quickest way at this point. We can broadcast status updates with the fp (friendpipe) command.

friends "Anyone free for lunch? 1.30"

To use the friendpipe, we must learn about another user in order to know how to transfer data to them. The friend manager allows us to create relationships with other people. There are many approaches to adding users:

friend add http://example.com/
friend add git://git@github.com/username/friendpipe.git
friend add username@example.com
friend add ssh://user@11.0.0.1
friend add xmpp://user@example.com

This will pull information about how to connect to the user.

Design

  • friendpipe should encrypt content. This can be accomplished exchanging public keys as part of the bootstraping process.
  • The basic unit of an interaction is a file transfer. Further abstractions such as social networking can be built on-top.
  • Plugins are used to handle the actual transfer between users. (For example: email, file services like Dropbox, SSH, FTP etc)
  • Content negotiation picks the best transfer mechanism between two users.
  • Broadcasting files to multiple users requires more intelligent picking of algorithms.