Hi everyone, 

Using Akka 2.3.6, I would like to create a fixed size actor pool which 
keeps a constant number of actors, spawning new routees to replace any 
routee which stops or dies. I would also like to loose as few messages as 
possible. I experimented with a fixed size pool but ultimately I would 
prefer an elastic pool able to spawn despawn actors depending on request 
pressure.

A simple RoundRobinPool or even a SmallestMailboxPool can easily be made to 
resize in the way I want, but  any message already routed to the actor when 
it stops will be lost and sent to deadletters. A collaborative mailbox 
sounds as offered by the BalancingPool is very appealing to avoid having to 
implement a handler for the deadletters. However, according to the code: 
"Resizer cannot be used together with BalancingPool". 

Sifting through the mailing list I found multiple recommendations to use a 
RoundRobinPool with a BalancingDispatcher, however when experimenting with 
it I  encountered the following deprecation warning : 

 Caused by: java.lang.IllegalArgumentException: BalancingDispatcher is 
> deprecated, use a BalancingPool instead. During a migration period you can 
> still use BalancingDispatcher by specifying the full class name: 
> akka.dispatch.BalancingDispatcherConfigurator


While I was able to make the RoundRobinPool work by specifying 
akka.dispatch.BalancingDispatcherConfigurator, 
I wasn't able to find the answer to the following questions in either the 
mailing list or the documentation :
- Why can't resizers be use with BalancingPool ?
- Why the deprecation ? 
- Is my setup actually subtly incorrect even though it seems to behave 
correctly in test runs ? 
- Is there an alternative setup offering the same benefits which I have 
missed ? 

The routees are very heavily IO bound, I don't really care about the 
performance offered by the routers, but I would much prefer not to have to 
reimplement the pool tracking logic myself.

Thank you !
Jean

-- 
>>>>>>>>>>      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