ostore.archive
Class ArchiverStage

java.lang.Object
  |
  +--ostore.util.StandardStage
        |
        +--ostore.archive.ArchiverStage
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class ArchiverStage
extends StandardStage
implements SingleThreadedEventHandlerIF

The ArchiverStage archives a particular version of an object. The result is a V-GUID or version GUID.

The ArchiverStage creates a checkpoint by sending a GenerateFragsChkptReq. When the checkpointing process is done, all uniquely modified VerifiableBlocks have been Erasure encoded into n Fragments and a BucketsToDisseminateEvent containing the resulting GUID's of all the uniquely modified VerifiableBlocks has been dispatched.

Fragments are the main mechanism that provides durability in OceanStore. Each Fragment is self-verifying and the cornerstone of the archival layer's fault tolerance and automatic repair. A Fragment is produced from an Erasure coding process, where the Erasure code treats input data as a series of m Fragments, which it transforms into n Fragment, where n > m. The resulting code's essential perperty is that any m of the coded Fragments are sufficient to reconstruct the original data. The rate of encoding is r = m/n<1. The storage overhead is 1/r. The system can adjust the durability of information by selecting the rate (and hence storage overhead).

USAGE

To create a checkpoint dispatch a GenerateFragsChkptReq containing the CacheableIdentity (i.e. VHASH) of the top VerifiableBlock, the number of Fragments to Erasure encode, the inverse rate of encoding, and the Erasure code type. The local GenerateChkptStage will receive the checkpoint request message and return a GenerateFragsChkptResp that either includes the resulting V-GUID.

INITIALIZATION PARAMETERS

node_id
NodeId of the local server where this stage is running.

Version:
$Id: ArchiverStage.java,v 1.22 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
GenerateFragsBlkReq, GenerateFragsBlkResp, GenerateFragsChkptReq, GenerateFragsChkptResp, BucketsToDisseminateEvent, Erasure, Disseminatable, Fragment, VerifiableBlock, DataObject, Btree.InteriorNode, DataObject.DataBlock

Field Summary
static String[] STATE_STRING
           
 
Fields inherited from class ostore.util.StandardStage
classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, resender, resender_tokens, serializable_types, sim_running, tag
 
Constructor Summary
ArchiverStage()
           
 
Method Summary
 void handleEvent(QueueElementIF item)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class ostore.util.StandardStage
BUG, BUG, BUG, destroy, dispatch, enqueue, handleEvents, now_ms, now_us
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_STRING

public static final String[] STATE_STRING
Constructor Detail

ArchiverStage

public ArchiverStage()
Method Detail

handleEvent

public void handleEvent(QueueElementIF item)
                 throws EventHandlerException
Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Overrides:
init in class StandardStage
Exception