Re: [akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread kk k
Thanks Justin.Yes,this design is not for large number of files but for a very limited set. It took sometime for me to get the actor model,but once I understood it I really liked it.So ,thanks for your points ,which makes me confident enough to believe that this current code is ok for my task at

Re: [akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread kk k
Mike,advise even if critical ,I would be more than happy to take it as its more oriented towards improving the code. Thanks for the detailed explanation on the router front and other points,they helped me understand a lot of finer aspects. The FSM's,I would explore more.Thanks again. On Wednes

Re: [akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread Justin du coeur
Your architecture sounds entirely reasonable as you describe it. Whether it's *optimal* really depends on the details of the problem: how many of these files you're scanning simultaneously, for example. It ought to work fine for dozens of files. It might start to bottleneck if there are thousand

Re: [akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread kk k
Thanks for that.Yes,Streams might be right. But I wanted to know if my current implementation is fine or can I tweak it further to improve based on few questions that I mentioned ? On Wednesday, November 23, 2016 at 4:24:42 PM UTC+5:30, √ wrote: > > Your use-case sounds like a perfect example of

Re: [akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread Mike Nielsen
While I'm far from an expert, and have never deployed Akka in production (so take my advice with a grain of salt, and please don't hear this as any criticism of what you've done) I use routers for a few of reasons: 1. I can control the minimum and maximum numbers of them via configuration, a

Re: [akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread Viktor Klang
Your use-case sounds like a perfect example of something which would benefit quite a bit from being based on Akka Streams. On Wed, Nov 23, 2016 at 11:25 AM, kk k wrote: > > This is my first program in akka so I wanted to know if the below program > is efficient and is using the advantages of act

[akka-user] Line count of each file in a given directory efficiently using akka

2016-11-23 Thread kk k
This is my first program in akka so I wanted to know if the below program is efficient and is using the advantages of actor model. -- The program's purpose is to scan a given directory for any files and print the number of lines in each file. 1. The main `Application` class will creat