12-14-2019 10:27 AM
I've enjoyed programming with LabVIEW ever since version 7. I am self taught and have written many small programs. Writing small programs is a pleasure, but writing anything larger is still a plumbers' nightmare, witness the various 3rd party frameworks that have arisen. It's a puzzle that LabVIEW does not support a built-in Actor feature with a simple api. The paradigm has been around since the 1970s for linking process control tasks in minicomputers after all.
The 3rd party Actor frameworks are akin to the OOP frameworks that existed before GOOP. They were functional, very ingenious but very clunky too.
LabVIEW was originally designed to allow non-professional programmers to achieve their automation goal with as little fuss as possible. As it stands, writing a medium to large LabVIEW program still requires significant programming experience, which is a barrier to us mere mortals, as the underlying principles are simple:-
1. Launching one or more subActors
2. Setting up their lines of communication
3. Providing synchronous and asynchronous request-reply and publish-subscribe
4. Persistence of settings from session to session
Is it likely that LabVIEW will have an in-built Actor feature in future? On the other hand - is it felt that the 3rd party solutions are still evolving, have some way to go to perfect a low-fuss solution and that the market requirement is best met by these. Lightweight / heavyweight solutions depending on the application. A built-in solution might not please all.
What do you think?
regards, Bob (retired EMC engineer looking forward to using LabVIEW community edition for his ham radio projects)
12-14-2019 12:04 PM
Here is the help page for the actor framework
Quote from here:
"The Actor Framework is an Actor Model implementation that has been distributed with LabVIEW since LabVIEW 2012"
12-14-2019 12:56 PM
If you are looking for a framework for handling multiple asynchronous tasks, can I suggest that you take a look at the Delacor Queued Message Handler (a.k.a. DQMH), available on the LabVIEW Tools Network, accessed through VIPM? This (in my opinion) has a less-steep learning curve, and there are numerous Tutorials available on the Web, as well as fairly good Documentation and Examples (I proofread an early version of the Documentation).
Bob Schor
12-14-2019 01:08 PM
Actor Framework is an amazing application of Labview programming which was adopted by NI. It isn't a built-in feature of the language in the sense that special symbology was used to implement it and thus greatly simplify Actor programming. I also rank it as top of the heap over the other 3rd party offerings for needing CLA or better expertise.
I've looked at many of the frameworks and dabbled in Messenger Library, but am not wild about using any of them - the framework housekeeping intrudes too much into engineering the solution.
12-14-2019 01:15 PM
Thanks Bob, I've previously downloaded DQMH. Good documentation makes all the difference to the learning curve too.
12-14-2019 03:41 PM
How would a 'baked in' actor framework simplify actor programming?
Writing medium to large applications (especially ones with asynchronous components) will always require a skilled programmer.
12-14-2019 04:51 PM
Well, there is the danger that having a baked-in Actor feature might tempt over-confident beginners to write much larger badly written applications than before.
A baked-in Actor might not be welcomed by an Actor-based consultancy if it disturbed their business by broadening the availability of that technology to mid-level programmers.
There is certainly a great deal more guidance in the public domain about writing Actor based programs in the last five years - take the Akka community for example. As a LabVIEW enthusiast, I guess I'm just venting a little frustration at the non-linear increase in effort required at the moment to write LabVIEW programs above a certain size, in my view.
My guess is the status quo will continue for a number of years yet.
12-14-2019 09:19 PM
You might want to see how Actor framework is getting ported into LabVIEW NXG in a more "baked-in" fashion.
You can watch a test drive that Tom McQuillan did with LabVIEW NXG 4.0 here: Trying out Actor Framework in LabVIEW NXG 4.0...
If you have specific ideas or comments on how the workflows could be improved, I strongly suggest sending them via the in-product feedback mechanism.
All the best,
12-15-2019 05:27 AM
Thanks Oscar, I'll follow up on those - don't know much about LabVIEW NXG so time to find out. Good thing about being retired - you can learn about whatever takes your fancy without fear of slipping any deadline. Mind you, the stiffening joints aren't so great!
12-15-2019 07:10 AM
Paul,
You said 'How would a 'baked in' actor framework simplify actor programming?'
1. By simplifying the block diagram again with new structures that support Actor features
2. By requiring fewer mouse and keyboard strokes
3. By reducing distraction from the end goal in doing the mundane stuff e.g. Creating all those message classes in Actor Framework. There's a lot of low level boilerplate, it can take time to do, so it's scripted to take some of the effort away
4. By reducing complexity in the LabVIEW project window
As an example of new symbology, look how the Event Structure revolutionised programming. We couldn't live without that 'magic wireless' object now. I would hope that Actor programming eventually gets a similar small set of symbols to support it and hide the complex works away.