Deploying Akka .net in separate processes

I started exploring the Actor model (using Akka.net) and plan to use it in my current project. My current task is to extract text from different files using IFilter. IFilter is a collection of native COM servers. Sometimes it may freeze or take too long to process. I need to abort processing for the problem file in a situation like this and continue for the next file in the queue. But I need to kill the whole process to clean up my own code properly.

Another issue is performance - in most cases I cannot load more than one core using many threads in a single process. I suspect the IFilter has a lock inside. But I can use the full CPU power if I run multiple copies of my test application (it emulates multiprocessing).

My question is, how can I deploy some contributors to separate processes ?

I found that the player placement strategy can be specified in the configuration in this way (sample from Petabriges 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:

  • SingleThreadDispatcher
  • ThreadPoolDispatcher
  • ForkJoinDispatcher

But I can't find an option here for deploying in a separate process.

How can I solve the problem?

+3


source to share


1 answer


You can use Accka.Remote and Remote Actor Deployments for this - you can deploy actors remotely to other processes on the network this way. I outline some of the steps in my answer here: I need to communicate with multiple remote actor systems



If you want to see an example on how to do this, check out the RemoteDeploy sample inside the Akka.NET project: https://github.com/akkadotnet/akka.net/tree/dev/src/examples/RemoteDeploy

+3


source







All Articles