Rory, Awesome. That was helpful. Thanks a lot for the response. I will definitely look into the coursera course.
Regards, Sridhar. On Thursday, December 19, 2013 6:25:15 PM UTC-8, Sridhar Sreenivasan wrote: > > Hi, > Iam new to Akka, and have been designing an application in > akka(2.2.3)/scala. Gist of the application is to poll for files from > external source every minute, process the file (read) and send it for > downstream processing. > I have a master actor, that creates region pollers (the external source > can be located in multiple geo regions). The region pollers then polls for > files in the specific region and creates child actors that processes the > files. > Current mechanism- > 1. MasterPoller created and scheduled periodically, by sending a message > in a Main > 2. The MasterPoller actor creates the RegionPoller actor upon receiving > the message > 3. The RegionPoller creates the FileWorker actors upon receiving the > message > 4. FileWorker processes the files. > > First question, is this an acceptable pattern of creating actors within > the "receive" method. Or should it be created as part of the "preStart" of > each actor. Should I terminate the actors in step 3. and 2. after > processing? Or if I don't, will they be reused when the MasterPoller > creates the actors again? I fear that with the implementation I currently > have, the number of actors are going to be incremented with no explicit > "stop". But what's the performance impact of stopping the actors, and > recreating them? > Secondly if I create the actors as part of "prestart" then they will be > reused. But in the case where FileWorker is processing, and then the > MasterPoller is scheduled for the next run, and sends a message to > RegionPoller. When RegionPoller sends the message to FileWorker, it's going > to be blocked, right? > Any suggestions on what the best practices are? > > Regards, > Sridhar. > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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/groups/opt_out.
