    Simple Grid Protocol 1.04 - Copyright (c) Brendan Kosowski 2004, 2005, 2015

    PROTOCOL SPECIFICATION


OVERVIEW
--------
The Simple Grid Protocol is designed to allow users on a TCP/IP
network or the Internet to run programs on their computer which
utilize the unused CPU resources of other computers on a network
or the Internet.

These programs are made up of both local tasks & portable tasks.
The portable tasks will be executed on the computer on the grid
that has the most available CPU resources at the time. The local
tasks are executed on the user's local machine and are tasks that
cannot be executed on another computer on the grid because local
I/O operations must be performed.


SERVERS & PORTS
---------------
Tracking Server ( PORT 17667 )

1.) The tracking server keeps track of the ACR (Available CPU
    Resources) of all the computers on the grid. Here is the
    formula for ACR: ACR = CPU_Frequency(MHz) x CPU_Idle(%) / 100

2.) The tracking server maintains a record of each computers IP
    Address, ACR & the Time the record was submitted to the
    tracking server. As of version 1.04, the tracking server also
    keeps a list of flags for each IP address and is currently
    only used to flag a computers ability to evaluate lisp via
    the new XML interface.

3.) The tracking server purges all records more than 40 seconds
    old.

4.) Tracking Server Responses & Commands. NOTE: all responses &
    commands are terminated with a newline character.

    a.) Response: <copyright message>
	Response: token?
         Command: <grid security token>
            Note: Failure to provide the correct token will result
                  in termination of connection to server.

    b.) Response: what?
         Command: help
            Note: Lists all commands that can follow what?
         Command: bye
            Note: Terminate connection with server.
         Command: quit
            Note: Terminate connection with server.
         Command: join
            Note: Join the grid for 40 seconds.
                  Response: ip?
                   Command: <your ip address>
                  Response: acr?
                   Command: <your ACR>
                  Response: flags?
                   Command: (:XML T)
                      Note: joining computer has xml capability
                     OR
                   Command: (:XML NIL)
                      Note: joining computer has no xml capability
         Command: show
            Note: Shows a list of records of each computers IP
                  Address, ACR, the Time the record was submitted
                  to the tracking server (in seconds since new year
                  1900) & flags. Records are sorted from highest ACR
                  to lowest ACR. eg:
                  (("10.1.1.5" 2000 3304654202 (:XML NIL)) ("10.1.1.6"
                  1691 3304654199 (:XML T)) ("10.1.1.2" 1650 3304654201
                  (:XML T)))

CPU Resource Server ( PORT 17666 )

1.) This is the server that allows a computers CPU resources to
    be used by other computers on the grid. The CPU Resource
    Server allows other computers on the grid to pass it portable
    tasks, executes the portable tasks and returns the result of
    the execution back to the computer that passed it the portable
    task. 

2.) The CPU Resource Server allows a single line of lisp language
    code (in the form of a single lisp form or object) to be
    evaluated and the result is returned.

3.) CPU Resource Server Responses & Commands. NOTE: all responses
    & commands are terminated with a newline character.

    a.) Response: <copyright message>
	Response: token?
         Command: <grid security token>
            Note: Failure to provide the correct token will result
                  in termination of connection to server.

    b.) Response: what?
         Command: help
            Note: Lists all commands that can follow what?
         Command: bye
            Note: Terminate connection with server.
         Command: quit
            Note: Terminate connection with server.
         Command: eval
            Note: Evaluate a single line of lisp code (in the form
                  of a single lisp form or object).
                  Response: code?
                   Command: <lisp form>
                            Response: <result of evaluated lisp
                                      form>
