Preface

Who is this book for?

This book was written to act as a tour guide for newcomers to Akka. I'm assuming that you have perhaps heard of Akka, maybe read an article or blog post or two about it, but you don't  really have your bearings with it. My goal is that, by the time you've finished reading this, you're able to navigate your way around Akka without feeling like you've plunged in at the deep end.

I'm writing this book focusing solely on Akka's Scala API. If you are coming from a background in an object-oriented language such as Java, C#, or Ruby, you should be able to work through a couple of short tutorials on Scala and gain enough understanding to follow along. None of the features I'll be describing require understanding of the deeper details of Scala, so a basic reading-level familiarity should be sufficient.

If you are looking for good places to start, I've provided a handful of resources in the Appendix. Similarly, I've given a list of books, articles and blog posts that dive more deeply into the topics I discuss so that you can, when you're ready, find the material that will help you move towards an expert-level understanding of this material. But keep in mind that the only real expertise comes from actually working with the tools you are given. Plan to spend time and effort and you will gain mastery.

Why did I write this?

The idea to write this book came about when I was trying to think of a way to help manage a problem I've seen since first becoming part of the Akka community. If you lurk on the Akka IRC channel (#akka on Freenode), it's not at all uncommon to have people drop in and ask some pretty basic questions about getting started with Akka. You might even say it's a common occurence. Similarly, a lot of the questions that appear on the mailing list turn out to be rather simple issues based on basic misunderstandings about how Akka works.

Many of the questions I hear are about integrating Akka into existing projects, figuring out what actor-thinking is all about (though newcomers don't usually phrase it that way), or trying to understand some fundamental concept that perhaps got missed in the requestor's perusal of the documentation provided by the Akka team.


 A brief aside about the Akka docs

To be clear, the Akka docs are simply fantastic. If anything, they set a standard that I hope more projects aim for as they consider how to compile their documentation. But they present a couple of problems for the newcomer. The documentation is largely organized as a reference. There is a getting started section, but it's fairly brief and doesn't walk through the process of putting together an Akka application beyond a pretty basic level. The documentation is essentially feature-oriented, but if you don't know what feature it is that you need, you might be lost unless you read the whole thing and spend a lot of time experimenting. If you're reading a map and you don't know what the symbols mean, you're going to get lost; it's as simple as that.


 

Why you should read this?

If you're dealing with problems that inherently involve concurrency and running into trouble, you may have run across references to Akka on some blog post, a mailing list, or maybe at some user group meeting. But, honestly, unless you've encountered the actor model before either by working with some other actor-based system (e.g., Erlang, Kilim, Celluloid, Actorom, etc.), you're likely to be confused when you first try to dig in and get your bearings.

The hardest part for a lot of people to understand is that Akka is a toolkit with a number of very powerful tools that can scale up or down from very small tasks to very, very large ones. Understanding how to pick out the smallest bits first and add on what you need, as you need it, is not always so obvious.

My goal is to walk through some simple examples, building up a body of knowledge about the most important features Akka provides. In some cases, I'll take these examples further and build on them where it makes sense and in other cases I'll present short, self-contained examples to highlight particular functionality. My hope is that, in the end, you can take what you learn here and start building your own Akka-based system, leaning on the existing documentation when you need more in-depth information.

Acknowledgements 

First, I want to thank both the Scala and Akka communities for the generosity and support they have given me over the last few years. I have never encountered a community that was so full of intelligent, yet humble and helpful people. I also could not have produced the work you are reading with out the time and work of my reviewers: Jamie Allen, Scott Clasen, Scott Parish, Dave Rostron, Tymon Tobolski, and, most importantly, Viktor Klang, who provided extensive feedback and notes to improve what I have put together here. Please keep in mind that any remaining errors are my own.

I should also thank Roland Kuhn, who has repeatedly been of great assistance on the mailing list and the Akka IRC channel, and, of course, Jonas Bonér, who had the great vision to create this incredible toolkit I describe here, and the rest of the Akka team for all their amazing work. Oh, and thanks to Brendan McAdams for being a constant shoulder to lean on when I was feeling like I had perhaps dived in a bit too deep.

Finally, I would not be able to get through a single day, whether writing this book or otherwise, without my amazing, inspirational wife, Nicole, and our fun-loving, loyal, and ever cuddly dogs, Maggie and Harvey. This work is also dedicate to the memory of our wonderful canine friends who had since passed on: Ida, Alfie, Henry, and Oscar.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.70.170