Phat

Client API

Omitted or unnecessary features

Included features

Implementation choices

Proposed Test Documents

In an effort to standardize our tests, we should have a common way to compare implementations for correctness and speed. The test document should be unambiguous, easy to parse by a program, and be able to test both correctness and performance.

Example Test

This test will start 100 Phat nodes, cycle through the primary node and perform 15 concurrent file creations to the Phat nodes, 10 times:

    startnodes 100
    starttimer total
    repeat 100
        stopnode primary
        repeat 10
            do createfile 15
        endrepeat
        revivenode
    endrepeat
    stoptimer total

Commands

Operation Arguments Description
startnodes [number] Starts [number] new Phat nodes and they all are aware of each other in the group. Instruction blocks until all nodes have started.
starttimer [name] Starts a timer named [name].
stoptimer [name] Stops a timer named [name] and prints the total duration the timer was running.
repeat [number] Repeats the commands following it in order until its matching endrepeat instruction is encountered, [number] times.
endrepeat none Returns to its matching repeat instruction. See repeat.
stopnode [primary,backup,any] Stops a random node that matches the node's type (i.e. primary, backup, or any node).
revivenode none Brings a node that was stopped back to running. Instruction does not block.
do [taskname] [num_clients] Initiates task [taskname] to the nodes, running concurrently [num_clients] times. See Tasks table below. Instruction blocks until all tasks have completed.
wait [ms] Blocks for [ms] milliseconds

Tasks

Task name Description
createfile Each client creates a uniquely named file in the root with unique contents then fetches its contents and asserts they match.