We made great strides in this chapter and cleaned up some of the issues mentioned in Chapter 1, Building a Better Reactive App. We have a richer application model now thanks to our DDD approach, which addresses the concerns from the Assessing the application's domain model section, in Chapter 1, Building a Better Reactive App. We also removed that ugly cross-domain transaction for inventory allocation, addressing the concerns from the Avoiding cross-domain transactions section, in Chapter 1, Building a Better Reactive App. Even though we addressed some concerns, there are a few things with the current state of the code that are worth mentioning as areas that need improvement.
For starters, there's a lot of hand-rolled lifecycle related code in EntityActor
that I feel can go away if it is handled by a framework, preferably Akka. Also, I sort of feel like I reinvented EJB there, and that's not really a good feeling. Thankfully, Akka Persistence, and its...