08-06-2026 02:52 AM
If I have lets say 10 cloneable modules then is there a way to call the "GimmeTheResult" request using module ID -1 and get the result in an array?
I can read them one by one in a for loop (but if returning the result takes time then getting all results might take a long time), or I can send them the request and register for their broadcast messages to get the result.
Is there an easier way?
Solved! Go to Solution.
08-06-2026 09:37 AM - edited 08-07-2026 07:20 AM
Very timely, we just discussed this internally.
Long story short: There is not "an easier way" built into the DQMH framework (edited for clarity). Either of the options you listed (individual request w/ reply to each module or broadcast) is valid and it depends on the use case which one fits better.
In our Dokuwiki, we added this:
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
08-07-2026 01:54 AM
The "easier way" is a messaging pattern called Scatter-Gather where one sends the message to all Modules in parallel and waits for all existing Modules to reply, then returns an array of replied info. But I don't know how easy this would be to add to DQMH.
08-07-2026 02:07 AM
@drjdpowell wrote:
The "easier way" is a messaging pattern called Scatter-Gather where one sends the message to all Modules in parallel and waits for all existing Modules to reply, then returns an array of replied info. But I don't know how easy this would be to add to DQMH.
I would guess one would need a thin async module to actually do the requests and collect the responses before passing it back to the true caller. I think this is basically how you do it in messenger library, but the less coupled address architecture makes it much simpler. I think for DQMH one would need to use something like HSE's generic system request. So you would probably lose the strict type restrictions, the message would go to EVERY module regardless of type, and the relevant modules would have to detect that it was for them? Just basing this off memory so I may be amiss.
08-07-2026 07:21 AM
@drjdpowell wrote:
The "easier way" is a messaging pattern called Scatter-Gather where one sends the message to all Modules in parallel and waits for all existing Modules to reply, then returns an array of replied info. But I don't know how easy this would be to add to DQMH.
Thanks, James, for pointing this out. I edited my post to say "there is no easier way built into the DQMH framework".
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
08-07-2026 05:30 PM
I haven't looked at DQMH in a while, but I suspect one could add this feature. One would need to substitute a Queue for the Notifier that returns replies, and you would wait for the right number of replies (this requires that you know exactly how many clones are running).