C++ Message Queuing Library and Framework
Go to file
2018-08-09 16:15:15 +02:00
cmake Add ThreadSan/AddressSan build types and print table 2018-07-27 17:09:52 +02:00
docs add privacy info link to doxygen 2018-05-24 16:06:28 +02:00
examples Add getter for cmd line args & align channel names in log 2018-06-06 16:04:08 +02:00
fairmq Update clang-format 2018-08-09 16:15:15 +02:00
test Simplify structure in DeviceRunner and plugin classes 2018-08-08 16:13:41 +02:00
.clang-format Update clang-format 2018-08-09 16:15:15 +02:00
.gitignore Refactor the examples after move from FairRoot 2018-05-02 16:12:57 +02:00
AUTHORS Update README 2018-04-10 18:52:57 +02:00
CMakeLists.txt Add hint how to change build type and change color of selected type 2018-08-09 16:15:15 +02:00
CONTRIBUTORS Add Matthias as CONTRIBUTOR 2018-06-19 14:08:32 +02:00
COPYRIGHT Add Copyright statement in separate file instead of README 2018-07-27 16:21:24 +02:00
CTestConfig.cmake Add CI jobs 2018-05-02 13:49:36 +02:00
Dart.sh Add codecov reports to PRs 2018-07-20 17:21:23 +02:00
FairMQTest.cmake Add codecov reports to PRs 2018-07-20 17:21:23 +02:00
Jenkinsfile Add codecov reports to PRs 2018-07-20 17:21:23 +02:00
Jenkinsfile.nightly Modify target CI environment 2018-05-17 16:32:49 +02:00
LICENSE Help github detect our license 2018-04-23 16:47:50 +02:00
PULL_REQUEST_TEMPLATE.md Add PR template 2018-05-22 16:33:13 +02:00
README.md Align with repo subtitle on github 2018-07-27 16:21:24 +02:00

FairMQ license

C++ Message Queuing Library and Framework

Branch Version Docs Status
master release API, Book build status master branch test coverage master branch
dev dev tag Book build status dev branch test coverage dev branch

Introduction

FairMQ is designed to help implementing large-scale data processing workflows needed in next-generation Particle Physics experiments. FairMQ is written in C++ and aims to

  • provide an asynchronous message passing abstraction of different data transport technologies,
  • provide a reasonably efficient data transport service (zero-copy, high throughput),
  • be data format agnostic, and
  • provide basic building blocks that can be used to implement higher level data processing workflows.

The core of FairMQ provides an abstract asynchronous message passing API with scalability protocols inspired by ZeroMQ (e.g. PUSH/PULL, PUB/SUB). FairMQ provides multiple implementations for its API (so-called "transports", e.g. zeromq, shmem, nanomsg, and ofi (in development)) to cover a variety of use cases (e.g. inter-thread, inter-process, inter-node communication) and machines (e.g. Ethernet, Infiniband). In addition to this core functionality FairMQ provides a framework for creating "devices" - actors which are communicating through message passing. FairMQ does not only allow the user to use different transport but also to mix them; i.e: A Device can communicate using different transport on different channels at the same time. Device execution is modelled as a simple state machine that shapes the integration points for the user task. Devices also incorporate a plugin system for runtime configuration and control. Next to the provided devices and plugins (e.g. DDS) the user can extend FairMQ by developing his own plugins to integrate his devices with external configuration and control services.

FairMQ has been developed in the context of its mother project FairRoot - a simulation, reconstruction and analysis framework.

Find all FairMQ releases and development tags here.

Dependencies

Supported platforms: Linux and MacOS.

Installation from Source

git clone https://github.com/FairRootGroup/FairMQ fairmq
mkdir fairmq_build && cd fairmq_build
cmake -DCMAKE_INSTALL_PREFIX=./fairmq_install ../fairmq
cmake --build . --target install

If dependencies are not installed in standard system directories, you can hint the installation location via -DCMAKE_PREFIX_PATH=... or per dependency via -D{DEPENDENCY}_ROOT=.... {DEPENDENCY} can be GTEST, BOOST, FAIRLOGGER, ZEROMQ, MSGPACK, NANOMSG, OFI, PROTOBUF, or DDS (*_ROOT variables can also be environment variables).

Usage

FairMQ ships as a CMake package, so in your CMakeLists.txt you can discover it like this:

find_package(FairMQ)

If FairMQ is not installed in system directories, you can hint the installation:

set(CMAKE_PREFIX_PATH /path/to/FairMQ_install_prefix ${CMAKE_PREFIX_PATH})
find_package(FairMQ)

find_package(FairMQ) will define an imported target FairMQ::FairMQ.

In order to succesfully compile and link against the FairMQ::FairMQ target, you need to discover its public package dependencies, too.

find_package(FairMQ)
if(FairMQ_FOUND)
  find_package(FairLogger ${FairMQ_FairLogger_VERSION})
  find_package(Boost ${FairMQ_Boost_VERSION} COMPONENTS ${FairMQ_BOOST_COMPONENTS})
endif()

Of course, feel free to customize the above commands to your needs.

Optionally, you can require certain FairMQ package components and a minimum version:

find_package(FairMQ 1.1.0 COMPONENTS nanomsg_transport dds_plugin)
if(FairMQ_FOUND)
  find_package(FairLogger ${FairMQ_FairLogger_VERSION})
  find_package(Boost ${FairMQ_Boost_VERSION} COMPONENTS ${FairMQ_BOOST_COMPONENTS})
endif()

When building FairMQ, CMake will print a summary table of all available package components.

CMake options

On command line:

  • -DDISABLE_COLOR=ON disables coloured console output.
  • -DBUILD_TESTING=OFF disables building of tests.
  • -DBUILD_EXAMPLES=OFF disables building of examples.
  • -DBUILD_NANOMSG_TRANSPORT=ON enables building of nanomsg transport.
  • -DBUILD_OFI_TRANSPORT=ON enables building of the experimental OFI transport.
  • -DBUILD_DDS_PLUGIN=ON enables building of the DDS plugin.
  • -DBUILD_DOCS=ON enables building of API docs.
  • You can hint non-system installations for dependent packages, see the #Installation section above

After the find_package(FairMQ) call the following CMake variables are defined:

Variable Info
${FairMQ_PACKAGE_DEPENDENCIES} the list of public package dependencies
${FairMQ_Boost_VERSION} the minimum Boost version FairMQ requires
${FairMQ_Boost_COMPONENTS} the list of Boost components FairMQ depends on
${FairMQ_FairLogger_VERSION} the minimum FairLogger version FairMQ requires
${FairMQ_PACKAGE_COMPONENTS} the list of components FairMQ consists of
${FairMQ_#COMPONENT#_FOUND} TRUE if this component was built
${FairMQ_VERSION} the version in format MAJOR.MINOR.PATCH
${FairMQ_GIT_VERSION} the version in the format returned by git describe --tags --dirty --match "v*"
${FairMQ_ROOT} the actual installation prefix, notice the difference to the hint variable FAIRMQ_ROOT
${FairMQ_BINDIR} the installation bin directory
${FairMQ_INCDIR} the installation include directory
${FairMQ_LIBDIR} the installation lib directory
${FairMQ_DATADIR} the installation data directory (../share/fairmq)
${FairMQ_CMAKEMODDIR} the installation directory of shipped CMake find modules
${FairMQ_CXX_STANDARD_REQUIRED} the value of CMAKE_CXX_STANDARD_REQUIRED at built-time
${FairMQ_CXX_STANDARD} the value of CMAKE_CXX_STANDARD at built-time
${FairMQ_CXX_EXTENSIONS} the values of CMAKE_CXX_EXTENSIONS at built-time

Documentation

  1. Device
    1. Topology
    2. Communication Patterns
    3. State Machine
    4. Multiple devices in the same process
  2. Transport Interface
    1. Message
      1. Ownership
    2. Channel
    3. Poller
  3. Configuration
    1. Device Configuration
    2. Communication Channels Configuration
      1. JSON Parser
      2. SuboptParser
    3. Introspection
  4. Development
    1. Testing
  5. Logging
    1. Log severity
    2. Log verbosity
    3. Color for console output
    4. File output
    5. Custom sinks
  6. Examples