Dear akka users,

I am starting with akka and trying to translate a muti-threaded/MPI 
application to the actor paradigm. 
I want to manage a set of workers with the following features : 
- Balancing : balance workload across workers (the router uses a Balancing 
Pool <https://doc.akka.io/docs/akka/current/routing.html#balancingpool>) 
- Broadcast : send important updates that help the workers to execute jobs 
(reduce runtime)
- Priority : recent updates must be read before each job start.

But, the doc says:
*Do not use **Broadcast Messages 
<https://doc.akka.io/docs/akka/current/routing.html#broadcast-messages>** 
when you use **BalancingPool 
<https://doc.akka.io/docs/akka/current/routing.html#balancing-pool>** for 
routers, as described in **Specially Handled Messages 
<https://doc.akka.io/docs/akka/current/routing.html#router-special-messages>*
*. *
Here is the story of my failure to find the right solution.

    Idea 1. Create a second group router that broadcasts the updates to the 
workers.
    Problem. Workers miss many updates. Performance degrades. However, it 
works well with the  SmallestMailboxPool 
<https://doc.akka.io/docs/akka/current/routing.html#smallestmailboxpool> 
because each worker has its own mailbox.

    Idea 2. Use some kind of 'updates pill'. Ask an actor to send updates 
to the router before and after a job is taken by a worker. 
    Problem. Workers miss some updates. Performance sometimes degrades.
    
    Idea 3. Manage the message concurrent queue by myself, as before 
    Problem. It gives total control but, it is more complicated, 
error-prone and scales less easily. 
    
    Idea 4. Implement my own dispatcher 
    Problem. A little bit complicated for a beginner, no ?
    
 As it seems a common use case, I may get some help here.
 
Best regards,
Arnaud

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to