Comment 4 for bug 1352411

Revision history for this message
chjgcn (chjgcn) wrote :

In the patch file above, I changed the behavior of protocol 'HTTP'. After my work on
    https://answers.launchpad.net/gearmand/+question/252097
, I rethink my change to protocol 'HTTP', then I restore the main design for it, fix bugs and make it more powerfull.
After patching, there will be only one response from server to client.
For background or planed job, when the job is created, a response of 'JOB_CREATED' without data will be sent to client.
For foreground job, when the job is created, there is no response of 'JOB_CREATED' sent to client; when the worker sends data back to server, the data will be stored separately by job handle; when the job is completed, the former stored data and the current returned data will be joined together, and a response of 'WORK_COMPLETE' with these data will be sent to client.
This patch improve protocol 'HTTP', and fix bugs which will occur in the situation that the jobs are sent from client one after one quickly, and the situation that the data from worker is too big.