Why Data Movement Is the Core of Internet Layered Architecture
This article explains that the essence of internet layered architecture is the movement of data, detailing each layer—from client to service to database—how protocols and data formats shape the flow, and why encapsulation and reuse are key principles for evolving scalable systems.
21CTO Community Introduction: This article is authored by architect Shen Jian of 58.com. It is concise and aims to provide value.
The diagram above shows a typical Internet layered architecture:
Client layer : typically a browser or an app.
Site application layer : implements core business logic, fetches data from downstream services, and returns HTML or JSON upstream.
Data‑cache layer : accelerates data access.
Data‑database layer : persists data.
If the system is service‑oriented, an additional service layer appears between the application and data layers:
Within the same tier, such as an app or a web server, the classic MVC separation also applies:
View layer : presentation.
Control layer : business logic.
Model layer : data representation.
Every engineer implicitly implements this layered architecture. The essence of the Internet layered architecture is a three‑step process: data movement , then processing , and finally presentation . Data movement is the core of the entire flow.
Data processing and presentation require CPU computation, and the CPU is fixed:
Databases, services, and web servers run on fixed clusters.
Clients (browsers or apps) also have fixed CPUs.
Thus, data is the moving part:
Cross‑process movement : data travels from database/cache → service layer → web‑server layer → client layer.
In‑process movement : data moves from model → control → view.
Because data moves, two aspects are crucial:
Data transmission format (protocol).
Data shape at each layer.
Transmission formats include binary or text protocols between service and DB/cache, RPC binary protocols between web‑server and service, and HTTP between client and web‑server.
Considering user data as an example, its shape evolves through the layers:
In the DB layer, data exists as rows (uid, name, age).
In the cache layer, data is stored as key‑value pairs (uid → User).
The service layer converts rows or KV pairs into a program‑friendly User object.
The web‑server layer transforms the User object into a JSON object suitable for HTTP.
The client finally receives the JSON object.
Conclusion: The essence of Internet layered architecture is data movement.
Understanding this principle and the associated encapsulation and reuse methods helps answer common questions such as when to introduce a DAO layer, when to adopt service‑orientation, when to extract a common middle‑platform, and when to separate front‑end and back‑end.
Further details on architecture evolution will be explored in the next article.
Summary
The core of Internet layered architecture is data movement.
Transmission protocols and data shapes at each layer are critical.
Evolution principles focus on encapsulation and reuse.
Think: Which system’s architecture does not follow “fixed CPU, moving data” but instead “fixed data, moving CPU”?
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
