Mastering Akka

Master the art of creating scalable, concurrent, and reactive applications using Akka
Preview in Mapt

Mastering Akka

Christian Baxter

Master the art of creating scalable, concurrent, and reactive applications using Akka

Quick links: > What will you learn?> Table of content

Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Mastering Akka Book Cover
Mastering Akka
$ 39.99
$ 28.00
Akka Essentials Book Cover
Akka Essentials
$ 29.99
$ 21.00
Buy 2 for $35.00
Save $34.98
Add to Cart

Book Details

ISBN 139781786465023
Paperback436 pages

Book Description

For a programmer, writing multi-threaded applications is critical as it is important to break large tasks into smaller ones and run them simultaneously. Akka is a distributed computing toolkit that uses the abstraction of the Actor model, enabling developers to build correct, concurrent, and distributed applications using Java and Scala with ease.

The book begins with a quick introduction that simplifies concurrent programming with actors. We then proceed to master all aspects of domain-driven design. We’ll teach you how to scale out with Akka remoting/clustering. Finally, we introduce Conductr as a means to deploy to and manage microservices across a cluster.

Table of Contents

Chapter 1: Building a Better Reactive App
Understanding the initial example app
Working with the example application
So what's wrong with this application?
Summary
Chapter 2: Simplifying Concurrent Programming with Actors
Understanding the actor model's origin
Differentiating concurrency and parallelism
Using Akka actors for safe concurrency
A word on dispatchers in Akka
Mailbox types in Akka
Refactoring a bad actor to FSM
Testing your Akka actors
Summary
Chapter 3: Curing Anemic Models with Domain-Driven Design
What is DDD?
Identifying anemic vs rich models
Designing our DDD refactor
Understanding the refactored bookstore code
Fixing the transaction in the order creation process
Improvements needed for the refactor
Refactoring homework
Summary
Chapter 4: Making History with Event Sourcing
Event sourcing primer
Akka Persistence for event sourcing
Using Cassandra for our persistent store
Refactoring the inventory management module
The refactored sales order processing module
Refactoring homework
Summary
Chapter 5: Separating Concerns with CQRS
A brief history of CQRS
CQRS in the event sourced world
Designing our read model implementation
Implementing the Book read model
Refactoring sales order processing
Playing around with the new application
Refactoring homework
Closing comments
Summary
Chapter 6: Going with the Flow with Akka Streams
Understanding the Reactive Streams API
The Akka Streams API
Refactoring the view building code
Refactoring homework
Summary
Chapter 7: REST Easy with Akka HTTP
Creating RESTful HTTP interfaces
Comparing Akka HTTP to Spray
Creating RESTful interfaces with Akka HTTP
Invoking RESTful APIs with Akka HTTP
Refactoring homework
Summary
Chapter 8: Scaling Out with Akka Remoting/Clustering
Using Akka Remoting
Using Akka Clustering
Using clustering in the bookstore application
Summary
Chapter 9: Managing Deployments with ConductR
An overview of ConductR
Installing and setting up ConductR locally
Using the ConductR CLI
Preparing your services for ConductR
Refactoring the bookstore for ConductR
Building and deploying the bookstore bundles
Testing the bookstore modules in ConductR
Summary
Chapter 10: Troubleshooting and Best Practices
Refactoring retrospective
Troubleshooting and best practices for actors
Troubleshooting and best practices for Akka HTTP
Troubleshooting and best practices for Akka Clustering/Akka Remoting
Further reading
Summary

What You Will Learn

  • Use Akka actors to enable parallel execution
  • Build out domain-driven design based components like entities and aggregates
  • Respond to command requests on that aggregate root that affect the internal state
  • Leverage Akka Persistence, protobuf and Cassandra to save the persistent state of you entities
  • Build out complex processing graphs with the Graph Builder DSL
  • Understand the dynamic push/pull nature of backpressure handling within Akka Streams
  • Route HTTP requests to an actor and return a response
  • Deploy actor instances across a set of nodes via ConductR for high availability

Authors

Table of Contents

Chapter 1: Building a Better Reactive App
Understanding the initial example app
Working with the example application
So what's wrong with this application?
Summary
Chapter 2: Simplifying Concurrent Programming with Actors
Understanding the actor model's origin
Differentiating concurrency and parallelism
Using Akka actors for safe concurrency
A word on dispatchers in Akka
Mailbox types in Akka
Refactoring a bad actor to FSM
Testing your Akka actors
Summary
Chapter 3: Curing Anemic Models with Domain-Driven Design
What is DDD?
Identifying anemic vs rich models
Designing our DDD refactor
Understanding the refactored bookstore code
Fixing the transaction in the order creation process
Improvements needed for the refactor
Refactoring homework
Summary
Chapter 4: Making History with Event Sourcing
Event sourcing primer
Akka Persistence for event sourcing
Using Cassandra for our persistent store
Refactoring the inventory management module
The refactored sales order processing module
Refactoring homework
Summary
Chapter 5: Separating Concerns with CQRS
A brief history of CQRS
CQRS in the event sourced world
Designing our read model implementation
Implementing the Book read model
Refactoring sales order processing
Playing around with the new application
Refactoring homework
Closing comments
Summary
Chapter 6: Going with the Flow with Akka Streams
Understanding the Reactive Streams API
The Akka Streams API
Refactoring the view building code
Refactoring homework
Summary
Chapter 7: REST Easy with Akka HTTP
Creating RESTful HTTP interfaces
Comparing Akka HTTP to Spray
Creating RESTful interfaces with Akka HTTP
Invoking RESTful APIs with Akka HTTP
Refactoring homework
Summary
Chapter 8: Scaling Out with Akka Remoting/Clustering
Using Akka Remoting
Using Akka Clustering
Using clustering in the bookstore application
Summary
Chapter 9: Managing Deployments with ConductR
An overview of ConductR
Installing and setting up ConductR locally
Using the ConductR CLI
Preparing your services for ConductR
Refactoring the bookstore for ConductR
Building and deploying the bookstore bundles
Testing the bookstore modules in ConductR
Summary
Chapter 10: Troubleshooting and Best Practices
Refactoring retrospective
Troubleshooting and best practices for actors
Troubleshooting and best practices for Akka HTTP
Troubleshooting and best practices for Akka Clustering/Akka Remoting
Further reading
Summary

Book Details

ISBN 139781786465023
Paperback436 pages
Read More

Read More Reviews

Recommended for You

Akka Essentials Book Cover
Akka Essentials
$ 29.99
$ 21.00
Scala High Performance Programming Book Cover
Scala High Performance Programming
$ 35.99
$ 25.20
Spring Microservices Book Cover
Spring Microservices
$ 39.99
$ 28.00
Scala Design Patterns Book Cover
Scala Design Patterns
$ 43.99
$ 30.80
Fast Data Processing Systems with SMACK Stack Book Cover
Fast Data Processing Systems with SMACK Stack
$ 39.99
$ 28.00
Learning Concurrent Programming in Scala - Second Edition Book Cover
Learning Concurrent Programming in Scala - Second Edition
$ 35.99
$ 25.20