The following are excerpted examples:
“Every time a function is declared, it generates a closure field (which can be interpreted as each function has its own function stack)”
“The seven-layer load balancing works in the application layer of the OSI model, because it needs to analyze the application layer traffic, so the seven-layer load balancing needs a complete TCP/IP protocol stack after receiving the traffic from the client.”
When I read some technical articles, I am often confused by these words. I also ask my senior brothers to help me popularize science.
The various stacks mentioned in these articles should not refer to the stacks in the data structure and the stack memory in the computer memory, but also a last-in, first-out, right?
Explain one by one.
TCP/IP protocol stack refers to the four-layer protocol stack in TCP/IP, just like the OSI seven-layer model in computer network courses. For details, please refer to Baidu.
Technology stack refers to a series of technical systems (a collection of technical products in the programming field) used in a project. For example, Baidu uses more LNMP, Sina Weibo uses more php, redis and other technologies, and Taobao uses more JAVA and other technologies.
Function stack refers to calling various modules step by step from the main function, and other dependent modules are called in various modules, layer by layer nested calling, and finally returning to the main function layer by layer after calling. if the execution flow is represented by graphics, it is very similar to the stack structure in the data structure.
These three stacks all have different meanings. It is suggested to consult Xinhua dictionary for more details.