Asynchronous Messaging - laforge49/Asynchronous-Functional-Programming GitHub Wiki
The code for asynchronous messaging is pretty straight forward, though it was designed to support the enhancements needed to achieve high-performance rather than readability.
Benchmarks were done with an Intel Core 2 Duo T6400 @ 2GHz. The timings are reported here as a base measure to show the effectiveness of the enhancements made to achieve high-performance. The first benchmark is a series of messages and response messages, where the next message is not sent until a response is received, e.g. an echo test. Each message took about 816 nanoseconds to process: EchoTimingTest.
In the second benchmark, a burst of messages are sent, and a response is sent for each message. The next burst is not sent until all the responses to the current burst have been received. In this case, each message took about 148 nanoseconds to process: BurstTimingTest.
###Modules
- MessengerThreadFactory
- MessengerThreadManager
- ConcurrentLinkedBlockingQueue
- MessageProcessor
- Messenger