DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Architecture Validation

In some ways it is circular. If you send a roundtrip message and you are registered for the broadcast then at some point you get a message back saying that it finished. 

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 11 of 18
(1,697 Views)

@Taggart wrote:

In some ways it is circular. If you send a roundtrip message and you are registered for the broadcast then at some point you get a message back saying that it finished. 


That sounds like an attempt to get a Reply back asynchronously.  It's a potentially dangerous one if there are multiple requesters.  For example, if I request "what is 2+2", and someone else (just before me) asks "what is 2+3", I might come to the conclusion that 2+2=5.

0 Kudos
Message 12 of 18
(1,683 Views)

Fair point.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 13 of 18
(1,677 Views)

@drjdpowell wrote:

@Taggart wrote:

In some ways it is circular. If you send a roundtrip message and you are registered for the broadcast then at some point you get a message back saying that it finished. 


That sounds like an attempt to get a Reply back asynchronously.  It's a potentially dangerous one if there are multiple requesters.  For example, if I request "what is 2+2", and someone else (just before me) asks "what is 2+3", I might come to the conclusion that 2+2=5.


...and that reminds me of James' talk about futures/promises...




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


0 Kudos
Message 14 of 18
(1,674 Views)

@drjdpowell wrote:


That sounds like an attempt to get a Reply back asynchronously.  It's a potentially dangerous one if there are multiple requesters.  For example, if I request "what is 2+2", and someone else (just before me) asks "what is 2+3", I might come to the conclusion that 2+2=5.


If you request 2+2, then you'll use the reply payload output of the Request VI to see what the answer is. So will whoever (just before you) asked what 2+3 was. You'll both get the right answer with this approach. That also means that neither of you is registered for the broadcast of the round trip. In Tom's LabVIEW Adventure video that discusses DQMH round trips, he describes a good round trip use case... in his example, there's a request to update firmware on a hardware module. It's a round trip, so whoever requested to update the firmware will receive the response that it is updated, but there's also a broadcast telling any other interested modules that the firmware is updated, in case they need that info for whatever reason.

Message 15 of 18
(1,667 Views)

This is exactly how I understand the round trip, a request and wait for reply for the calling code and an extra broadcast with the same reply to all the possible listeners.

 

Enrique.

0 Kudos
Message 16 of 18
(1,661 Views)

That just circles me back to my point that "round trip" is a nonintuitive name for a "wait for reply and notify others".  

0 Kudos
Message 17 of 18
(1,654 Views)

@Darren wrote:

@drjdpowell wrote:


That sounds like an attempt to get a Reply back asynchronously.  It's a potentially dangerous one if there are multiple requesters.  For example, if I request "what is 2+2", and someone else (just before me) asks "what is 2+3", I might come to the conclusion that 2+2=5.


If you request 2+2, then you'll use the reply payload output of the Request VI to see what the answer is. So will whoever (just before you) asked what 2+3 was. .


That's a synchronous (or blocking) Request-Reply.  A very good messaging pattern, but there is also asynchronous Request-Reply, where one isn't blocked waiting on the reply.  Taggert's suggested use sounds like an attempt to get a reply in a non-blocking manner.

0 Kudos
Message 18 of 18
(1,653 Views)