PDA

View Full Version : Multithreaded Fortune Server Qt Example program



Mike_m
28th July 2017, 08:10
Qt software has three example programs FortuneServer, FortuneClient and MultithreadedFortuneServer.

These Server and Client programs use TCP/IP protocol to communicate with each other.

12530

Muliple instances of FortuneClient can be run against the FortuneServer or MultithreadedServer programs as shown on the above screen capture.

I have a computer with one CPU. But this CPU has 4 cores.

My question is:
Can this multithreaded Fortune Server example program respond to many, many more number of simultaneously running Fortune Client programs than the non-threaded Fortune Server?

If yes, how can I prove (i.e. test) how many more client queries, threaded Fortune Server can respond to versus non-threaded Fortune server example program can respond to, without this fortune server program becoming very, very slow in giving response to client program?

Can I use QT Test class to test this fortune server and/or fortune client and draw a fortune server response duration versus number of clients graph?

Any Qt example program that already exists to compute this kind of performance data please?

Or any high level steps or Qt/C++ code please?

Thanks