Jump to ratings and reviews
Rate this book

Applied Akka Patterns: A Hands-On Guide to Designing Distributed Applications

Rate this book
When it comes to big data processing, we can no longer ignore concurrency or try to add it in after the fact. Fortunately, the solution is not a new paradigm of development, but rather an old one. With this hands-on guide, Java and Scala developers will learn how to embrace concurrent and distributed applications with the open source Akka toolkit. You’ll learn how to put the actor model and its associated patterns to immediate and practical use. Throughout the book, you’ll deal with an analogous workforce how to schedule a group of people across a variety of projects while optimizing their time and skillsets. This example will help you understand how Akka uses actors, streams, and other tools to stitch your application together.

195 pages, Paperback

First published April 25, 2016

8 people are currently reading
70 people want to read

About the author

Michael Nash

47 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (27%)
4 stars
15 (41%)
3 stars
9 (25%)
2 stars
2 (5%)
1 star
0 (0%)
Displaying 1 - 5 of 5 reviews
5 reviews
December 28, 2016
I skimmed through the table of contents and was initially going to read only one chapter, but damn, this book turned out to be excellent and I had to read it cover to cover.

When I first started learning Akka I had so many questions and there was no one to answer.

Should entire system be based on actor model or can I just use it in parts of it? How to deal with blocking operations? When to use futures and when to use actors? How does DDD fit into akka? How to monitor and find bottlenecks in akka based system? Which operations deserve separate dispatcher? “Tell don’t ask” - when should I use ask then? Which supervision strategies are useful in which scenarios? I found answer to those questions on my long and painful path reading other people’s code and finding fragmented information here and there.

The book answers all those questions and many many more. It amazes me how much useful content is packed into such a small volume (200 pages). Some books leave you with more questions than you had had before you grabbed it - not this one. There were numerous times when I was reading a paragraph and thought to myself “Oh, that’s fine but what about…?” and then the answer was found right there on the next page. It almost feels like the authors took some beginner akka programmer, asked to read the chapter and write all the questions down. I also like how the book is very pragmatic - the theory is compressed to absolute minimum and almost all statements are backed up by practical examples - even chapter regarding DDD.

The book is full of useful information. Here are just some off the top of my head:

* The world is asynchronous so why model it in a synchronous way?
* When, and at what scale should you use actors
* How to implement D(distributed)DDD with akka.
* Different ways to handle state changes within an actor
* Handling long running operations within the actor
* Alternatives to using ask pattern, and when it is ok to use ask
* Where to keep message classes
* How to structure messages flow to achieve best throughput and latency
* How to prevent mailbox overflow
* Consistency vs. Scalability and how akka sharding can help with balancing them
* Isolating failures and self healing
* Preparing for failures even at the jvm level
* Maximize availability
* Find bottlenecks within jvm and akka itself

I feel like when getting started with akka you are given this massive set of tools and you have no idea which ones are best suited for certain situations, nor what are best practices. There are gazillion of resources describing what is akka and how to get started with it. What is lacking though are set of best practices and common patterns. Akka toolkit is really dangerous when put in a wrong hands. We, beginner/intermediate akka users, need those patterns and best practices compiled into one resource to protect against those mistakes. I think the book aims for this niche and nails it flawlessly.

One thing I missed was some kind of a bullet point list below each chapter with the most important statements. The book has so much material that I had to write my own notes, otherwise I would not be able to retain all the information.
Profile Image for Anton Antonov.
350 reviews48 followers
January 22, 2018
Applied Akka Patterns is in my opinion the de facto Akka book regarding Distributed Domain-Driven Design(ed) Systems.

Some things to get clear before getting to the actual review - this is not a book that focuses on writing code. It has the minimum amount of code snippets that are never shown to function in one app. Needlessly to say, as in **most** "Patterns" books, you can't copy-paste code snippets without providing the glue code by yourself. The focus is more on the theory, bigger picture and applicability of Akka in the design of a distributed system, which in my opinion is the right approach.

So, the actual review.

The start tackles the actor model head first in 1-2 chapters and how it's applied in Akka.
Showing different "short-comings" when mixing the Actor model with other paradigms such as FP-like Futures.

After you have the basics down, the book moves into software design issues such as achieving a good separation of actor responsibility while tackling issues with State, Complexity and "Eventual consistency" (although it's not explicitly mentioned in that part of the book). It's very important to take to heart the narrative's focus on avoiding complexity and "ask" pattern which results into highly-coupled actors. There's a second goal that's being put which is applying Domain-Driven-Design as a solution.

And at this point the book goes deep into designing distributed systems that benefit from Akka.
There are numerous patterns mentioned briefly, but I am especially fond of the focus spent on explaining how to design the consumers right. A big focus of designing distributed systems falls into the "wrong" (or let's say harder to change) places, instead of consumers. So, the book does a good service to explain basic patterns of securing a good data flow with scalability, throughput and availability in mind. Of course it's not a bag of chips, so you can't have them all at once. If you are familiar with message queue systems or distributed transactional log such as Kafka, you'll be refreshing knowledge you already have. But it's a good point for others to make a solid foundation.

As you may already know at this point, I highly recommend this book. It's very detailed in how to design distributed systems.
Profile Image for Bartłomiej Falkowski.
246 reviews27 followers
October 17, 2021
I was looking for a book from the perspective of someone who has some practical experience with actor programming but wants to gain more theoretical knowledge, patterns and heuristics for good Actor Model. TBH, this book has fullfilled my expectations.

What I liked:
- I don't use neither Akka nor Akka.NET. Even though this is a book strictly about Akka, I was able to enjoy the entire content. Obviously, there are some parts describing Akka features. However, it's not overwhelming - conlusions have always deeper sense and deliver technologically agnostic information.
- conjunction of Distributed Architecture with Actor Model and Domain Driven Design. Good examples with parent actors being aggregate roots or instructions for dividing your domain into bounded contexts
- the second part of the title is essentialy a good description of this book's message - "A Hands-On Guide to Designing Distributed Applications". Many chapters have a nice introduction into particular problem (availability, performance etc.). Actor Model and Akka are simply one of the way we can deal with them - the author recalls it from time to time.

Why not 5 stars then? I don't know... Maybe I missed something magical that makes the book mastery instead of just a solid one? I just have a feeling that 4/5 is a fair score :)

Anyway, I recommend it of course :)
Profile Image for Miloš.
67 reviews3 followers
February 25, 2020
A pretty decent book, overall - very instructive in the way of decomposing your software so that it can be effectively implemented in Akka. However, there's not much more substance to it since it only briefly touches on the other topics that it covers.

If you're like me and you've never done any Akka before, I'd say this is a good book to pick up before delving into the syntax and gritty coding/framework details - it's a fast read and will quickly get you into the right mindframe.
Profile Image for Balhau.
59 reviews5 followers
December 21, 2019
Very good book. This is a collection of good advises you should take care when implementing your actor systems. The most value you'll get from the value is not what you can do but essentially what you shouldn't do as said in the final notes. Special thanks to the authors.
Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.