Well, the most important part is that, given the scale, you want at least one Actor *per file*. Likely more than one -- depending on the DB you are using, you may well want a separate Actor for the DB operations, assigned to a different Dispatcher. (DB operations are often blocking, and it's important that blocking operations be on an Actor that is using an appropriate Dispatcher for that.)
You *could* implement each step as a separate Actor, if that makes sense from a logic POV, but I don't see any obvious benefit to that. It's much more important to have separate Actors per-file, so that they can parallelize. (Unless you actually want that to be sequential, but it's going to be hard to achieve scale that way.) On Sun, Aug 21, 2016 at 9:09 AM, Akash Thomas <thomas.ak...@gmail.com> wrote: > Hi All, > > I am new to Akka and Actor model. I have the below use case - can you > review and suggest how to split the tasks between actors? > > *Use case* > > *Step 1* : receive a file list from an external service > *Step 2 : **for each file in the list * > * {* > a. download file through rest api > b. extract content from file > c. perform few operations on the content and store > results in DB > d. store content itself to DB > e. store downloaded file to file system > f. update status in DB > * }* > > This has to be done in scale. Roughly for a million documents a day. > > Do you think each step inside the loop can be implemented as a separate > actor? Is that approach correct? > > Thanks > Akash. > > > > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.