Hi Jim, On Thu, Feb 19, 2015 at 8:18 AM, Jim Hazen <[email protected]> wrote:
> A bit of trivia came up today. Basically the question was, would it be a > good or bad idea to stick some number of actors behind a BroadcastRouter > and allow their ability to handle a message dictate whether it was routed > to them or not. For the most part, if one actor would be able to handle > the message, the others would not. This would certainly save on lines of > routing logic but there was concern that this is obviously a waste because > the all these other actors are being "spammed" with messages they then have > to look at and drop. Or do they?. > Yes, all will receive the messages. > > I think I remember reading somewhere that Actors and Routers were > optimized so that if an actor were sent a message it had no ability to > handle, that there is very little overhead in processing that message. It > doesn't hit a mailbox, doesn't get dispatched, etc. > That must be a misunderstanding. > > Is this true? Is anyone able to characterize the relative impact of > sending such a message to an actor or broadcast router with a relatively > small number of children (less then 10)? > Hard to say, you have to measure. An actor should be able to process a few million messages per second, so depending on what throughput you are talking about this may be a bottleneck or nothing to worry about. If the routees are remote it is another story. By they way, it should be more efficient to actually process the message an drop it, instead of not handling it, because unhandled messages are published to the eventStream of the actor system. /Patrik > > Thanks, > Jim > > > -- > >>>>>>>>>> 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 [image: Scala Days] <http://event.scaladays.org/scaladays-sanfran-2015> -- >>>>>>>>>> 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.
