In the previous article, "Master Programmer's Training: TCP, message subcontracting and protocol design" discusses some of the topic of protocol design, here to add to the HTTP protocol and binary protocol comparison.
The HTTP protocol is a text protocol and a name-based protocol, from both sides.
Features of text Protocol vs binary Protocol text protocol:
Convenient for people
Easy to read, understand, debug, construct
Resolve complex, redundant, multi-
Need to consider character escapes
The features of the binary protocol:
Easy Machine
Features of the name-based vs position-basedname-based Protocol:
Agreement fields areidentify with name
Agreement fieldsindependent of Location
The Protocol field can be defaulted
New protocol fields are more convenient
Parsing complex
Need to consider character escapes
Features of the Position-based protocol:
Each protocol field ishave a specific location
The new protocol field needs to be well-managed by protocol versioning (ProtobufThis kind of is very good)
More efficient resolution
--------Split Line---------
1. Master Programmer's Practice: Introduction
2. Master Programmer's Training: a summary of the technical article
3. Master Programmer's Training: IP, DNS and CDN
4. Master Programmer's Training: TCP, message subcontracting and protocol design
6. Master Programmer's Training: CGI and fastcgi
Recommended Wecode Programmer Cloud Notes--for programmersOpen Source、Simple and efficientCloud notebook software, using Youdao cloud to do cloud storage.
★Syntax Highlighting"Currently supports a variety of parties such as C + +, C #, Pascal, Java, vb.net, XML, HTML, Python, and SQL.
★Cloud Storage"In addition to the local notebooks, the cloud storage features have been added, and the Youdao cloud notes are now used as cloud storage.
★Document Encryption"provides document encryption to ensure the security of sensitive documents.
★multiple Local notebooks"Support for multiple local notebooks enables you to create new local notebooks, open, compress, and back up local notebooks.
★article AttachmentTo add multiple attachments to each article, and to open attachments and export attachments in a temporary directory. Youdao cloud attachments are also stored in the cloud.
Master Programmer's Training: HTTP protocol vs. binary protocol