The Ensigns of Command

Set up a new page about the remote administration project in tpserver-cpp on the Thousand Parsec Wiki. I’m going to flesh out the details of the plan once I get some feedback on my initial ideas about the protocol.

For now, it has a list of the basic server command set currently implemented through the console, with synopses for each. They’re relatively simple, so I’m thinking I can just implement a “dumb” protocol on the client side with a single frame type and do all the checking on the server side. It’s entirely possible that there’s some gaping chasm in my understanding of the situation, of course.

Either way, my idea at the moment is to have the client support a “Get Active Commands” frame which would prompt the server to send a sequence of command description frames with synopses and usage help.

If we go with the dumb protocol idea, when a command is issued, the client would send a command frame to the server and get either a result of the command (if the command was accepted, albeit not necessarily successful), a single command description frame (if the command was not used properly or was not active when it was issued), or a notification that no such command exists.

Otherwise, there’s a whole bunch of complicated state stuff to worry about. Can the client’s local command list safely be considered currently valid if the last thing it did was request the active command list from the server? This depends on whether more than one admin client can connect simultaneously, and on whether anything other than an admin command can change the state of the server in such a way as to enable or disable commands. If we can never consider the local list valid, we’d need to implement some sort of atomic transaction beginning with a request for the active command set to do local checking. And then there’s the possibility of client implementations not complying with the standard…

May 17th, 2008
Tags:
Comments are closed.