In part 1, we outlined the problem of having to compose data from different service boundaries.
In this post we will look at some specific implementation details.
Server Side Model Composition
There are 2 key parts to this implementation of server side model composition.
- A custom HTTP request handler.
- An Interface for interceptors to populate a view model with their own data.
In a distributed software architecture we don’t typically end up with whole entities. e.g. a customer entity. What we typically see (if we have well defined service boundaries, adhering to the distributed system design fallacies and SOA tenants) is fragments of data, owned by different service boundaries.
We want to provide our end users with a meaningful way of interacting with our system, therefore we need to compose data together.