DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

When to choose broadcast over status update?

So as I am getting deeper into DQMH usage, one of the questions I keep asking is "Should this be a status update broadcast or it's own broadcast broadcast?" On the one hand, I might argue that a broadcast should only be necessary if there is a payload. But what if the listener wants to take action on the "notification"? It is obviously much easier for it to register for separate broadcasts than to try and parse/select on a status string, which is probably going to be more verbose than say a brief message label (ala Messenger Library observer notifications). So know I have to think about if any of the listeners might care to react to my messages? Smells like coupling to me. So the logical conclusion for me is that most updates going to the external world would be better served by having its own broadcast event, so my module does not care about who is listening. So now, what is the status update broadcast good for? I would guess only notifying about State of the MHL, but since the MHL isn't actually a state machine, that could get murky. Suddenly the Status Update Broadcast, while a convenient swiss army knife for broadcasting, seems riddled with practical gotchas.

Would some of the experts mind chipping in? Thanks!

0 Kudos
Message 1 of 5
(1,892 Views)

I'm fairly certain I've only ever used Status Updated as a debugging tool. The tester for my module is registered for it, along with the testers for any other modules that call my module. You should never be parsing your Status Updated broadcast string for certain messages. I tried that one time as a shortcut for something and Fabiola yelled at me. Never again. 😛

Message 2 of 5
(1,885 Views)

@Darren wrote:

I'm fairly certain I've only ever used Status Updated as a debugging tool. The tester for my module is registered for it, along with the testers for any other modules that call my module. You should never be parsing your Status Updated broadcast string for certain messages. I tried that one time as a shortcut for something and Fabiola yelled at me. Never again. 😛


Same here.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 3 of 5
(1,877 Views)

@Darren wrote:

I'm fairly certain I've only ever used Status Updated as a debugging tool. The tester for my module is registered for it, along with the testers for any other modules that call my module. You should never be parsing your Status Updated broadcast string for certain messages. I tried that one time as a shortcut for something and Fabiola yelled at me. Never again. 😛


+1




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 )


Message 4 of 5
(1,872 Views)

Makes senses. Thanks for the input.

0 Kudos
Message 5 of 5
(1,790 Views)