Folders are maintained in ePOST using single writer logs, similar to the Ivy peer-to-peer file systems. Changes to a folder are recorded as log entries. The folder has one small piece of mutable data, the log head, which points to the most recent log entry. Each entry then points to the previous.
In the sections below, the components of ePOST are discussed in more detail.
route(Key, Message)and routes the given message efficiently to the live node with node id numerically closest to the given key.
To ensure that node churn (or nodes joining and leaving the overlay) does not cause data loss, PAST replicates each object on multiple nodes. In the case of ePOST, PAST is configured to store each object in the 3 closest nodes to the object's identifier. This choice provides a good balance between replication overhead and object availability. Protection against correlated node failures is provided by a system called Glacier, described below.
Since many emails are deleted, ePOST must be able to eventually garbage collect objects stored in the DHT, or the garbage will quickly overwhelm the live data. To do so, ePOST uses a lease-based version of PAST to store its data. This version supports automatic lightweight garbage collection without the overhead of attaching signatures or backpointer lists for each object. Each object in the DHT has an attached expiration time, which is the time after which replica holders are allowed to collect the object. Your ePOST proxy periodically extends the lifetime of all the objects that are still referenced from users' folders. Therefore, deleted objects eventually expire and are collected, since they are not refereshed.
To prevent such a widespread correlated failure from deleting DHT data, ePOST employs the Glacier data durability system, which can provide 99.9999% data survival even under a 60% correlated failure. Glacier works by Erasure encoding objects, and storing a large number of fragments throughout the network. Glacier maintains guarantees for each object by ensuring a fraction of the fragments exist at all times, regardless of node churn.