Wednesday, November 23, 2011

FastFlow - the new multithreading framework with Atomic Queues

For the solution of achieving high frequency trading, lock free queues can help to increase the message transfer speed between threads while reduce the performance jitter as well. 

While we talks about so-called lock free mechanisms, Atomic Queue should be the first choice we considered.
However please note that Atomic operation is not really lock-free otherwise there is no data safety between threads. Atomic operation achieves lock and unlock functionality by using CPU kernel's feature that it will only process a word size memory at a time, which is exactly the size of integer.  

there are many sample atomic queues implementation in the www. we found that FastFlow is the best one which can provide directly the atomic queues as well as multi-threading framework which can help to enforce the proper software architecture design. 

the better part is that FastFlow is free to use and open sourced project, which will be actively maintained and tested by a group of users.
FastFlow architecture design

FastFlow Features

for more details, you can go to its sourceforge page:


  1. So is this a fastflow software that you have to get? It sounds like it would help speed some processes up. I think I've heard that hospitals also use softwares like this.

  2. the fastflow I mentioned is not the one for hospital softwares.

    it is a framework for multi-threading programming in c++ with embedded communication queues like atomic SPSC queue.

    We currently use its high performance atomic queues to reduce our system latencies.