Isn’t multi-threading used to handle high concurrency? This will increase the processing speed, otherwise single-threaded processing will last for many years and months
Cluster and pipeline modes. Cluster mode is suitable for tasks that are difficult to split, but there is no correlation between tasks, such as zip files, and there is no correlation between multiple files, then I can open four or five Threads zip different files. Pipeline mode is suitable for those tasks whose sequence can be split. It extracts time-consuming operations and processes them with threads. Using the example of the zip file, one thread is used to control the zip task. Distribution, multiple threads go to zip, and after the zip is completed, it is handed over to another thread. This complete task is split into three stages. This mode is pipeline.
Your business needs to flexibly use these two basic design patterns
Isn’t multi-threading used to handle high concurrency? This will increase the processing speed, otherwise single-threaded processing will last for many years and months
Cluster and pipeline modes.
Cluster mode is suitable for tasks that are difficult to split, but there is no correlation between tasks, such as zip files, and there is no correlation between multiple files, then I can open four or five Threads zip different files.
Pipeline mode is suitable for those tasks whose sequence can be split. It extracts time-consuming operations and processes them with threads. Using the example of the zip file, one thread is used to control the zip task. Distribution, multiple threads go to zip, and after the zip is completed, it is handed over to another thread. This complete task is split into three stages. This mode is pipeline.
Your business needs to flexibly use these two basic design patterns