Closing comments

There are a few final comments that I wanted to make about the code that we refactored in this chapter. I feel that these things needed a little further explanation, so you're not left scratching your head.

The first thing that I wanted to comment on is the fact that I did not do the single-entity lookup inside the read model even though this is technically a lookup operation. I felt that the single-entity lookup, by ID, should always return the most current state of that entity, and the read model won't guarantee this. It's always possible that the read model is slightly behind the write model due to the nature of how it's built. This was a judgment call that I made, going for being pragmatic versus being a purist.

The purist would ...

Get Mastering Akka 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.