Hi Brice, I'm not sure I understand what you want to do, but a Group does not create routees by definition. A Pool does that. Have you explored creating a custom router with the Pool trait?
Each routee in a Pool must be constructed from the same Props. That might be what you think is missing. Have you measured/verified that an ordinary actor with RoutingLogic is your bottleneck? /Patrik On Tue, May 13, 2014 at 10:43 AM, Brice Figureau <[email protected]>wrote: > Hi Roland, > > On Thu, 2014-05-08 at 13:41 +0200, Akka Team wrote: > > Hi Brice, > > > > > > the Routers (as in those which bypass the head actor’s mailbox) are > > meant for a very specific use case, and their optimizations come with > > certain restrictions as you discover. What you want to achieve can be > > done by using the RoutingLogic inside a regular router, which gives > > you all the flexibility you need to create the routees as you want. > > So the only answer is to have a head actor that will queue the messages > before routing them with a RoutingLogic (this is how I solved the > problem for the moment), unlike a regular akka router. > > This is a very important router in this specific project that sees a lot > of traffic, so if it could benefit of the the "no-queueing" mechanism of > routers, that would be great. > > This looks like a regression to me, as it has been possible to do that > since at least akka 2.0. It wouldn't be that hard to create a special > Group that allows to instantiate the routees instead of providing a list > of path. > > This could just be something along the line of (warning pseudocode): > > trait CustomGroup extends Group { > override def paths = List() > def routees(context: ActorContext): immutable.IndexedSeq[Routee] > } > > And the creation logic in the RouterActorCell could just be: > > case group: Group => > val paths = group.paths > if (paths.nonEmpty) > addRoutees(paths.map(p ⇒ group.routeeFor(p, > this))(collection.breakOut)) > else { > addRoutees(group.routees(this)) > } > > I can't do that myself because everything is locked down with > private[akka]. > > What do you think? > > -- > Brice Figureau > My Blog: http://www.masterzen.fr/ > > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw JOIN US. REGISTER TODAY! <http://www.scaladays.org/> Scala <http://www.scaladays.org/> Days <http://www.scaladays.org/> June 16th-18th, <http://www.scaladays.org/> Berlin <http://www.scaladays.org/> -- >>>>>>>>>> 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.
