9 Sharding and persistence

This chapter covers

  • Distributing actors in a cluster
  • Storing each change of the actor’s state in a database

This chapter discusses two of the seven tools used to build microservices: Akka Sharding and Akka Persistence. The others are Akka Streams, Persistence Query, Projections, HTTP, and gRPC, which you learn about in chapters 10 and 11.

These Akka tools can be used separately (and are traditionally used that way). However, they are increasingly used as a functional unit: looking at them all together helps us better understand them. We call this functional view Akka microservices (to learn more, see appendix B).

Note The source code for this chapter is available at www.manning.com/books/akka-in-action-second-edition ...

Get Akka in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.