Skip to Content
Applied Akka Patterns
book

Applied Akka Patterns

by Michael Nash, Wade Waldron
December 2016
Intermediate to advanced
198 pages
5h 45m
English
O'Reilly Media, Inc.
Content preview from Applied Akka Patterns

Chapter 5. Good Data Flow

In Chapter 4, you saw some of the ways that you can implement individual actors and some of the pitfalls you can encounter when doing so. Now you need to consider how you can use those actors to build up systems. A single actor alone isn’t much help to us. It’s only by combining them that we unlock the real potential of Akka. In this chapter, we take a look at some patterns to follow when using multiple actors. We also introduce the concept of Akka Streams, which provides a domain-specific language for streaming messages.

Throughput Versus Latency

Before we go too far discussing how to combine actors effectively, let’s digress briefly to talk about throughput versus latency.

When we measure our code to determine its performance characteristics, often we are measuring how long a particular action takes. We measure from the moment that action is initiated, to the moment it completes. It might take 10 milliseconds or perhaps 10 seconds. In either case, we call this latency.

Sometimes, instead of measuring how long a particular action takes, we will instead measure how many actions can occur in a specific amount of time. Here we aren’t concerned with how long each individual action takes, just how many of them we can complete within a fixed amount of time. For example, we might measure how many actions we can perform in 10 seconds. In this case, we are measuring throughput.

Whether you measure latency or throughput, you always need to look at the values ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Akka

Effective Akka

Jamie Allen
Akka in Action

Akka in Action

Rob Williams, Raymond Roestenburg, Robertus Bakker
Akka Cookbook

Akka Cookbook

Vivek Mishra, Héctor Veiga Ortiz
Akka in Action video edition

Akka in Action video edition

Raymond Roestenburg, Rob Bakker, Rob Williams

Publisher Resources

ISBN: 9781491934876Errata Page