当前位置:网站首页>Brief request process
Brief request process
2022-06-13 10:32:00 【edui】
Let's talk about the process of a request responding from the browser to the server
1. First, there is a domain name corresponding to the local query ip, Can't find anything like DNS The server requests to find the corresponding IP, Can't find the upper layer … The root domain name server cannot be found and an error is reported , Any section found will return ip
2. If you use tcp The protocol needs three handshakes to communicate with the server ( Customer requests confirmation , Server confirmation , Customer service confirms receipt of confirmation ), Received reply retransmission, etc , If you use UDP The protocol does not require a connection and a reply to send directly .
3. send out http request , The server obtains the parsing encapsulation request information and distributes it to the corresponding processing return results .
4. Four waves ( Customer requests disconnection , Server received , Server notification shutdown , Customer confirms receipt of closing confirmation ) Wait for the operation
**ps:** The essence of computer communication is the communication between processes , A computer is a ip Address , The corresponding port number is the process corresponding to the agreed port in the computer , It is the network interface between the transport layer and the application layer . such as tomcat Engagement listening 8080 port , A message through ip After arriving at the server, the port number is resolved as 8080 And then handle it. Otherwise, it will not be accepted .
tomcat Process request
connector Accept the request, encapsulate it and pass it to container To deal with ,container Call the corresponding servlet Processing requests ,dispatcherServlet It's just one. servlet, Handle all requests ,dispatcherServlet After receiving the request, process the mapper HandleMapper Look for the corresponding Handle, The corresponding... Is then executed through the processor adapter area Handle That's the controller , Then the execution result returns modelAndView, then dsipatchServlet Will pass through modelAndView To parse the rendered view and return it to the user .
Here's the picture , Just keep the picture in mind .
Tell me about your understanding of containers
Containers like tomcat The container is just a web The container is servlet Containers , The container is easy to be compared to the bucket , It's just something that looks easy to understand , such as Spring The container says that it is a container for all classes , On a deeper level , It doesn't have to be filled like a barrel , The reason why barreled water is easy to understand is that we can intuitively see that the water is packed in a visual range , go back to Spring Wait for these containers , Pretend to be a class , such as tomcat It's just servlet In fact, it is not filled like a barrel , It means management , such as tomcat Will be called upon request servlet The method of managing the life cycle of processing requests . image Spring The life cycle of container management classes is based on bean Find the corresponding class and call the corresponding function, such as initialization , Containers are like middlemen … Responsible for the management and allocation of relevant resources …
边栏推荐
- 2022年劳务员-通用基础(劳务员)上岗证题目及答案
- [image denoising] image denoising based on MATLAB Gaussian + mean + median + bilateral filtering [including Matlab source code 1872]
- Vivo large scale kubernetes cluster automation operation and maintenance practice
- string类对象的修改操作
- C 11 more practical NAMEOF
- Initial installation and use of redis [play with Huawei cloud]
- deepin系统中Qt5.12无法输入中文(无法切换中文输入法)解决办法
- 2022年劳务员-通用基础(劳务员)上岗证题目及答案
- 【云享新鲜】社区周刊·Vol.66-华为伙伴暨开发者大会2022精彩议程公布
- d求值两次map
猜你喜欢

MySQL利用E-R模型的数据库概念设计

记几次略有意思的 XSS 漏洞发现

ThingsBoard教程(二十):使用规则链过滤遥测数据

C# Oracle 多表查询

Node red series (27): instructions for S7 node of the extension node

Advanced technology management - what management tools can managers use

ASCII码值是怎么计算的,怎么计算arccos的值

逐向双碳:东数西算中的绿色需求与竞争焦点

C# 11 更加实用的 nameof

Write pytoch model in five minutes
随机推荐
Knowledge points of silicon steel sheet
计算循环冗余码--摘录
string类对象的修改操作
检验冗余码是否出错题型解法-摘录
flutter简单优秀的开源dialog使用free_dialog
Computing cyclic redundancy codes -- excerpts
Cynthia項目缺陷管理系統
Spark source code (I) how spark submit submits jars and configuration parameters to spark server
Weekend book: power BI data visualization practice
Node red series (27): instructions for S7 node of the extension node
Test cases that testers must master
Modification of string class object
June training (day 13) - two way linked list
23. Lottery
2022年尾矿复训题库及模拟考试
全栈开发实战|SSM框架整合开发
虚拟机内存结构简述
Leetcode (question 15) - sum of three numbers
Go path package
周末赠书:Power BI数据可视化实战