A web server will be used to support the federation configuration. Each participant’s program will use HTTP to register a federation, role, name, orchestra, and IP address.
1. federation is the name of the whole group in case there is more than one independent concert going on (or testing), e.g. “sleo”
2. role is either super-node or node
3. name is an individual’s identifier, e.g. John
4. orchestra is an orchestra name, e.g. CMU or Colorado
5. IP address is implicit in the HTTP message, the IP address of the laptop
The web server will keep a list of federations. Each federation will have a list of orchestras. Each orchestra will have a designated super-node and a set of nodes, each with a name and IP address. Nodes will try to register by sending information, and if a super-node exists, the IP address of the super-node will be returned. When a super-node registers, the IP addresses of all other super-nodes will be returned so the super-node can connect to them.
The server should also return elapsed time from the first registration. This will be used to estimate the global federation time. See clock synchronization.
The server should also implement some pages accessible through browsers to get the full status of federations, and also to delete federations that are finished.
The server should also implement a way to initialize a federation performance, e.g. clear all previous registrations. (There should be at least some modest security to prevent a random mean-spirited person from clicking the reset button. One possibility is no web interface -- just authenticate to AFS and delete a file.)
The conductor has special status, and (in our implementation), there should only be one conductor. Thus, the conductor should register with the server so that others can discover the conductor, the conductor's super-node, and so that only one node is allowed to become the conductor. Coordinate with the conducting interface group, the chat system group and maybe others to integrate this functionality into the system.
Based on my (RBD) reverse-engineering of the Connection code, here are some notes on the design and how to use the server:
Call getOrchestraId(orchName), invoking URL "orchestra" to get an integer.
If the result is -1, create the orchestra with createOrchestra(), invoking URL "orchestra".
Before creating an orchestra, call getFederationId(), invoking URL "federation" to get an integer. If the result is -1, create the federation with createFederation(), invoking URL "federation".
Once the existence of the orchestra is established, use URL "register" to register the node with name, orchestra, federation, supernode (yes/no), and conductor (yes/no).
The response contains nodes and/or supernodes...
If you are a node, you need to connect to your supernode. The supernode ip, if it exists, appears in the response: Look for the string "Your supernode:" in some response line. In the following line, split the line into fields separated by blanks and take the 3rd field, numbered from 1 through N, (the supernode name, e.g. "/cmu/rbd") and the 4th field (the supernode ip).
If there is no supernode, you should wait for the supernode to connect to you.
An implementation has been completed in Python and hosted on Google's App Engine. The functionality is exactly the same as that of the Python implementation, and the workings of the GET requests on which the implementation is based are presented in the Python implementation below. The implementation is accessable at http://laptop-orchestra.appspot.com/*.
An implementation has been completed in Python. Functionality is provided via GET requests. It is available at http://www.music.cs.cmu.edu/cgi-bin/*. Files marked with an asterisk are password-protected. If you look at the code it should be pretty easy to tell how to get pass the password. The functionality and required parameters are as follows: