Actor Framework Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner Tutorial: Zero-Coupled Actor Project

This is the step-by-step tutorial promised for zero-coupled actors and abstract messaging. While there are probably better projects to illustrate those concepts, the aim of this tutorial is to match the original project as closely as possible. Thus,in this project a Test Actor takes two numbers as input and sends them in messages to an Addition and Multiplication actor. Those actors then carry out the calculations and send the results back (in messages again) to the Test Actor for display.

 

Actor Diagram.png

 

The Actor Class diagram:

Actor Hierarchy.png

 

The message hierarchy is shown next. There are probably other ways to implement the abstract/child message classes, but I've decide to go this way. In any case, the main point is to understand the flow in creating the messages, which I think the tutorial does.

Message Hierarchy.png

 

Finally, I also show two ways of defining the child class in the program. The first is to define the child message type at actor launch:

1_4_updated.jpg

 

The second approach is to "inject" the child message type at run-time.

1_5_updated.jpg

 

Comments obviously welcome. This was a somewhat difficult document to write, so some errors may remain.

Comments
CanadaGuy
Member
Member
on

This tutorial is exactly what I was looking for in decoupled messaging (callee to caller). I implemented my own code (and wrote some notes) on how to do it using the build in message maker functions for abstract and children messages using the "inject at runtime" method. It works well, and doesn't require much manual intervention. This should be required reading for AF learning for reusable actors.