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 problem: 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.
Model software that reflects the real world with domain-driven design
Learn principles and practices for implementing individual actors
Unlock the real potential of Akka with patterns for combining multiple actors
Understand the consistency tradeoffs in a distributed system
Use several Akka methods for isolating and dealing with failures
Explore ways to build systems that support availability and scalability
Tune your Akka application for performance with JVM tools and dispatchers
Chapter 1The Actor Model
Reality Is Eventually Consistent
Deconstructing the Actor Model
All Computation Is Performed Within an Actor
Actors Can Communicate Only Through Messages
Actors Can Create Child Actors
Actors Can Change Their State or Behavior
Everything Is an Actor
Uses of the Actor Model
Defining Clear Boundaries
When Is the Actor Model Appropriate?
Chapter 2Introducing Akka
What Is Akka?
Akka’s Implementation of the Actor Model
Akka’s Actors in the Actor Model
The Akka Typed Project
Chapter 3Distributed Domain-Driven Design
The Benefits of DDD
Components of DDD
Domain Value Objects
Aggregates and Aggregate Roots
Factories and Object Creation
Chapter 4Good Actor Design
Encapsulating State in Actors
Ask Pattern and Alternatives
Commands Versus Events
Chapter 5Good Data Flow
Throughput Versus Latency
Chapter 6Consistency and Scalability
Transactions and Consistency
Strong Versus Eventual Consistency
Concurrency Versus Parallelism
Why Globally Consistent Distributed State Doesn’t Scale
Michael Nash is director of capabilities at Lightbend. For over thirty years, he has designed, developed, shipped and consulted on software development projects for clients of all shapes and sizes. As an advocate for software craftsmanship with expertise in project management and architecture, he was amongst the earliest of adopters of the Typesafe stack, with over 5 years experience working with Scala, Akka and Spray. He dedicates the majority of his spare time to working in the Typesafe Reactive Platform, speaking at conferences and writing books on the software business.
Wade Waldron is a senior consultant at Lightbend, where he works with clients to provide knowledge and expertise on the Typesafe Reactive Platform. Outside of Lightbend, he has spent the last 9 years building rock solid software and games, with a strong focus on test driven design, domain driven design, service oriented architecture, event driven architecture and agile development.
The animal on the cover of Applied Akka Patterns is a common teal or Eurasian teal (Anas crecca), a duck common throughout Europe and Asia. The color teal is named after this bird—during breeding season, males of the species have vivid blue-green plumage around their eyes. The teal is part of a group known as "dabbling ducks," which feed primarily at the surface or by upending themselves in shallow water.
The Eurasian teal is sexually dimorphic: females are primarily brown with dark bars and white-tipped tail feathers, while males have a gray body with thin, dark striations, brown and white wings, a chestnut-colored head, and the aforementioned teal eyespot. Outside of breeding season, males moult their feathers to make their coloring much less vivid (known as "eclipse plumage"). These birds are among the smallest ducks, averaging 8 to 12 inches long and around 12 ounces in weight.
Teals live in a freshwater habitat of ponds, small lakes, and wetlands. They nest on the ground in deep hollows concealed by dense vegetation. During breeding season (roughly March to May), they eat a diet of small crustaceans, insects, larvae, worms, and fish fry. At other times of year, however, teals consume aquatic vegetation and other plants. They migrate each winter to the Mediterranean, southern Asia, and Africa, and return to temperate regions in northern Europe and Asia to mate.
Many of the animals on O'Reilly covers are endangered; all of them are important to the world. To learn more about how you can help, go to animals.oreilly.com.
The cover image is from Wood's Illustrated Natural History.