From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Have any toolkit to develop actor framework project quickly and efficiently

Solved!
Go to solution

I am new to develop actor framework project,and I realize that actor framework is not easy to debug and inconvenient to develop class.

I know that MGI Monitored Actor Toolkit and class method browser are useful.

Can you share some toolkit to develop actor framework more easily?

 

Monitored Actor Toolkit:

https://www.mooregoodideas.com/actor-framework/monitored-actor/monitoring-actors/

class method browser:

https://www.mooregoodideas.com/categories/mgi-library/class-method-browser/

0 Kudos
Message 1 of 6
(1,892 Views)
Solution
Accepted by topic author wisdoms


@wisdoms wrote:

and I realize that actor framework is not easy to debug and inconvenient to develop class.

 

I’m the person who created the AF, and I have to ask: what gave you the impression that it is not easy? I designed AF around fairly inexperienced programmers, and many novice G programmers have been able to use it to build up complex applications. But the tools only work if you recognize the problem you’re solving isn’t like traditional applications ... massive parallelism requires proof by construction... which means building your apps different than you may be used to doing. 

 

For your most complex logic actors, develop each actor as much like a by-value type as you can. Call its methods in a line on one diagram and make sure they return correct outputs. After you know they work, then create wrapper VIs that instead of returning the outputs as terminals send messages to its caller containing the results of the logic. Build your actor messages from those methods. 


AF actors are designed to be testable in isolation... you can launch any sub tree independent of the rest of your app. So prove that each leaf actor works then prove their caller. If you’re trying to debug your whole app in one go, you’re doing it wrong— that’s not a good approach to *any* app debugging, but especially not one with massive parallelism. 

 

There are three different ways of testing and debugging AF actors included with shipping LabVIEW: direct method calling without launching (for testing all basic computations are correct), the debug harness in the Advanced palette, and the DETT tools

Are there other tools that could make things easier? Sure. But characterizing it as hard to use initially is setting yourself up for failure (and I’ve worked with enough AF devs over the last decade to say that confidently). 
You may have personally found it not easy to use, but that is different from the framework being generally hard to use. It is — however — solving a very hard problem (massive parallelism), and if you do not adjust your development practices to work in such a world (meaning piecemeal,  with test harnesses at intervening levels) then any framework or tooling will seem hard.

0 Kudos
Message 2 of 6
(1,849 Views)

@AristosQueue (NI) wrote:


AF actors are designed to be testable in isolation... you can launch any sub tree independent of the rest of your app.


This is the way.

 

I worked closely with AQ on the development of the Actor Framework, wrote the AF tools that ship with LabVIEW, and use it regularly in my own work.  The single best tool you can get to help you build, test, and debug an AF system is VI Tester from JKI.  (You don't have to sign up with JKI; just download it from their VI Package Manager.)

 

After you do, watch the video of my presentation on Test Driven Development in Actor Framework from the 2019 CLA Summit.  It steps you through the process for using VI Tester to test your actors in isolation.  If you do this, you will find far fewer bugs when you try to run the entire system, and the bugs you do find will have a very limited set of possible causes.

 

You will also find you are writing better code, because you will learn to write actors that are truly decoupled from each other.

0 Kudos
Message 3 of 6
(1,815 Views)

thanks for your advice on idea and method. I am new to actor framework actually.the train of thought on how to debug a project is very useful.

0 Kudos
Message 4 of 6
(1,789 Views)

I’m glad it is helpful. 
I continue to contemplate ways to make this stuff even easier. 🙂

0 Kudos
Message 5 of 6
(1,775 Views)

Hi

 

how can I to learn the differernt  ways to debugging the AF actors. I am just begin to learn the AF,.

 

"There are three different ways of testing and debugging AF actors included with shipping LabVIEW: direct method calling without launching (for testing all basic computations are correct), the debug harness in the Advanced palette, and the DETT tools. "

0 Kudos
Message 6 of 6
(1,490 Views)