Communication Methods (over sockets) for all client/server communication
Fully specify the methods by which the various programs that make up 'buntustand will communicate. The three components are the server, the burners, and the various display and control frontends.
Blueprint information
- Status:
- Started
- Approver:
- Neal Bussett
- Priority:
- Essential
- Drafter:
- Neal Bussett
- Direction:
- Approved
- Assignee:
- 'Buntu Stand Team
- Definition:
- Discussion
- Series goal:
- Accepted for trunk
- Implementation:
- Started
- Milestone target:
- scale8x
- Started by
- Neal Bussett
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
On Connect (client connects to server)
Server: Client ID
Client: Reply with something identifiable (MAC+device path md5 hashed, allows multiple clients per computer), Type of client
#### IF BURNER ####
Server: Burn Capabilities?
what ISOs it has, CD/DVD burner
Client: Status of CD
Server: BURN [CD]
Client: Status 0%
Client: Status 50%
Client: Status 100%
Client: Status MD5-pass/fail (this is completion of this disk)
((client unmounts so tray can open)) -- Possibly pops tray open itself
Client: Status Tray Open
Client: Status AVAIL/EMPTY (repeat occassionally?)
#### CD INFO QUERY #### (server query client, display/command query server)
HOST: WHAT\t[
CHILD: INFO\t[
#### CD TRANSFER ####
push/get (server pushes CDs to client, server gets CDs from client, command/display to server too)
#### IF DISPLAY ####
*display queue
*display current status of all burners
*statistics?
-- *display current disk cache (burned disks we think we have?)
#### IF COMMAND #### (all commands are also diplays?)
*Queue a disk
*Clear the queue
*Method to match clients (UIDs) with physical computers (likely forcing trays to open, etc?)
--- * This can also be determined just with normal usage, client X is done burning, and the tray is opened programmatically
--- * Command should be able to send server a "Friendly" name for each burner which it will give to all displays
#######
Convention:
tabs as delimiters
messages ended by two CRLF (this allows freeflow descriptions... if you need a blank line, use "\r\n \r\n"
## Formats:
HASH: md5 hash of images
ID: unique identification of client software
* Could use UUID (random)
* Would be used to keep track of clients even if they drop connection (box X burned 10 CDs! or in the future: box X burns slowly and unreliably, only give him commodity images)
## New Connection ##
SERVER: IDENT\tV[
CLIENT: ID\tV[version]
HOST: CAPAB\r\n\r\n # Query for capabilities (for all)
CHILD: CAP\t(BURNCDR|
## Burn specific ##
{
{
CLIENT: STATUS\
(wait for a bit (10 seconds right now), repeat until BURN)
}+
SERVER: BURN\t[
BURNER: STATUS\
BURNER: STATUS\
BURNER: STATUS\
BURNER: STATUS\
BURNER: STATUS\
BURNER: STATUS\
SERVER: OPEN\r\n\r\n # Optional, allow server to open tray
BURNER: STATUS\
}+
## CD INFO QUERY ## (server query client, display/command query server)
## Client need not answer right away
HOST: WHATIS\
CHILD: INFO\t[
## Error Messages ##
ERROR\t[
## Client / Server ##
CLIENT: QUEUE\tHASH\
SERVER: QOK\r\n\r\n
## Give us the Queue
CLIENT: QREPORT
SERVER: QLIST\t(
## Report the Statuses of burners
CLIENT: SREPORT
SERVER: SLIST\t(
## Deal with client-
CLIENT: ASKCAPAB
SERVER: capabilities like up there ^^ (Host/child new connection stuff)