Giter VIP home page Giter VIP logo

event-source-actor's Introduction

Event Source Actor Template

Actor for LabVIEW Actor Framework implementing publisher subscriber model of communication with zero coupling

Source LabVIEW Version: 2020

Author: Piotr Kruczkowski

Introduction

I wanted to share with you a small example actor I wrote to help me with typical subscribing/registering actors. With the introduction of interfaces in LV20 it is much easier to create uncoupled actor systems without using the legacy zero-coupling abstract messaging solution.

The template shows how to design an example event source and how to create an example interface for messages being both received and sent from the source. The interfaces defined in the design are created for the purpose of defining messages and their core Send and Do VIs.

Using the template

The template can be used to understand both publishing and non-publishing types of communication, because the interface design is similar.

General flow in designing a message-based API for an actor:

  1. Understand what messages the actor needs to receive, and which methods will this trigger inside the actor. Define a public interface for the actor.
  2. Create messages based on the public interface of the actor, NOT the actor methods directly.
  3. You should now have the actor, its abstract interface and the messages calling the methods of the interface.
  4. For messages sent out from the actor you need to create a dummy receiver actor, for the purpose of designing the outgoing message interface.
  5. Repeat the same process as in steps 1-3 but without creating the specific actor implementation of the interface.
  6. In your actor, when conditions are met, send out the messages using the Receiver interface you defined.

event-source-actor's People

Contributors

softwareminimalist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

event-source-actor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.