Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the nature of the hierarchical architecture of the Internet

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the essence of the layered architecture of the Internet". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's study and learn "what is the essence of the layered architecture of the Internet"!

The figure shows a typical hierarchical architecture of the Internet:

Client layer: typical caller is browser or APP

Site application layer: implement core business logic, get data from downstream, and return html or json to upstream

Data-cache layer: accelerating access to Stora

Data-database layer: solidifying data storage

If services are implemented, the hierarchical architecture diagram might look like this:

There is a service layer in the middle.

Internal layers of the same level, such as APP on the end, and web-server, also have MVC layering:

View layer: presentation

Control layer: logic

Model layer: data

It can be seen that every engineer is imperceptibly implementing a hierarchical structure.

So what is the nature of the hierarchical architecture of the Internet?

If we think carefully, we will find that whether it is a hierarchical architecture across processes, or MVC layering within a process, it is a process of "data movement", and then "processed" and "presented". In the final analysis, Internet hierarchical architecture is a process of data movement, processing and presentation, in which data movement is the core of the whole process.

As shown in the figure above, data processing and rendering are calculated by CPU, and CPU is fixed:

Db/service/web-server is deployed on a fixed cluster.

On the end, whether it is browser or APP, there is also a fixed CPU processing.

The data is mobile:

Cross-process movement: data is transferred from the database and cache to the service tier, to the web-server tier, to the client tier

Simultaneous movement: data is transferred from the model tier to the control tier and to the view tier

The data has to move, so there are two things that are important:

Format of data transmission

The shape of data at all levels

Let's first look at the format of data transmission, that is, the protocol is very important:

Between service and db/cache, binary protocol / text protocol is the carrier of data transmission.

The binary protocol of RPC is the carrier of data transmission between web-server and service.

Between client and web-server, http protocol is the carrier of data transmission.

Let's look at the shape of data at all levels, taking user data as an example:

Db layer, data is the row (uid, name, age) that exists in "rows"

Cache layer, data is kv in the form of kv (uid-> User)

The service layer, which converts row or kv into program-friendly User objects

The web-server layer, which converts program-friendly User objects into http-friendly json objects

Client layer: finally get the json object on the end

Conclusion: the essence of Internet hierarchical architecture is the movement of data.

Why do you say this? it will lead to the core principles and methods of "hierarchical architecture evolution":

Let the upstream obtain and process data more efficiently and reuse

Enable downstream to mask the details of data acquisition and encapsulation

With the above groundwork, water lovers often ask these questions:

Whether it is necessary to introduce DAO layer and when to introduce it

Does it need to be service-oriented? when is the service-oriented?

Whether it is necessary to extract general mid-Taiwan business, and when to extract it

Whether the front and rear ends need to be separated, and when to separate?

It's very easy to answer. I'll look into it with you in the next issue.

Voiceover: these questions from netizens are actually very difficult to answer. It is irresponsible to jump to the conclusion of YES or NO without knowing the stage of business development, the scale of the business, and the amount of data concurrently.

Thank you for your reading. the above is the content of "what is the essence of the layered Architecture of the Internet". After the study of this article, I believe you have a deeper understanding of the nature of the layered architecture of the Internet. the specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report