me, akka and scala
I've been learning Scala recently, including through a Coursera course. I'm gradually moving from writing Java-like Scala toward thinking in terms of transformations on data. What I like so far is being able to express operations on collections without spelling out every intermediate step. Shorter code helps when it makes the flow easier to follow, but it does not automatically make a program easier to maintain. Recently, I came across Akka. It lets us organize concurrent work as actors that communicate through messages. Each actor handles one message at a time and can keep its own state. This gives us a way to separate responsibilities without having several workers directly update the same state. We still need to design how those actors coordinate. I tried a word-count program using Akka and Scala. A mapper splits sentences into words, a reducer combines their counts, and an aggregator maintains the totals. The useful part of this exercise is seeing how work moves between ...