finalMQ - Performance
In this article, I will show the throughput of asynchronous request/reply messages of two C++ communication frameworks:
finalMQ supports several protocols and data encodings, but for the comparison, I chose the Protobuf encoding, Also gRPC uses Protobuf.
Environment
The tests have been done on an Ubuntu 18.04 LTS system inside a virtual machine on a Windows 10 host (Intel Core I7-7500U).
Messages
On both frameworks the messages of the helloworld example (finalmq) were used with the request data of one person.
HelloRequest{{ {"Bonnie","Parker",Sex::FEMALE,1910,{"somestreet", 12,76875,"Rowena","USA"}} }}
Test
The clients fire 100000 requests in a for-loop and wait for 100000 replies. The time was measured from the first sent request till the last reply was received. The communication effort consists of serialization/deserialization of the data and the transfer of the serialized messages. The server process and the client process are on the same network node. The tests have been done with two kind of sockets:
Calculation
The tests have been done several times and an average duration was used for the throughput calculation. The throughput is calculated with: throughput = 100000 / average duration. So, the throughput is a value that tells how many request/reply messages can be processed per second.
Result
Unix Domain Socket
gRPC: 53000 msg per second
Recommended by LinkedIn
finalMQ: 74000 msg per second
TCP Socket
gRPC: 49000 msg per second
finalMQ: 60000 msg per second
Conclusion
Both frameworks have a very high message throughput. FinalMQ is a little bit better.
When you decide for finalMQ, then you will get a very high performance on your message communication.
Advantages of finalMQ
Is the client and server on the same Ubuntu VM?