FairMQ/examples/MQ/2-sampler-processor-sink
Alexey Rybalchenko 13453354c8 Configuration and DDS example/tools updates
- Update DDS example command UI and extract it from example.
 - Unify address handling via DDS properties for dynamic deployment.
 - Update DDS docs with the new approach.
 - Allow `--config-key` to be used to access common config in JSON.
 - Allow common channel properties to be specified for all sockets.
 - Update MQ examples and Tuto3 with new config options.
 - Add start scripts to MQ examples for easier use.
2018-05-02 16:12:57 +02:00
..
CMakeLists.txt Configuration and DDS example/tools updates 2018-05-02 16:12:57 +02:00
ex2-sampler-processor-sink.json Configuration and DDS example/tools updates 2018-05-02 16:12:57 +02:00
FairMQExample2Processor.cxx Fix compiler warnings. 2018-05-02 16:12:57 +02:00
FairMQExample2Processor.h Rename /example to /examples and move MQ examples in it 2018-05-02 16:12:57 +02:00
FairMQExample2Sampler.cxx Fix compiler warnings. 2018-05-02 16:12:57 +02:00
FairMQExample2Sampler.h Rename /example to /examples and move MQ examples in it 2018-05-02 16:12:57 +02:00
FairMQExample2Sink.cxx FairMQ: Extend Multipart and messaging API 2018-05-02 16:12:57 +02:00
FairMQExample2Sink.h Rename /example to /examples and move MQ examples in it 2018-05-02 16:12:57 +02:00
README.md Configuration and DDS example/tools updates 2018-05-02 16:12:57 +02:00
runExample2Processor.cxx Configuration and DDS example/tools updates 2018-05-02 16:12:57 +02:00
runExample2Sampler.cxx Configuration and DDS example/tools updates 2018-05-02 16:12:57 +02:00
runExample2Sink.cxx Configuration and DDS example/tools updates 2018-05-02 16:12:57 +02:00
startMQEx2.sh.in Configuration and DDS example/tools updates 2018-05-02 16:12:57 +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.

For this example both processor devices share same configuration, and can therefore use same setting from the JSON file. But since their ID still has to be unique, additional command line argument must be used to allow them to share configuration. This parameter is --config-key.

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.