H
H
hydra_132019-01-11 16:12:31
Qt
hydra_13, 2019-01-11 16:12:31

Optimization of highly loaded applications. C++. What literature would you recommend for reading?

Actually, there is the following situation
5c3893e4b2610723584122.png
From the various stages of processing, data is received by the flow manager - it has a global heap of input data.
During the start of processing, N streams of data parsing and the formation of batches of requests are created. Each thread, if it has processed the data it has, requests a new batch from the thread manager. That, in turn, throws off the entire available heap of input data to the requesting thread. When a certain amount of data is accumulated, or when there is idle time without input data, the thread starts the procedure of sending prepared batches of queries to the database.
Now it works, it was done through trial and error. I want to know how it can be optimized and where you can read about it.
Thank you in advance!
ZY: if someone shares their experience in creating such systems, I will be very grateful! ;)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ighor July, 2019-01-11
@IGHOR

If the requests are of the same type, then it is better to make a request accumulation buffer and combine them into one request. And according to the result, who asked what to distribute.
Fewer requests is always better.
Yes, and you need to clarify how you connect to the database itself? And does the connection library support simultaneous requests within the instance, does it support parallel simultaneous processing of requests from different threads, or does all requests go through one connection or are blocked by mutexes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question