Jump to content

Actor Oriented Design Patterns: Difference between revisions

From LabVIEW Wiki
Line 30: Line 30:


== References ==
== References ==
[https://en.wikipedia.org/wiki/Actor_model Wikipedia: Actor_model]


[[Category:Design patterns]]
[[Category:Design patterns]]
[[Category:Actor Framework]]
[[Category:Actor Framework]]

Revision as of 15:40, 20 February 2019

Actor Oriented Design Patterns are software patterns that utilize the Actor Model (for example Actor Framework). Actors are a powerful tool when creating large, highly parallelized, scalable systems in LabVIEW.

Actor Framework Designs

The Actor Framework is a powerful tool there are many aspects to how it can be implemented. Below are three Actor Oriented Design Patterns implemented with the Actor Framework. These resemble their non Object-Oriented counterparts, see Design Patterns, where these are an implementation of a single actor. There real power lies in multiple Actors working together. These patterns are:

  1. State Machine Actor
  2. Queued State Machine Actor
  3. Queued Message Handler Actor

State Machine Actor

The State Machine Actor (SMA) is completely implemented in Messages, it does not override the Actor Core. It sends the first Message on Pre Launch Init Method. Each subsequent Message sends the next Message in the state.

Because it doesn't override the Actor Core the pattern does not have a UI of its own. It could be paired with another Actor that implements the UI and sends Messages to it to update UI elements. The paired Actor would follow one of the other patterns. See more about the State Machine Actor (SMA) Design Pattern.

Queued State Machine Actor

More to come.

Queued Message Handler Actor

More to come

Other Actor Implementation Designs

Messenger Library

DQMH

More to Come

Articles

"Actor Framework is not as hard as you think and here is why…" - by Quentin "Q" Alldredge, Q Software Innovations, LLC

If you are familiar with the Queued Message Handler (QMH) Design Pattern and Object-Oriented Programming (OOP) then you already know everything you need to start with Actor Framework.  The purpose of this article is to show the parts of the Actor Framework that are comparable to the QMH Design Pattern and provide a step-by-step procedure for converting a QMH project to an Actor Framework project.

References

Wikipedia: Actor_model