tapestry.impl.test
Class RepairDirectoryTest2

java.lang.Object
  |
  +--ostore.util.StandardStage
        |
        +--tapestry.impl.test.RepairDirectoryTest2
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class RepairDirectoryTest2
extends StandardStage
implements SingleThreadedEventHandlerIF

RepairDirectoryTest2 refreshes disseminatables that have lost some of their redundancy. That is, RepairDirectoryTest2 receives the threshold trigger from tapestry, retrieves the disseminatables from remaining storage servers, reconstructs the original object, recreates disseminatables, and redisseminates disseminatables. Note: the disseminatables are replicas for now.

  1. Receive TapestryRepairObjReq
  2. Send RepairReq to all remaining nodes
    1. All remaining nodes respond back with lifetime.
    2. Should also send request to dead nodes???
    3. After enough respond or timeout, we can elect the leader, the oldest remaining node.
  3. Subordinate dissemination correctness conditions
    1. The leader will do steps 2 - 5.
    2. The leader should be the oldest remaining member
    3. If the leader does not get to step 5 in enough time then next oldest node in the sorted set becomes the leader.
  4. Leader dissemination
  5. Obtain a new dissemination set that includes remaining nodes
  6. send disseminatables to remaining and new storage servers.
  7. wait for enough responses.
    1. if not enough responses, than send to extra nodes.
    2. If the two basic dissemination attempts fail, than repair has failed.

Version:
$Id: RepairDirectoryTest2.java,v 1.1.1.1 2004/03/26 19:57:08 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
TriggerStage

Nested Class Summary
static class RepairDirectoryTest2.DisseminateReq
          DisseminateReq is a request sent by the leader; that is, node responsible for coordinating the repair of an object replicated on a set of nodes.
static class RepairDirectoryTest2.DisseminateResp
          DisseminateResp is either an ack or nack response sent to the leader acknowedging the receipt of the disseminatable and the willingness to be a storage server.
static class RepairDirectoryTest2.RepairReq
          RepairReq is request sent to all remaining nodes to send back their lifetime.
static class RepairDirectoryTest2.RepairResp
          RepairResp is contains the nodes lifetime and is the response to the RepairReq.
 
Field Summary
protected  int _additional_simulated_size
          Number of bytes that the msg is simulating.
static String[] STATE_STRING
          Strings corresponding to repair states.
 
Fields inherited from class ostore.util.StandardStage
classifier, DEBUG, event_types, inb_msg_types, my_node_id, my_sink, outb_msg_types, tag
 
Constructor Summary
RepairDirectoryTest2()
          Constructor: Creates a new RepairDirectoryTest2 stage.
 
Method Summary
 void handleEvent(QueueElementIF item)
          Specified by seda.sandStorm.api.EventHandlerIF
 void init(ConfigDataIF config)
          Specified by seda.sandStorm.api.EventHandlerIF
 
Methods inherited from class ostore.util.StandardStage
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
Strings corresponding to repair states. Used for debugging.


_additional_simulated_size

protected int _additional_simulated_size
Number of bytes that the msg is simulating.

Constructor Detail

RepairDirectoryTest2

public RepairDirectoryTest2()
                     throws Exception
Constructor: Creates a new RepairDirectoryTest2 stage.

Method Detail

handleEvent

public void handleEvent(QueueElementIF item)
                 throws EventHandlerException
Specified by seda.sandStorm.api.EventHandlerIF

Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by seda.sandStorm.api.EventHandlerIF

Specified by:
init in interface EventHandlerIF
Overrides:
init in class StandardStage
Exception