100 likes | 238 Views
Tests with the O2 prototype. Mohammad Al-Turany. New test example is available. O2FLPex: Generate random data Size is chosen in the configure script O2Merger: Use zero-copy to join messages from FLPs O2Proxy: R ound-robin messages to EPNs (optional) O2EPNex: Data sink.
E N D
Tests with the O2 prototype Mohammad Al-Turany
New test example is available • O2FLPex: • Generate random data • Size is chosen in the configure script • O2Merger: • Use zero-copy to join messages from FLPs • O2Proxy: • Round-robin messages to EPNs (optional) • O2EPNex: • Data sink M. Al-Turany, CWG13 meeting
Using multi-part messages • It allows us to concatenate multiple messages into a single message without copying • All parts of the message are treated as a single atomic unit of transfer, however the boundaries between message parts are strictly preserved • A multi-part message is a message that has more than one frame. ZeroMQ sends this message as a single on-the-wire message and guarantees to deliver all the message parts (one or more), or none of them. M. Al-Turany, CWG13 meeting
Merger is working with zero copy M. Al-Turany, CWG13 meeting
Multi-part messages • When you send a multipart message, the first part (and all following parts) are only actually sent on the wire when you send the final part. M. Al-Turany, CWG13 meeting
New example (flp2epn)https://github.com/MohammadAlTurany/FairRoot/tree/NewMQEx/example/flp2epn EPN FLP EPN Merger Proxy FLP EPN FLP EPN M. Al-Turany, CWG13 meeting
O2Merger FLP Merger FLP for(int i = 0; i <fNumInputs; i++) { if (poller->CheckInput(i)){ received=fPayloadInputs->at(i)->Receive(msg); } if (received) { if(i<NoOfMsgParts){ fPayloadOutputs->at(0)->Send(msg, ZMQ_SNDMORE); }else{ fPayloadOutputs->at(0)->Send(msg); } received = false; } } FLP "Hold on! There are more data going to be added to this message!" M. Al-Turany, CWG13 meeting
EPN Receiving multi-part message EPN Proxy do { FairMQMessage* msgpart = fTransportFactory->CreateMessage(); fPayloadInputs->at(0)->Receive(msgpart); fPayloadInputs->at(0)->GetOption("rcvmore", &more, &more_size); if(more){ fPayloadOutputs->at(0)->Send(msgpart, ZMQ_SNDMORE); }else{ fPayloadOutputs->at(0)->Send(msgpart); } delete msgpart; } while (more); EPN EPN M. Al-Turany, CWG13 meeting
EPN EPN can be added on the fly EPN FLP EPN Merger FLP EPN FLP EPN EPN M. Al-Turany, CWG13 meeting
EPN Multiple mergers are also possible EPN FLP Merger EPN FLP Merger EPN FLP EPN EPN M. Al-Turany, CWG13 meeting