Skip to content

Commit e1bf61b

Browse files
rbxMohammadAlTurany
authored andcommitted
Update flp2epn-distributed docs.
1 parent 57ee03f commit e1bf61b

5 files changed

Lines changed: 22 additions & 32 deletions

File tree

Examples/flp2epn-distributed/README.md

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,50 @@
33

44
#### General
55

6-
The devices implement following topology:
6+
The devices implement following topology:
77

8-
![FLP2EPN topology](../../docs/images/flp2epn-distr-rtt.png?raw=true "FLP2EPN topology")
8+
In default mode:
9+
10+
![FLP2EPN topology](../../docs/images/flp2epn-distributed.png?raw=true "FLP2EPN topology")
11+
12+
In test mode:
13+
14+
![FLP2EPN topology test mode](../../docs/images/flp2epn-distributed-test-mode.png?raw=true "FLP2EPN topology in test mode")
915

1016
- **flpSyncSampler** publishes timeframe IDs at configurable rate (only for the *test mode*).
1117
- **flpSenders** generate dummy data of configurable size and distribute it to the available epnReceivers.
1218
- **epnReceivers** collect all sub-timeframes (according to number of FLPs), merge them and send further.
1319
- flpSenders choose which epnReceiver to send a given sub-timeframe to based on its ID (`timeframeId % NumEPNs`), ensuring that sub-timeframes with the same ID arrive at the same epnReceiver (without need for additional synchronization).
14-
- Upon collecting sub-timeframes from all flpSenders, epnReceivers send confirmation to the sampler with the timeframe ID to measure roundtrip time.
20+
- Upon collecting sub-timeframes from all flpSenders, epnReceivers send confirmation to the sampler with the timeframe ID to measure roundtrip time (only for the *test mode*).
1521
- epnReceivers can also measure intervals between receiving from the same FLP (used to see the effect of traffic shaping).
1622
- The devices can run in *test mode* (as described above) and *default mode* where flpSenders receive data instead of generating it (as used by the Alice HLT devices).
1723
- Optional deployment and execution via DDS.
1824

1925
#### Device configuration
2026

21-
The devices are configured via command line options. Most of the command line options have default values. These default values are for running in the *default mode*. Running in *test mode* requires a few modifications.
27+
The devices are configured via command line options and their connection parameters via JSON file. Most of the command line options have default values. These default values are for running in the *default mode*. Running in *test mode* requires a few modifications. Refer to `startFLP2EPN-distributed.sh.in` and `flp2epn-prototype.json` for example configuration.
2228

2329
These are the required device options:
2430

2531
**flpSyncSampler** (only for the *test mode*)
2632

2733
- `--id arg` Device ID
28-
- `--data-out-address arg` Data output address, e.g.: "tcp://localhost:5555"
29-
- `--ack-in-address arg` Acknowledgement Input address, e.g.: "tcp://localhost:5556"
34+
- `--mq-config arg` JSON configuration file
3035

3136
**flpSender**
3237

3338
- `--id arg` Device ID
39+
- `--mq-config arg` JSON configuration file
3440
- `--num-epns arg` Number of EPNs
35-
- `--data-in-address arg` Data input address, e.g.: "tcp://localhost:5555"
36-
- `--data-out-address arg` Data output address, e.g.: "tcp://localhost:5555"
37-
- `--hb-in-address arg` Heartbeat input address, e.g.: "tcp://localhost:5555"
38-
39-
Default overrides for *test mode*:
40-
41-
- `--test-mode arg (=0)` "1" to run in test mode
42-
- `--data-in-socket-type arg (=pull)` "sub" for test mode
43-
- `--data-in-method arg (=bind)` "connect" for test mode
44-
- `--data-in-address arg` In test mode, the signal from flpSyncSampler sends to this address (data is generated).
41+
- only for test mode: `--test-mode arg (=0)` "1" to run in test mode
4542

4643
**epnReceiver**
4744

4845
- `--id arg` Device ID
46+
- `--mq-config arg` JSON configuration file
4947
- `--num-flps arg` Number of FLPs
50-
- `--data-in-address arg` Data input address, e.g.: "tcp://localhost:5555"
51-
- `--data-out-address arg` Output address, e.g.: "tcp://localhost:5555"
52-
- `--hb-out-address arg` Heartbeat output address, e.g.: "tcp://localhost:5555"
53-
54-
Default overrides for *test mode*:
55-
56-
- `--data-out-socket-type arg (=push)` "pub" for test mode (pub will just discard the data because no receiver in test mode).
57-
- `--ack-out-address arg` For test mode provide address of the flpSyncSampler.
48+
- only for test mode: `--test-mode arg (=0)` "1" to run in test mode
5849

5950
To list *all* available device options, run the executable with `--help`.
6051

61-
When running with DDS, configuration of addresses is also not required, because these are configured dynamically.
62-
63-
Example for the *test mode* can be found in `run/startFLP2EPN-distributed.sh.in` for manual run, or `runO2Prototype/flp_epn_topology.xml` for DDS run. For *default mode* there is an example DDS topology in `../topologies/o2prototype_topology.xml`.
64-
52+
When running with DDS, configuration of addresses is also not required, because these are configured dynamically. Refer to `flp2epn-prototype-dds.json` and the DDS configuration files for an example.

Examples/flp2epn-distributed/src/EPNReceiver.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ void EPNReceiver::Run()
135135
}
136136

137137
if (fTimeframeBuffer[id].parts.Size() == fNumFLPs) {
138-
// LOG(INFO) << "Collected all parts for timeframe #" << id;
139-
// when all parts are collected send then to the output channel
140-
Send(fTimeframeBuffer[id].parts, fOutChannelName);
141-
142138
if (fTestMode > 0) {
143139
// Send an acknowledgement back to the sampler to measure the round trip time
144140
unique_ptr<FairMQMessage> ack(NewMessage(sizeof(uint16_t)));
@@ -148,6 +144,12 @@ void EPNReceiver::Run()
148144
LOG(ERROR) << "Could not send acknowledgement without blocking";
149145
}
150146
}
147+
else
148+
{
149+
// LOG(INFO) << "Collected all parts for timeframe #" << id;
150+
// when all parts are collected send them to the output channel
151+
Send(fTimeframeBuffer[id].parts, fOutChannelName);
152+
}
151153

152154
// fTimeframeBuffer[id].end = steady_clock::now();
153155

docs/images/flp2epn-distr-rtt.png

-29.8 KB
Binary file not shown.
28.9 KB
Loading
20.8 KB
Loading

0 commit comments

Comments
 (0)