Hello.
Given:
- have a fat client. Containing a bit of business logic, which he would not know.
- There is a database with an "interface" in the form of stored procedures that implement a lot of business logic. There is an interface for the client and an interface for the server.
- There is a server that does not perform server functions in the full sense, but performs some of the functions that cannot be performed by stored procedures. There is an interface for the client.
The thick client, respectively, interacts directly with the database (in terms of data manipulation) and with the non-server (in terms of obtaining functions implemented there). The underserver also interacts with the database for data manipulation and with the client (one of the options for interacting with the client is the subscriber publisher).
Task:
It is necessary to implement new functions of the system. This can be done in several ways, and the estimate in hours in both cases is approximately equal.
- Implement everything new in the stored procedures on the database side and some functions on the client side, do not touch the server
- Implement everything new on the server side, slightly touching both the stored procedures (in terms of increasing the data presentation options) and the client (in terms of displaying new functions).
Problem
My intuitive “better” says that it is right to move in the direction of the classic three-link, respectively, without loading the client and the database with new functions, but loading the server. And if possible, if the clock will allow, then unload the database and the client from the business logic that they do not need. But even if this cannot be done, it is still better to move in that direction.
The lobby of aggressive basist-oraklisto-msskuelnikov believes that everything must be done first option.
And here comes the argument. What are the pros and cons of these options? Than three-star is better, and the worse the client-base interaction? Maybe my instinct fails me?
Arguments I Found
- security. Three-link will allow theoretically in general to block access to the database from the client machine, thus securing this database. Client-base is not.
- scalability. In the case of an increase in the number of databases or servers, a client who does not have a direct connection with the data may be unaware of their device and organization. The maximum that he will need to know is the addresses of other servers. There is no client-base, and there you have to either seriously finish the client's logic, or form db-links and finish the logic of the "correct" database, forming the hierarchy of the database.
- performance. Scalability allows you to significantly affect performance.
Something else? Or something written - sucked from the finger? Thank you in advance.
Update
The server was needed because there is a network of information collectors, the accumulation of data from which it is reasonable to do on the server. Then this information should get into the database, and if there is a subscription from the client for some information, the client should be notified of its receipt. The fact that we are wise - yes, and this is obvious. The fact that, in theory, the server should carry the business logic - yes, but why?
Update 2
Business logic from a client can be transferred not to a server, but to stored procedures. Now my colleague suggested that requests to the database with JOINs can increase the load exponentially, and one request to the database with the 3rd join can cost more in time and workload than 3 requests to the database and management unloaded on the server side in the RAM.