FairMQ/fairmq/examples/2-sampler-processor-sink
Alexey Rybalchenko 19afacb504 FairMQ Examples cleanup
- Rename Tutorial3 MQ files for uniform naming.
  - Add search for dylib in FindDDS.cmake (OSX).
  - Add more detail to the DDS example readme.
  - MQ Example 3 (DDS): choose network interface via command line option.
  - Give FairMQ examples their own CMakeLists.txt for clarity.
  - Remove C++11 checks in Tutorial3 from the code (they are now in CMake).
  - Add Serializer for device properties (FairMQDevice::ListProperties()).
2015-10-05 18:06:55 +02:00
..
CMakeLists.txt FairMQ Examples cleanup 2015-10-05 18:06:55 +02:00
ex2-sampler-processor-sink.json Add DDS and Copy+Push examples. 2015-09-28 12:17:24 +02:00
FairMQExample2Processor.cxx Add orthogonal OK/ERROR states. 2015-09-28 12:17:24 +02:00
FairMQExample2Processor.h Add first two simple FairMQ examples 2015-06-22 16:35:00 +02:00
FairMQExample2Sampler.cxx Add orthogonal OK/ERROR states. 2015-09-28 12:17:24 +02:00
FairMQExample2Sampler.h Add first two simple FairMQ examples 2015-06-22 16:35:00 +02:00
FairMQExample2Sink.cxx Add orthogonal OK/ERROR states. 2015-09-28 12:17:24 +02:00
FairMQExample2Sink.h Add first two simple FairMQ examples 2015-06-22 16:35:00 +02:00
README.md Add DDS and Copy+Push examples. 2015-09-28 12:17:24 +02:00
runExample2Processor.cxx Several FairMQ fixes and improvements: 2015-09-28 12:17:22 +02:00
runExample2Sampler.cxx Several FairMQ fixes and improvements: 2015-09-28 12:17:22 +02:00
runExample2Sink.cxx Several FairMQ fixes and improvements: 2015-09-28 12:17:22 +02:00

Example 2: Sampler -> Processor -> Sink

A simple topology of three devices - Sampler, Processor and Sink. Sampler sends data to one or more Processors, who modify the data and send it to one Sink. Transport with the PUSH-PULL pattern.

In this example the Sampler is configured to bind its output and the Sink is configured to also bind its input. This allows us run any number of processors with the same configuration, because they all connect to same Sampler and Sink addresses. Furthermore, it allows adding of processors dynamically during run-time. The PUSH and PULL sockets will handle the data distribution to/from the new devices according to their distribution strategies (Round-robin output for PUSH and Fair-queued input for PULL).

The Sampler sends out a simple text string (its content configurable with --text command line parameter, defaul is "Hello"). Each Processor modifies the string by appending its ID to it and send it to the Sink.

The provided configuration file contains two Processors. To add more Processors, you can either extend the configuration file, or create a separate file only for new processors.