05-31-2017 06:53 PM
I've been studying Actor Framework for three days now, and I still cannot make sense of any of it. I've looked at all the tutorials I can find from NI and other sources, but I cannot seem to take the theoretical knowledge and match it with the practical applications.
Does anyone know of a "Remedial Actor Network" tutorial that would take me through building a VI slowly, step-by-step, while explaining everything that is going on at every step of the process?
Thank you very much.
Solved! Go to Solution.
05-31-2017 08:43 PM - edited 05-31-2017 08:43 PM
Hi,
@diarmaede wrote:
I've been studying Actor Framework...
Good for you! The Actor Framework regularly seems to be described as very difficult to understand or work with, but I think that it is an architecture in which although there is some up-front cost, once you have some understanding it becomes possible to build ever more complex systems without ever more complicated code.
I would however suggest that the Actor Framework template is not the greatest learning tool. Some resources I found helpful were:
If you're looking for a more useful (in my opinion) example than the template, then Matt Pollock's Coffee Shop example described in this thread is really pretty good (although a bit more complicated, you get to see it do something). I'm not certain if there are minor bugs in the code when you try to do strange things, but it's certainly illustrative of a way to group sets of actors together to do something nice. It also demonstrates the benefit of actors being independent - you can have a bunch of separate customers each as a new instantiation of the same actor-inheriting class. I've placed an image of the class hierarchy below with some comments to incentivise taking a look!
06-01-2017 10:26 AM
Wow! What a fantastic response. TYVM!
06-01-2017 04:20 PM
These are great resources cbutcher! I'll also add that I think another super important thing when first learning the actor framework is do NOT try to understand HOW it works. Don't open up any of the parent methods, you will get confused with all the details of how actor framework is implemented, but all you actually need to know is how to use it. This can be fun to learn about later but don't let it stop you from using it. In fact, the whole point of a framework is to make it so you don't need to worry about all those details. Just imagine you are sending messages from one actor to another through a magic portal.
06-01-2017 06:09 PM
@HopeH wrote:
These are great resources cbutcher!
Glad you like them - especially since half of them are written by some of your very helpful and kind colleagues at NI! (or previously at NI...)
I'll also add that I think another super important thing when first learning the actor framework is do NOT try to understand HOW it works. Don't open up any of the parent methods, you will get confused with all the details of how actor framework is implemented, but all you actually need to know is how to use it. This can be fun to learn about later but don't let it stop you from using it. In fact, the whole point of a framework is to make it so you don't need to worry about all those details. Just imagine you are sending messages from one actor to another through a magic portal.
Respectfully (and knowing it puts me in terrible company - I'm pretty sure I've seen AQ write exactly what you've written numerous times) I disagree. Although it's certainly true that an advantage of a framework is making things work without you having to reinvent the wheel or fully understand how all of the pieces work, I'd like to suggest that with the Actor Framework, one of the great strengths is that if you're confused about how or why something works as it does, the answer is only a few double-clicks away.
Many of the framework VIs have detailed comments. There are more in the Actor side than the Message side, but once you have the Message Maker worked out (here right click is much better than double click!) you should be ok with messages until you try to use batch messages or reply messages.
With batch messages and reply messages, both of which are outside of the suggested use of the framework, there are some specific guides you can use. For reply messages, the hand-holding tutorials are actually much more useful - the difficulty isn't understanding the concept so much as making the mechanics work.
06-02-2017 05:44 AM - edited 06-02-2017 05:45 AM
Hello,
you can take a look at https://github.com/HB-GSI/Calculator which is an introduction to the NI Actor Framework implementing a simple UPN-Calculator by LabVIEW Champion Holger Brandt with 7 exercises
UliB
06-02-2017 09:04 AM
In addition to tips given above:
06-17-2017 11:54 PM
I just saw a new link on LinkedIn to an AF document describing tools used to create sequence diagrams to display messaging.
It looked so useful that I wanted to share it here.
It probably isn't the beat learning tool, but you could use it on the example projects already mentioned to create example diagrams which might help explain their workings if diagrams are a form you prefer.
08-06-2019 05:23 AM
On my YouTube channel I have a detailed series on Actor Framework which you may find helpful.
https://www.youtube.com/watch?v=2k3ZDwJolbA&list=PLmF-6jvwRvVNFzBjzh4bQDjFbv6lShcth
08-06-2019 04:14 PM
Hi Tom,
Wow! Fantastic videos! By far, the best explanation of the practical applications of Actor Framework that I have ever seen. Thanks very much for your post! I look forward to watching more of your vids!