Storage

Overview

Email is useful because any one person can send a message to any other person, anywhere in the world. The heart of email is the ability to transfer some message based on a commonly-understood message format between two different systems that may have been developed entirely independently of each other. The concept is relatively simple, but the fact that email is so ubiquitious is simply a miracle.

However, there is more to email than just the transfer of messages.

For starters, I want people I know to be able to send me a mail even when I happen to be out mountain climbing. I want to be able to receive the message when I’m not available, then review it afterward when I am back at my desk. For this reason, email is by design asynchromous. Time can pass between the moment a mail is sent and the moment it is read. In the meantime, it needs to be stored somewhere.

Additionally, although it is possible to read a message, then discard it, never to be seen again, it is more common for people to archive a message. Some people even get creative and use their email for various other purposes, such as a kind of poor man’s information archive. Many corporations use email for business purposes, which requires administration of users within the organization. Even individuals with a self-hosted email server want to ensure that their system does not get abused as an open relay.

All of these types of concerns requires that the system maintain some kind of state, whether that be the messages themselves, information about the system’s users, and even in some cases user credentials. Keeping state requires a storage system. The system of storage must work intimately with the various protocols.

In this section, we describe the two principle types of storage that James manages: