Hi Jean,

your description very much sounds like an Actor should be handling the pool, 
not a router. You can use the DefaultResizer stand-alone (for determining what 
to do) and you can also use the RoundRobinRoutingLogic stand-alone (for 
determining where to send to); then the only missing piece is to place these 
inside an Actor that will then start new Actors (easy) or stop Actors in a 
coordinated fashion (straight-forward: just send a termination request and take 
it out of the list of routees you pass into the RoutingLogic).

Regards,

Roland

> 13 jan 2015 kl. 10:26 skrev Jean Helou <jean.he...@gmail.com>:
> 
> 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/ <http://akka.io/docs/>
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
> >>>>>>>>>> <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 akka-user+unsubscr...@googlegroups.com 
> <mailto:akka-user+unsubscr...@googlegroups.com>.
> To post to this group, send email to akka-user@googlegroups.com 
> <mailto:akka-user@googlegroups.com>.
> Visit this group at http://groups.google.com/group/akka-user 
> <http://groups.google.com/group/akka-user>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
twitter: @rolandkuhn
 <http://twitter.com/#!/rolandkuhn>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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