$>./ RaftLib

Simple, easy to use stream parallel computation library for C++.

Download as .zip Download as .tar.gz View on GitHub

CI Build Status

Build Status

Spread the Word

Welcome to the Raft C++ Stream Processing Template Library

What is it?

Stream processing is a method for extracting data, task, and pipeline parallelism from an application. Ever wash dishes with more than one person, one washer, one dryer, and perhaps one person to put them away? That's pipeline parallelism. Raft lets you do that for your application. How about add two washers, three? You can do this as well. That's data parallelism, you're operating on differing (independent) dishes at the same time. Going further, the Raft library enables task parallelism. That is, if you have four people on the dishes, you can add somebody on the side, taking inventory of the dishes as the pass by, at the same time the dishes are being washed. The inventory task is independent of the other two (which is slightly more nuanced since we've to spot the dishes as they go by). The Raft library uses templates, and a compiled library, to make the otherwise perilous task of creating parallel programs far easier. Please check it out, and if you have any questions, please feel free to send the project developers an email.

Concurrent Hello World:


Project Status:

The Raft library is currently an alpha release, nearing its first beta. The API itself is relatively stable, however the back end is subject to updates if needed (although we're taking pains to support needed old features). This software is subject to the Apache Version 2.0 license. The main-line branch is also the development branch. As new code is checked in, it is processed through two continuous integration services, the build status icon (at top of page) reflects the current Linux build and testsuite success. You can add features, bug fixes, and in general any code you'd like that you think is useful for RaftLib to have to the main line through pull requests. There are several releases, at this stage of the project, snapshots for releases are taken before major changes. We plan on moving to a full beta release once the multi-node support is pulled from the research code and re-integrated with the mainline branch (at the current rate of development, that should be mid-July 2016).


To checkout the library and build RaftLib (along with all examples) do the following:

$ cd location_for_the_repo
$ git clone git@github.com:jonathan-beard/RaftLib.git
$ mkdir build
$ cd build
$ cmake ../RaftLib
$ make & make test
$ sudo make install

Additionally, if you would like to build the OpenCV example, add


to your cmake invocation, you will need a webcam or video source for it to work.

If you're running Linux and want more advanced application partitioning, you can use the Scotch partitioning library (assuming it's installed) by adding


If you don't have boost installed, the cmake invocation will download the needed Boost headers (this works well for the initial build, however it is recommended that you install boost if you intend to build many RaftLib applications outside of the build directory. The make command will generate the static library file libraft.a, as well as test cases and all the example applications. These examples can be found in:

$ cd build/examples

To install the library to your system (in the default prefix), simply run

sudo make install

How to build apps and use RaftLib

When building an application using the library the only header file needed is the raft header (see wiki for details), and you must link with the raft library file created during the compilation phase above. Many more details can be found in the following references (we'll endeavor to keep these up to date, but please feel free to contribute to the wiki or point out errors on our part):


The main source of documentation is available on the RaftLib wiki page

If you see errors, or want to contribute please feel free to do so.

Authors and Contributors

In 2013 Jonathan Beard (@jonathan-beard, also Follow @jonathan_beard ) started work on the Raft language. In the interim, and realizing the ubiquity of the C++ language, he started work on a template library that uses the same framework as the full Raft language and run-time system. This C++ library is the result. Since then many have contributed to the theory and code base behind RaftLib (most notable is my co-author (@pl53), for a full current contribution list see the GitHub stats page. Special thanks to @adishavit for the many helpful suggestions, and discussion.

Citing the Raft Library

Please cite as:

  author = {Beard, Jonathan C. and Li, Peng and Chamberlain, Roger D.},
  title = {RaftLib: A {C++} Template Library for High Performance Stream Parallel Processing},
  publisher = {ACM},
  address = {New York, NY, USA},
  year = {2015},
  month = feb,
  series = {PMAM 2015},
  booktitle = {Proceedings of Programming Models and Applications on Multicores and Manycores},
  pages = {96-105}


There have been several dozen streaming languages. Most notable of which is probably StreaMIT. I've worked on the Auto-Pipe streaming runtime system (both versions 1 and 2) developed at Washington University in St. Louis. This particular streaming library was developed as a faster way to get started with stream processing by enabling users to stick to a language with which they are already familiar (C++).


Issues can be opened by filing a report on our issues page