Hi, When you are working with actors it always helps to imagine if you would try to solve a problem with ordinary people.
In your case the question would be "If I have n people on my team, and I need to give them a part of a bigger task, how can I see that some of them take too long to complete it?" There are many options, but a few - maintaining a spreadsheet of workers and their tasks, and their expected finish time. The boss then would periodically check this table and look for the ones that have not yet responded but their deadline passed -- this would mean in your case that the parent of JobActors maintains a Map which it periodically checks, reaping the actors that did not reply in time. - telling the workers to answer back at a specific time if they have still not finished their jobs and then the boss decides what to do next -- this would mean in your case that the JobActors schedule a self-message that they receive after the deadline elapses. When they get that message they can signal to their parent that the job timed out so that the parent can do something about it. There are many variations of this pattern, the job actors can for example immediately stop themselves when the timeout happens, or just generate a message, or generate a supervision event, etc. -Endre On Thu, Aug 28, 2014 at 12:36 PM, ccirim <[email protected]> wrote: > Hi to all! > > I have found this article ( > http://techblog.net-a-porter.com/2013/12/ask-tell-and-per-request-actors/) > that is exactly my application in "ask pattern". > Now, I trying to change my code in "tell pattern", but I have a little > problem to management timeout. > > My scenario: > > - SystemActor (ask pattern) > - DirectorActor (tell pattern) > - ExecutorAndAggregatorJobActor (tell pattern (before ask > pattern)) (setTimeout here) (per Request) > - JobActor1 > - JobActor2 > - JobActor3 > - ... > - JobActorN > - PrepareOutputActor > - ExecutorFormatterActor (ask and tell pattern) > - FormatterActor1 > - FormatterActor2 > - ... > - FormatterActorN > > > 1 - How I see JobActors that reach timeout? > 2 - I have mandatory and optional JobActors. How I can ignore optional > jobs if reach timeout? (if I know JobActor in timeout I can do this!) > > -- > >>>>>>>>>> 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. > -- Akka Team Typesafe - The software stack for applications that scale Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> 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.
