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

Using Akka Remoting


Akka Remoting allows you to look up and communicate with actor instances that reside in actor systems which are not in the local JVM. The caller does not need to know where that actor instance itself is. They just need a reference to that actor as well as knowledge of what message(s) to send to it.

To the caller, the actor instance behind the ActorRef they are using exhibits what is referred to as location transparency. This is a technique where local calls are made to look like remote calls and is a core concept within Akka. Regardless of whether the actor you are communicating with is local or remote, the API and underlying framework are designed around the failure and error possibilities of dealing with something that is possibly remote.

By embracing location transparency, Akka forces you to think about some concepts that you might not have to consider on a purely local system. This includes things such as asynchronicity, serialization, and non-guaranteed message delivery...