Closed daurer closed 8 years ago
OK I found the example "plotPulseEnergy". So for each analysis function that wants to send data we send a separate ZMQ message? If so, it would be nice to coordinate this to reduce the number of dropped messages on the GUI...
#!python
Data
|
LCLSTranslator
\
EventTranslator
/
LCLSTranslator
|
ipc.set_current_event --> broadcast.set_current_event
|
conf.onEvent
\
analysis.function
/
conf.onEvent
\
analysis.function --> ipc.set_data --> broadcast.set_data --> GUI
/
...
Original comment by: andyofmelbourne
The GUI is actually configured in a way that it only receives signals from ZMQ, if you subscribe to a specific data source. So if you don't ask for data, the GUI does not see any messages.
Original comment by: Benedikt Daurer
Sure, that was not question however:)
I was wondering at what point we envisage sending ZMQ messages from the backend. So far it appears that this will be done by an analysis function to be executed by each rank and at every event.
Original comment by: andyofmelbourne
If we really wanted we could aggregate them at zmqserver.py, but at the moment this does not seem to be an issue. I don't think the extra messages give any measurable overhead.
Original comment by: Filipe Maia
I'll close this as "premature optimization is the root of all evil" :)
Original comment by: Filipe Maia
Ha, good call. I really need to understand ZMQ messaging a bit better. That is, under what conditions will messages get dropped and so on...
Original comment by: andyofmelbourne
What is the intended use case for sending data to the GUI? Looking at the current framework we have:
Data flow:
Should I be calling ZMQ from the "onEvent" function through the broadcast module?