stand-alone chat server
Disadvantages :
Due to limited hardware resources, the concurrent users that the server can bear are not large enough;
Any module modification will cause the entire project code to be recompiled and deployed ;
In the system, some modules are CPU- intensive and some are IO- intensive, resulting in different requirements for hardware resources of each module.
cluster chat server
Advantages : Increased user concurrency and easy deployment
Disadvantages : Modifying the module project code still requires recompilation , and multiple compilations are required
For example, background management does not require high concurrency, so it does not need to be deployed on every machine
distributed
A project is divided into many modules . Each module is independently deployed and runs on a server host. All servers work together to provide services. Each server is called a distributed node . According to the concurrency requirements of nodes, a node can Then do node module cluster deployment, for example, the distributed node 1 in the figure below can deploy distributed nodes 1-1, distributed nodes 1-2, ...
question
How to divide the software modules of a large system? Modules may implement a large amount of repetitive code
Each module runs in a different process (such as docker
in a virtualized environment), how to access each module?
How does the module on machine 1 call a business method of the module on machine 2?
How does a module process 1 on machine 1 call a business method in module process 2 on machine 1?