I started to learn the Actor model (using Akka.net) and plan to use it in the current project. My current task is extracting text from different files using IFilter. IFilter is a set of COM-servers with native code. Sometimes it can hang or processing proceeds too long. I need to abort a processing for problem file in such situation and continue for next file in a queue. But I need to kill a whole process for correctly cleanup the native code.
Another problem is the productivity – in most cases I cannot load more than one core using many threads in a single process. I am suspecting that IFilter has a lock inside. But I can use the full power of CPU if I run several copies of my test app (it emulates multiprocess mode).
My question is: how I can deploy some actors in separate processes?
I have found that actor’s deployment strategy can be specified in configuration in this way (sample from Petabrige’s lectures):
<akka>
<hocon>
<![CDATA[
akka {
actor {
deployment {
/charting {
# causes ChartingActor to run on the UI thread for WinForms
dispatcher = akka.actor.synchronized-dispatcher
}
}
}
}
]]>
</hocon>
</akka>
Other options are:
- SingleThreadDispatcher
- ThreadPoolDispatcher
- ForkJoinDispatcher
But I can’t find here option for deployment in the separate process.
How can I solve the problem?