At the GLA conference, someone brought up the possibility of UDP as an alternative to TCP Messengers. UDP is not the same as TCP, and is not a drop in substitute, but it may have uses. So I wanted to ask what use cases of UDP people have found. Some possibilities:
For distributed systems all on the same subnet, I'm using UDP to share latest tag values between systems.
Additionally, I'm using UDP multicast to broadcast status so anyone on the same subnet can selectively choose which system status they care about without having to direct those messages to anyone specific.
What do you guys set "max size" to in the UDP Read? It's default is 548, but I can't see any reason I wouldn't set it to the maximum UDP datagram size of 60k+. What disadvantage is there to a large size?
Here is a Beta Version to try (not for production code).
See the Example VIs in <LabVIEW>\examples\JDP Science\Messenger Library\UDP Example
Example Sender is an UDP Address type:
Note that this new address type can be used anywhere an address can (example: Register it to a Notification). BUT, there is no Reply/Registration support, as there is no mechanism to route replies or notification back (as of yet, at least).
The receiving of UDP is handled by new "Forwarders", async processes that forward any UDP messages to a standard address, allowing UDP messages to be handled by loops using Queue, Event or Notifier Messengers:
You can have any number of Forwarders. As is standard in Messenger Library, the Forwarders will automatically shutdown when their caller does, so there is no need for shutdown code.