11-20-2022 07:08 PM
Abstract
Reusing properly engineered code saves time and money. Applying SOLID Design Principles results in creating highly reusable code units. Actors are the typical building blocks of Distributed Applications. Actors interact with each other by sending and receiving Messages.
Actors developed with the knowledge of location (within the Distributed Application) and/or ‘details’ of other Actors are not truly reusable. In such systems, moving an Actor into a different location or different Development Environment (i.e., Programming Language) takes time and effort not only for updating code of the Actor being moved, but also code of the Actors it communicates with.
This presentation shows how to future-proof Distributed Applications by creating Context-Agnostic Actors interacting via a LabVIEW-based Distributed Message Broker.
The PowerPoint 2016 file has some animations and is best viewed in Slide Show mode. It also has a large amount of Slide Notes that are essential for better understanding this presentation.
PDF file includes slide notes. To see notes either hover over an icon in the top left corner of a page (containing Notes) or right-click the icon and select “Open All Pop-ups” option. Diagrams & images on slides with animations are stacked and may obscure images farther out along Z axis.
Enjoy,
Dmitry
11-24-2022 08:12 AM
Hi Dmitry,
How do you handle the fact that a network connection is unreliable, and a remote application may not be running or may stop? This is different from the case of a local actor, which can be reliably communicated with.
11-25-2022 02:29 PM
@drjdpowell wrote:Hi Dmitry,
How do you handle the fact that a network connection is unreliable, and a remote application may not be running or may stop? This is different from the case of a local actor, which can be reliably communicated with.
There are two parts to this:
a) what is done by the Distributed Message Broker (DMB)
b) what should be done by the Application running on top of DMB (because different applications may care about different issues and it is not possible/practical to have DMB support all use cases)
What is handled by ArT Distributed Message Broker:
With this design any messages published by a remote actor while the two containers do not have a connection are lost to any local subscriber (i.e. my DMB does not guarantee message delivery - which might be important for some distributed applications).
Depending on specific application requirements, the application code may:
11-26-2022 04:04 AM
Do you have a feature analogous to the "State Notifications" in Messenger Library? That is where late-subscribing clients are automatically sent a copy of the latest publication on a topic. I find this helps a lot with unreliable TCP connections, as though individual notifications can be lost one can rely on getting the latest state when connected again (without any application code being required).
Another question: do you have Request-Reply? Can you effectively Command a remote actor do do something and get a reply that confirms it is done, before proceeding with your next action?
11-26-2022 08:35 PM
@drjdpowell wrote:Do you have a feature analogous to the "State Notifications" in Messenger Library? That is where late-subscribing clients are automatically sent a copy of the latest publication on a topic. I find this helps a lot with unreliable TCP connections, as though individual notifications can be lost one can rely on getting the latest state when connected again (without any application code being required).
Yes, I do support it and as you've pointed out it is a very handy feature 🙂 But one can disable it on a per-subscription basis if it gets in your way. A use case for disabling it would be:
@drjdpowell wrote:Another question: do you have Request-Reply? Can you effectively Command a remote actor do do something and get a reply that confirms it is done, before proceeding with your next action?
Yes, I do support this with a Blocking Request Message. I think it may be safely used in several use cases without risking a deadlock. Back in 2018 I gave a 7x7 presentation at the CLA Summit (in Austin) called Actors - Loosing the Ease of DataFlow Programming.
Abstract:
Actors are Message Driven Entities. NI Actor Framework Best Practices discourage using Blocking Reply Messages as a leading reason for application deadlocks. As a result, Actor Programming is being reduced to implementing low-level Sequence Diagrams - losing lion’s share of the ease of Structured Data Flow Programming so dear to our hearts. Presentation discusses an important (and safe) use case for Blocking Reply Messages that allows bringing Data Flow back into our Actors.
Summary:
I am sure a number of people on LabVIEW discussion groups would strongly disagree with this 😮