If you’ve looked at any of the videos, tutorials, etc. I put together for Myriad, you’ll eventually find something about building distributed applications through Akka’s remoting feature. It’s pretty straightforward to use in Myriad Desktop – just update an address and you’re good to go – but what actually lives on the remote system accepting these calls anyway?
So with that in mind, I’ve put together a little project to show the “what.” ActorPool reads a configuration file, starts up one stage in a Myriad processing pipeline, and waits for incoming data. The idea is that you’d have it start up automatically with the remote system and it’d be available to provide a little extra horsepower when processing data in a Myriad application. In the initial commit I’ve included support for the two stages in Myriad that tend to require the most horsepower – the sliding window stage and the actual Region Of Interest (ROI) detection stage. Also included is a Passive-Aggressive model trained to detect damage in C-scans, bundled with Myriad’s new Canny edge detection algorithm.
To use it, just edit application.conf to your liking; in particular choose what stage to run in the
actorpool config block. Basic usage is
java -jar /path/to/jar /path/to/application.conf e.g.
java -jar target/actorpool-1.0-SNAPSHOT-allinone.jar application.conf. If all goes to plan, ActorPool will log a message with its Myriad address:
2017-10-04 15:55:54,764 INFO c.emphysic.myriad.actorpool.ROIPool - Didn't find ROIBundle from '/pa_canny_median.myr', checking resources...
2017-10-04 15:55:54,764 INFO c.emphysic.myriad.actorpool.ROIPool - Using 17 workers
2017-10-04 15:55:54,912 INFO c.emphysic.myriad.actorpool.ROIPool - Successfully loaded ROIBundle from 'C:\Users\chris\AppData\Local\Temp\myriad_model9091549293203704829.myr', starting pool
2017-10-04 15:55:54,915 INFO c.emphysic.myriad.actorpool.ROIPool - Pool listening at akka.tcp://MyriadROIPool@192.168.1.29:8888/user/$a
And in Desktop or another Myriad app you’d just supply
akka.tcp://MyriadROIPool@192.168.1.29:8888/user/$a as the address for the remote pool and you’re good to go.