* non-text portions embedded within the text protocol (ever tried to parse HTTP with a Java InputStreamReader? you can't properly switch back to binary mode at the end of the headers...)
* variable end-of-content markers that cannot occur in the content
Of course, HTTP 1.x uses ALL of the above (see possible values for Transfer-Encoding). It's a horribly complicated mess that is only surpassed by MIME email.
Binary protocols usually just specify the length of the data, followed by a binary blob with the data. MUCH simpler!
> Binary protocols usually just specify the length of the data, followed by a binary blob with the data. MUCH simpler!
It is possible to have the same simplicity with a textual protocol, it is just that most text protocol designers don't bother with explicit prefixed lengths:
You get one of:
* complex escaping rules (and assorted inefficiencies)
* non-text portions embedded within the text protocol (ever tried to parse HTTP with a Java InputStreamReader? you can't properly switch back to binary mode at the end of the headers...)
* variable end-of-content markers that cannot occur in the content
Of course, HTTP 1.x uses ALL of the above (see possible values for Transfer-Encoding). It's a horribly complicated mess that is only surpassed by MIME email.
Binary protocols usually just specify the length of the data, followed by a binary blob with the data. MUCH simpler!