With the complexity of various application systems and the increasing types of user terminals, traditional C/S systems are facing more and more problems and challenges. Let's take a look at
Architecture diagram:
The client system generally connects to the database through the database client, and then accesses the database server through SQL statements. The database returns data based on client requests, in a simple system
This method is basically no problem, and it is easy to develop. However, this structure faces the following problems:
1. Generally, business logic is built on the client. When a system is developed in different languages, the same business logic must be written in each language, resulting in repeated development, wasting manpower and material resources;
At the same time, because the business logic creates a client, every time the logic changes, the client needs to be upgraded. When the number of clients exceeds thousands, the cost of such updates will be very high.
2. Generally, after the C/S client establishes a connection with the database, it is maintained, that is, it is stateful. In this way, when the client is very large, it means no database operation is performed.
Maintaining these connections puts a lot of pressure on the machine, and even consumes system resources.
3. because the C/S system is directly connected to the back-end database server, the client is basically trusted for the back-end server, which has very large security vulnerabilities, especially when the client
For the public, attackers can forge SQL commands on the client to access the server, resulting in database information leakage and loss.
4. When the background database server changes, for example, from Ms sqlserver to Oracle, the client must undergo a very large transformation.
5. For some of the latest devices, such as Android, IOS, and WMP devices, the database client cannot be installed and cannot be developed in this way;
Based on the above issues, when the system becomes more complex, we have to use multi-layer development to solve these problems. Let's first look at the multi-layer development architecture diagram: