It is an executable utility which allows you to control your entire datacenter at a process-level by issuing local file system operations on any one host in the datacenter.
In other words, from the shell on any host you can command the entire datacenter, and similarly from any programming language (even single-threaded languages like PHP) you can orchestrate concurrent datacenter-wide logic by issuing sequences of local file system operations.
At high level, the circuit utility creates a Go-like runtime
environment across the datacenter, which supports creation and manipulation of
a few primitive types of objects (channel, mutex, process, select)
which are allocated within the
/circuit file system and are
globally accessible to all participating hosts via their local
% hg clone https://code.google.com/p/gocircuit/ % cd gocircuit % export GOPATH=$GOPATH:$PWD % export PATH=$PATH:$PWD/bin % cd src/circuit/cmd/circuit % go install
% circuit -a=H_1:PORT_1 -m=MOUNT_POINT -xfs=LOCAL_SHARED_DIRThe circuit will print out the URL of the newly started worker on stdout. It should look like:
% circuit -a=H_K:PORT_K -m=MOUNT_POINT -xfs=LOCAL_SHARED_DIR \ -j=circuit://H_J:PORT_J/PID/WORKERIDHere H_J can be any host that is already running the circuit at the time the command above is executed on H_K.
Say you are currently logged in any one host H_K. And say you mounted the circuit on
/circuit and explore. Most directories have a
help file within them. Cat it.
It will tell you what you can do.