Book Image

Akka Essentials

By : Munish K. Gupta
Book Image

Akka Essentials

By: Munish K. Gupta

Overview of this book

<p>Developers/Architects need to manage the fine balance between the ever increasing load and ever decreasing response latency. Applications need to be designed for Internet scale, which means you need to be skilled in building large distributed, scalable, and concurrent applications. Whether you are building the next Facebook or working for a Fortune 500 organization, you need to be ready to design scalable, concurrent, and fault-tolerant applications. Akka is a toolkit and runtime for building highly concurrent, distributed, and fault-tolerant event-driven applications on the JVM.<br /><br />"Akka Essentials" will show you the current challenges with Java Scalability and concurrency model and how Akka&rsquo;s Actor Model can help you design and build applications that are inherently scalable and fault-tolerant. Whether you are building new applications or want to refactor an existing application, you will learn the right techniques to build and scale up in no time.</p>
Table of Contents (19 chapters)
Akka Essentials
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Introduction to Akka
Index

Application requirements


For our first Akka application, we are going to implement the Word Count using the MapReduce method. The premise of the application is to accept complete sentences as a string and count the number of words across the input sentences.

We will take certain English sentences and run them through our Word Count Map Reduce application to count the number of occurrences of each word. The overall application will be broken into multiple tasks, such as performing specialized computations and computing the word count. The following diagram explains the different computational duties that will be assigned for each of the tasks:

Each sentence goes through the notions of the following:

  • Map task: It is defined as mapping the words within the sentence. We count the actual words in the sentence and discard certain STOP words such as "a", "is", "the", "to", and so on. For the selected words, we assign the numerical count value of 1. Subsequently, the list is passed on to the Reduce...