Book Image

Mastering Akka

By : Christian Baxter
Book Image

Mastering Akka

By: Christian Baxter

Overview of this book

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 (17 chapters)
Mastering Akka
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface

Designing our DDD refactor


Before we get started with laying out the DDD refactor, it bears mentioning that as the code stands right now, DDD is probably a bit much for it. A DDD approach is good for complex domains and large systems, neither of which can really be said about the current bookstore app. You sort of have to use your imagination here and visualize this app being developed by multiple teams within a large organization, with each module being owned by different teams. With that kind of backdrop in place, a refactor like this makes more sense and is a better fit for the DDD problem set.

The two major goals for our refactor are as follows:

  1. Enrich the model and have it be more representative of the problem domain, using DDD building blocks such as entities and aggregates.

  2. Split the application into four separate bounded contexts for customer management, inventory management, credit processing, and sales order processing.

Before we jump into the code, it makes sense to do a little modeling...