That seems like a good idea, but you can do that simply with dispatchers. 
Then you can control that the workers never use all the threads, and some 
are saved for the productors. It depends on your requirements if there is a 
problem that the productors work slowly, though...

If the work is too heavy for one machine (as it sounds to me), you should 
consider spreading out using remote actors (different actor systems) on 
different machines.

The system should not crash anyway, though.

Best regards,

Anders Båtstrand

onsdag 8. april 2015 14.27.53 UTC+2 skrev Chi Shin Hsu følgende:
>
> Hi all,
>
> I have a basic question about the actor system.
>
> This is my program design:
>
> There are three modules, Productors, Workers and Consumers. 
> Each module has a group of actors.
>
> Produtors do nothing but only put data into the Worker's queue, and the 
> others do heavy jobs.
> But I find its message would delay because they all use the same actor 
> system. (or dispatcher?)
>
> 1. All workers get heavy jobs. All threads are busy.
> 2. Productors send jobs to the workers as usually, but all messages are 
> not delivered to the workers. They all stuck in the actor mailbox.
> 3. When the CPU is free, all queued messages are put to workers instantly, 
> and here cost a lot of CPU loading.
> 4. Productors work slowly because of high loading.
>
> Finally the system crashes.
>
> How do avoid this situation?
> Is separating their threading (actor system) a good idea?
>
> Thanks.
>

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to