A love diary about http

Vernon novelist 2021-04-08 11:19:17
love diary http

1991 year 8 month

My name is client , An English name client.

Her name is server , An English name server.

This year , We were born .

Yes , We are all 90 after .

I love her , But she is far away .

In order to talk to her , I also invented HTTP agreement .

A language that only she and I can understand in the world , A romance that only she and I can understand in the world .

Although I can only send her GET operation , She can only return HTML file , But it's enough .

When I send out GET /index.html when
She'll come back

<body>Hello World</body>

Maybe in her opinion , I'm her world, too .

I know I'm not perfect yet , So name yourself 0.9 edition , I look forward to becoming better myself in the future .

1996 year 5 month

This is my second diary .

Forgive me for rarely keeping a diary , After all, a well-known person said :" Normal people who write diaries ?!"

I just shared it with her before HTML, This is far from satisfying me , Now I also want to share images with her 、 video 、 Binary .

in addition , I also want to have more contact with her , Just like lovers want to hug and kiss besides holding hands , I have nothing but GET I still want to POST,HEAD.

Again , At my strong request , Can you give me a hint every time you communicate , It is always difficult to make complaints about the way out . therefore , Except for the data part , Every communication adds a header message , We all have a mental preparation. What are we going to do this time .

For example, in the request header information , Accept: */* Will tell her the type of data I can accept , If she returns data Content-Type:image/jpeg I knew she was going to share her beautiful photos ,
Content-Type:video/mp4 I knew I could see her beautiful video .

Last , alas , Sometimes girls are really a little wordy , So I'm in again HTTP The agreement adds Content-Encoding, Suggesting that she can compress the data .

such as
I will use Accept-Encoding: gzip, deflate To tell her the compression type I can accept , and Content-Encoding: gzip Just tell me her actual compression type .

You can see that now HTTP The protocol is a lot more complicated , But I want to say it's a special code for both of us , I'd like to record it , Become a good memory .

Another embarrassing problem is that , She doesn't think I'll be long , Every Tcp Links can only send one request , Send data and shut it down , It bothers me a lot , So when some browsers request , Used a nonstandard Connection Field .

Connection: keep-alive

So she knows , I've really had a long time this time , Don't disconnect easily .

But unfortunately , This is not included in the criteria .

No matter what , I think HTTP This time, the change is quite decent , So it's called 1.0 Well .

With this milestone , My communication with my server can be more colorful .

After all, long distance love , The most important thing is to be effective 、 Rich communication .

1997 year 1 month

As we learn more about , I think I love her more , So willing to do more .

The greatest dignity of a man , I put it first Connection: keep-alive Inclusion criteria , That is, it is not closed by default without declaration .

secondly , I can't stand the pattern that I ask and she answers , I want to send out as much love as I can at one time , So I introduced the pipeline mechanism , Allow me to make multiple requests at the same time , Of course, she followed the order , Just respond one after another , At least I have done it in place .

My efforts are also rewarded ,server Also very considerate to me back Content-Length Field , So that I can easily know how much data she gave me .

But sometimes she has too much to say , I really don't want to wait too long for her to respond when she's finished , So in addition to Content-Length, I'm here at the same time HTTP Added
Transfer-Encoding Field , This means that the response will consist of an indefinite number of data blocks .

such as
Before every nonempty data block , There will be one. 16 The number of decimal places , Represents the length of this block . And finally there's a size of 0 The block , It means that the data of this response has been sent . Here is an example .

HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
This is the data in the first chunk
and this is the second one

such , I can get her reply right away , splendid .

Last , except GET POST Wait for the operation , I also added PUT PATCH All kinds of postures to communicate with her , Do you know .

Although it has been optimized a lot , But be modest as a man , So I named the version 1.1.

well , That's it , I will continue to work hard , For her .

2009 year

I heard that Google made it public SPDY agreement , It's still for me HTTP1.1 Inefficient problems ? I'm not very happy , I still like my HTTP agreement .

server And asked if I could also HTTP Also optimize , speechless , I passed my HTTP I've talked to her 18 I've been in love for two years .

be it so , I don't want to write. , How I love .

2015 year 5 month

Love a person , It's really going to make you better .

In order to get closer to her , I'm going to give it a good hand HTTP Optimized the next .

Though it is SPDY On the basis of , however , Is not important !

About the main points :

1、HTTP/1.1 The header of the version must be text (ASCII code ), Data body can be text , It can also be binary , Text parsing is certainly not as good as binary , So be direct and thorough , It's all binary .

So we can quickly understand each other's demands .

2、 I said before that I can send multiple requests at the same time ,server Deal with in order , But I don't want to take her responses one by one , So she can also return data to me simultaneously .

3、 The longer you fall in love , The more afraid the other party is of repeating things , So in addition to data bodies , I also compressed the header information this time . On the one hand, you can use gzip/ compress Compress , In addition, she and I maintain a head information table at the same time , All fields will be stored in this table , Generate a index number , I will not send the same field later , Send only index numbers , This increases the speed .

4、 This is the most important , The server can take the initiative to send resources to the client , Not that I have to make a request first . That is, when I leave 99 After step , The next step is for her to come to me .

There are too many optimizations this time , I decided to name it directly HTTP2.0, Of course, there will be 3.0,4.0. For her , I want to be better .


Once upon a time, cars and horses were very slow , Letters are far away , Life is enough to love one person .

Now ,HTTP Can let your love millisecond class convey to each other , But also wish you all like me , Get what you love , Be loved all my life .

BAT Code the agriculture , Transfer programmer ,Bug The little prince , The famous backer .

The wolf in the wind of Xier banner ,211 The God of failing in college , really · Brick carriers , false · Novelist .

本文为[Vernon novelist]所创,转载请带上原文链接,感谢

  1. Java 学生成绩管理系统课程设计,附源码!
  2. Java arbitrary audio to MP3
  3. DNS of docker
  4. Docker - build log monitoring system
  5. SSM + MySQL + Maven + Shiro WMS
  6. Top 10 reasons to fall in love with java!
  7. 一本关于HTTP的恋爱日记
  8. 【RocketMQ源码分析】深入消息存储(3)
  9. SpringCloud+Nacos实现服务配置中心(Hoxton版本)
  10. SCIP:构造数据抽象--数据结构中队列与树的解释
  11. SCIP:构造过程抽象--面向对象的解释
  12. 使用 docker 进行 ElasticSearch + Kibana 集群搭建
  13. Spring IOC 特性有哪些,不会读不懂源码!
  14. [DB Bao 41] use of PMM -- monitoring mysql, PG, mongodb, proxysql, etc
  15. Spring Cloud 升级之路 - 2020.0.x - 3. Undertow 的 accesslog 配置
  16. [DB Bao 42] MySQL high availability architecture MHA + proxysql realizes read-write separation and load balancing
  17. [DataGuard] recovery of physical DG in case of losing archive files in main database (7)
  18. MyBatis(3)Map和模糊查询拓展
  19. 【TTS】AIX-&gt;Linux--基于RMAN(真实环境)
  20. 【TTS】传输表空间AIX-&gt;linux基于rman
  21. 【TTS】传输表空间AIX asm -&gt; linux asm
  22. 【TTS】传输表空间Linux asm -&gt; AIX asm
  23. 【DB宝40】MySQL高可用管理工具Orchestrator简介及测试
  24. 【TTS】传输表空间Linux -&gt;AIX 基于rman
  25. 一本关于HTTP的恋爱日记
  26. 【RocketMQ源码分析】深入消息存储(3)
  27. SpringCloud+Nacos实现服务配置中心(Hoxton版本)
  28. SICP:构造过程抽象--面向对象的解释
  29. 3w 字长文爆肝 Java 基础面试题!太顶了!!!
  30. Spring Cloud 升级之路 - 2020.0.x - 3. Undertow 的 accesslog 配置
  31. win10卸载mysql5.7
  32. MySQL 批量插入,如何不插入重复数据?
  33. k8s cronjob应用示例
  34. 非常规方法,轻松应对Oracle数据库危急异常
  35. Oracle hang 之sqlplus -prelim使用方法
  36. 如何全文搜索oracle官方文档
  37. Java student achievement management system course design, with source code!
  38. win10安装mysql8.0
  39. 手把手教你写一个spring IOC容器
  40. JAVA 中的异常(1)- 基本概念
  41. A love diary about http
  42. navicat连接win10 mysql8.0 报错2059
  43. [rocketmq source code analysis] in depth message storage (3)
  44. Implementation of service configuration center with spring cloud + Nacos (Hoxton version)
  45. SCIP: constructing data abstraction -- Explanation of queue and tree in data structure
  46. SCIP: abstraction of construction process -- object oriented explanation
  47. Using docker to build elasticsearch + kibana cluster
  48. What are the spring IOC features? I can't understand the source code!
  49. Spring cloud upgrade road - 2020.0. X - 3. Accesslog configuration of undertow
  50. 导致Oracle性能抖动的参数提醒
  51. 风险提醒之Oracle RAC高可用失效
  52. 小机上运行Oracle需要注意的进程调度bug
  53. Oracle内存过度消耗风险提醒
  54. Oracle SQL monitor
  55. 使用Bifrost实现Mysql的数据同步
  56. 揭秘Oracle数据库truncate原理
  57. 看了此文,Oracle SQL优化文章不必再看!
  58. Mybatis (3) map and fuzzy query expansion
  59. Kafka性能篇:为何这么“快”?
  60. 两个高频设计类面试题:如何设计HashMap和线程池