FairMQ/v1.3.9/index.html
2019-08-07 18:00:46 +02:00

215 lines
17 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FairMQ: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">FairMQ
&#160;<span id="projectnumber">1.3.9</span>
</div>
<div id="projectbrief">C++ Message Passing Framework</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">FairMQ Documentation</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1>FairMQ [<object type="image/svg+xml" data="https://alfa-ci.gsi.de/shields/badge/license-LGPL--3.0-orange.svg" alt="license"></object>
/>
](COPYRIGHT) <a href="https://alfa-ci.gsi.de/blue/organizations/jenkins/FairRootGroup%2FFairMQ/branches"><img src="https://alfa-ci.gsi.de/buildStatus/icon?job=FairRootGroup/FairMQ/master" alt="build status" class="inline"/>
</a> <a href="https://codecov.io/gh/FairRootGroup/FairMQ/branch/master"><object type="image/svg+xml" data="https://codecov.io/gh/FairRootGroup/FairMQ/branch/master/graph/badge.svg" alt="test coverage master branch"></object>
/>
</a> <a href="https://scan.coverity.com/projects/fairrootgroup-fairmq"><object type="image/svg+xml" data="https://alfa-ci.gsi.de/shields/coverity/scan/fairrootgroup-fairmq.svg" alt="Coverity Badge"></object>
/>
</a> <a href="https://www.codacy.com/app/dennisklein/FairMQ?utm_source=github.com&amp;amp;utm_medium=referral&amp;amp;utm_content=FairRootGroup/FairMQ&amp;amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/6b648d95d68d4c4eae833b84f84d299c" alt="Codacy Badge" class="inline"/>
</a></h1>
<p>C++ Message Queuing Library and Framework</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadCenter">Release </th><th class="markdownTableHeadLeft">Version </th><th class="markdownTableHeadLeft">Docs </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyCenter"><code>stable</code> </td><td class="markdownTableBodyLeft"><a href="https://github.com/FairRootGroup/FairMQ/releases/latest"><object type="image/svg+xml" data="https://alfa-ci.gsi.de/shields/github/release/FairRootGroup/FairMQ.svg" alt="release"></object>
/>
</a> </td><td class="markdownTableBodyLeft"><a href="https://fairrootgroup.github.io/FairMQ/latest">API</a>, <a href="https://github.com/FairRootGroup/FairMQ/blob/master/README.md#documentation">Book</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyCenter"><code>testing</code> </td><td class="markdownTableBodyLeft"><a href="https://github.com/FairRootGroup/FairMQ/tags"><object type="image/svg+xml" data="https://alfa-ci.gsi.de/shields/github/tag/FairRootGroup/FairMQ.svg" alt="dev tag"></object>
/>
</a> </td><td class="markdownTableBodyLeft"><a href="https://github.com/FairRootGroup/FairMQ/blob/dev/README.md#documentation">Book</a> </td></tr>
</table>
<p>Find all FairMQ releases <a href="https://github.com/FairRootGroup/FairMQ/releases">here</a>.</p>
<h2>Introduction</h2>
<p>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</p><ul>
<li>provide <b>an asynchronous message passing abstraction</b> of different data transport technologies,</li>
<li>provide a reasonably <b>efficient data transport</b> service (zero-copy, high throughput),</li>
<li>be <b>data format agnostic</b>, and</li>
<li>provide <b>basic building blocks</b> that can be used to implement higher level data processing workflows.</li>
</ul>
<p>The core of FairMQ provides an abstract asynchronous message passing API with scalability protocols inspired by <a href="https://github.com/zeromq/libzmq">ZeroMQ</a> (e.g. PUSH/PULL, PUB/SUB). FairMQ provides multiple implementations for its API (so-called "transports", e.g. <code>zeromq</code>, <code>shmem</code>, <code>nanomsg</code>, and <code>ofi</code> (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. <a href="https://github.com/FairRootGroup/DDS">DDS</a>) the user can extend FairMQ by developing his own plugins to integrate his devices with external configuration and control services.</p>
<p>FairMQ has been developed in the context of its mother project <a href="https://github.com/FairRootGroup/FairRoot">FairRoot</a> - a simulation, reconstruction and analysis framework.</p>
<h2>Dependencies</h2>
<ul>
<li>PUBLIC: <a href="https://www.boost.org/"><b>Boost</b></a>, <a href="https://github.com/FairRootGroup/FairLogger"><b>FairLogger</b></a></li>
<li>BUILD: <a href="https://cmake.org/">CMake</a>, <a href="https://github.com/google/googletest">GTest</a>, <a href="http://www.doxygen.org/">Doxygen</a></li>
<li>PRIVATE: <a href="http://zeromq.org/">ZeroMQ</a>, <a href="https://msgpack.org/index.html">Msgpack</a>, <a href="http://nanomsg.org/">nanomsg</a>, <a href="https://ofiwg.github.io/libfabric/">OFI</a>, <a href="https://developers.google.com/protocol-buffers/">Protobuf</a>, <a href="http://dds.gsi.de">DDS</a></li>
</ul>
<p>Supported platforms: Linux and MacOS.</p>
<h2>Installation from Source</h2>
<div class="fragment"><div class="line">git clone https://github.com/FairRootGroup/FairMQ fairmq</div><div class="line">mkdir fairmq_build &amp;&amp; cd fairmq_build</div><div class="line">cmake -DCMAKE_INSTALL_PREFIX=./fairmq_install ../fairmq</div><div class="line">cmake --build . --target install</div></div><!-- fragment --><p>If dependencies are not installed in standard system directories, you can hint the installation location via <code>-DCMAKE_PREFIX_PATH=...</code> or per dependency via <code>-D{DEPENDENCY}_ROOT=...</code>. <code>{DEPENDENCY}</code> can be <code>GTEST</code>, <code>BOOST</code>, <code>FAIRLOGGER</code>, <code>ZEROMQ</code>, <code>MSGPACK</code>, <code>NANOMSG</code>, <code>OFI</code>, <code>PROTOBUF</code>, or <code>DDS</code> (<code>*_ROOT</code> variables can also be environment variables).</p>
<h2>Usage</h2>
<p>FairMQ ships as a CMake package, so in your <code>CMakeLists.txt</code> you can discover it like this:</p>
<div class="fragment"><div class="line">find_package(FairMQ)</div></div><!-- fragment --><p>If FairMQ is not installed in system directories, you can hint the installation:</p>
<div class="fragment"><div class="line">set(CMAKE_PREFIX_PATH /path/to/FairMQ_install_prefix ${CMAKE_PREFIX_PATH})</div><div class="line">find_package(FairMQ)</div></div><!-- fragment --><p><code>find_package(FairMQ)</code> will define an imported target <code>FairMQ::FairMQ</code>.</p>
<p>In order to succesfully compile and link against the <code>FairMQ::FairMQ</code> target, you need to discover its public package dependencies, too.</p>
<div class="fragment"><div class="line">find_package(FairMQ)</div><div class="line">if(FairMQ_FOUND)</div><div class="line"> find_package(FairLogger ${FairMQ_FairLogger_VERSION})</div><div class="line"> find_package(Boost ${FairMQ_Boost_VERSION} COMPONENTS ${FairMQ_Boost_COMPONENTS})</div><div class="line">endif()</div></div><!-- fragment --><p>Of course, feel free to customize the above commands to your needs.</p>
<p>Optionally, you can require certain FairMQ package components and a minimum version:</p>
<div class="fragment"><div class="line">find_package(FairMQ 1.1.0 COMPONENTS nanomsg_transport dds_plugin)</div><div class="line">if(FairMQ_FOUND)</div><div class="line"> find_package(FairLogger ${FairMQ_FairLogger_VERSION})</div><div class="line"> find_package(Boost ${FairMQ_Boost_VERSION} COMPONENTS ${FairMQ_Boost_COMPONENTS})</div><div class="line">endif()</div></div><!-- fragment --><p>When building FairMQ, CMake will print a summary table of all available package components.</p>
<h2>CMake options</h2>
<p>On command line:</p>
<ul>
<li><code>-DDISABLE_COLOR=ON</code> disables coloured console output.</li>
<li><code>-DBUILD_TESTING=OFF</code> disables building of tests.</li>
<li><code>-DBUILD_EXAMPLES=OFF</code> disables building of examples.</li>
<li><code>-DBUILD_NANOMSG_TRANSPORT=ON</code> enables building of nanomsg transport.</li>
<li><code>-DBUILD_OFI_TRANSPORT=ON</code> enables building of the experimental OFI transport.</li>
<li><code>-DBUILD_DDS_PLUGIN=ON</code> enables building of the DDS plugin.</li>
<li><code>-DBUILD_DOCS=ON</code> enables building of API docs.</li>
<li>You can hint non-system installations for dependent packages, see the #Installation section above</li>
</ul>
<p>After the <code>find_package(FairMQ)</code> call the following CMake variables are defined:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Variable </th><th class="markdownTableHeadNone">Info </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_PACKAGE_DEPENDENCIES}</code> </td><td class="markdownTableBodyNone">the list of public package dependencies </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_Boost_VERSION}</code> </td><td class="markdownTableBodyNone">the minimum Boost version FairMQ requires </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_Boost_COMPONENTS}</code> </td><td class="markdownTableBodyNone">the list of Boost components FairMQ depends on </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_FairLogger_VERSION}</code> </td><td class="markdownTableBodyNone">the minimum FairLogger version FairMQ requires </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_PACKAGE_COMPONENTS}</code> </td><td class="markdownTableBodyNone">the list of components FairMQ consists of </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_::COMPONENT::_FOUND}</code> </td><td class="markdownTableBodyNone"><code>TRUE</code> if this component was built </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_VERSION}</code> </td><td class="markdownTableBodyNone">the version in format <code>MAJOR.MINOR.PATCH</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_GIT_VERSION}</code> </td><td class="markdownTableBodyNone">the version in the format returned by <code>git describe --tags --dirty --match "v*"</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_ROOT}</code> </td><td class="markdownTableBodyNone">the actual installation prefix, notice the difference to the hint variable <code>FAIRMQ_ROOT</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_BINDIR}</code> </td><td class="markdownTableBodyNone">the installation bin directory </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_INCDIR}</code> </td><td class="markdownTableBodyNone">the installation include directory </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_LIBDIR}</code> </td><td class="markdownTableBodyNone">the installation lib directory </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_DATADIR}</code> </td><td class="markdownTableBodyNone">the installation data directory (<code>../share/fairmq</code>) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_CMAKEMODDIR}</code> </td><td class="markdownTableBodyNone">the installation directory of shipped CMake find modules </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_CXX_STANDARD_REQUIRED}</code> </td><td class="markdownTableBodyNone">the value of <code>CMAKE_CXX_STANDARD_REQUIRED</code> at built-time </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>${FairMQ_CXX_STANDARD}</code> </td><td class="markdownTableBodyNone">the value of <code>CMAKE_CXX_STANDARD</code> at built-time </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>${FairMQ_CXX_EXTENSIONS}</code> </td><td class="markdownTableBodyNone">the values of <code>CMAKE_CXX_EXTENSIONS</code> at built-time </td></tr>
</table>
<h2>Documentation</h2>
<ol type="1">
<li><a href="docs/Device.md#1-device">Device</a><ol type="a">
<li><a href="docs/Device.md#11-topology">Topology</a></li>
<li><a href="docs/Device.md#12-communication-patterns">Communication Patterns</a></li>
<li><a href="docs/Device.md#13-state-machine">State Machine</a></li>
<li><a href="docs/Device.md#15-multiple-devices-in-the-same-process">Multiple devices in the same process</a></li>
</ol>
</li>
<li><a href="docs/Transport.md#2-transport-interface">Transport Interface</a><ol type="a">
<li><a href="docs/Transport.md#21-message">Message</a><ol type="i">
<li><a href="docs/Transport.md#211-ownership">Ownership</a></li>
</ol>
</li>
<li><a href="docs/Transport.md#22-channel">Channel</a></li>
<li><a href="docs/Transport.md#23-poller">Poller</a></li>
</ol>
</li>
<li><a href="docs/Configuration.md#3-configuration">Configuration</a><ol type="a">
<li><a href="docs/Configuration.md#31-device-configuration">Device Configuration</a></li>
<li><a href="docs/Configuration.md#32-communication-channels-configuration">Communication Channels Configuration</a><ol type="i">
<li><a href="docs/Configuration.md#321-json-parser">JSON Parser</a></li>
<li><a href="docs/Configuration.md#322-suboptparser">SuboptParser</a></li>
</ol>
</li>
<li><a href="docs/Configuration.md#33-introspection">Introspection</a></li>
</ol>
</li>
<li><a href="docs/Development.md#4-development">Development</a><ol type="a">
<li><a href="docs/Development.md#41-testing">Testing</a></li>
</ol>
</li>
<li><a href="docs/Logging.md#5-logging">Logging</a><ol type="a">
<li><a href="docs/Logging.md#51-log-severity">Log severity</a></li>
<li><a href="docs/Logging.md#52-log-verbosity">Log verbosity</a></li>
<li><a href="docs/Logging.md#53-color">Color for console output</a></li>
<li><a href="docs/Logging.md#54-file-output">File output</a></li>
<li><a href="docs/Logging.md#55-custom-sinks">Custom sinks</a></li>
</ol>
</li>
<li><a href="docs/Examples.md#6-examples">Examples</a> </li>
</ol>
</div></div><!-- PageDoc -->
</div><!-- contents -->
<p style="margin: 0 12px 10px 12px;"><a href="https://help.github.com/articles/github-privacy-statement/">privacy</a></p>