R
Ross
I've just written a client/server application. Usually when I do this,
I have to spend some time getting the protocols right, with hung
clients or servers being a typical alpha debugging scenario. This time
I just decided that all communications from the client were a single
string (encoded and sent encrypted with the server's public key).
Where usually I'd have a sequence of steps for operations that require
multiple bits of data, I just encoded all data into the single string,
and the server unpacks them, executes the command potentially using
unpacked data, and then replies with a single packed string. This was
much easier than having multi-step protocols.
Next time I'm defining an XML schema for requests and replies to make
this even more robust/general.
Apologies for the stream of consciousness question-less post.
I have to spend some time getting the protocols right, with hung
clients or servers being a typical alpha debugging scenario. This time
I just decided that all communications from the client were a single
string (encoded and sent encrypted with the server's public key).
Where usually I'd have a sequence of steps for operations that require
multiple bits of data, I just encoded all data into the single string,
and the server unpacks them, executes the command potentially using
unpacked data, and then replies with a single packed string. This was
much easier than having multi-step protocols.
Next time I'm defining an XML schema for requests and replies to make
this even more robust/general.
Apologies for the stream of consciousness question-less post.