Microsoft also published a good series of articles on DDD / CQRS / Hexagonal architectures [1]. I especially like the diagrams of dependencies between layers on that linked page.
[1] https://docs.microsoft.com/en-us/dotnet/architecture/microse...
[1] https://docs.microsoft.com/en-us/dotnet/architecture/microse...
So the application layer is the one that manages specific dependencies and injects them into the service layer and the service layer then goes:
- okay, when asked to disburse a loan - I construct a domain object for the loan - If the object is valid, I make a sync call to deposit the money - I then persist the loan - I then send a notification that a loan is disbursed
And it doesn't really know how the RPC, the notification, or the persistence layer actually work.