0

Given the microservices pattern is the decomposition of software by business capability with ownership of state, and a single customer view is an aggregated, central, "single" data store of all customer data that can be used to drive application functionality, are these two patterns able to live together or are they incompatible? If they can live alongside each other, how do you reconcile the apparent contradiction between mono (SCV) vs poly (MSA)?

EDIT:

An example of what needs reconciling, you could have a service responsible for contact information, holding your Customer’s postal address. A SCV by definition holds all customer data, which pretty much could cover the entire estate of data and all state owned by micro services - most data is linked to a customer. Should I query the micro service - the owner of the state and business behaviour - for the customer’s address or should I query the SCV which has aggregated all data associated to a customer. What would be the advantage of having both of these systems in place given the increased complexity and duplication?

MrPanucci
  • 109

1 Answers1

1

Yes, they can co-exist.

Both things exist for different, non-contradictory reasons. Microservices exists usually for scaling purposes, either organizationally or technically. To do this, the microservices have to be as independent as possible, optimally with no communications between them, each handling their respective functionality completely on their own. Integrating through the UI for example, or at the worst case have only off-line fire-and-forget type communications.

Having a unified store of customer data is for requirements in the area of data mining / machine learning, etc. This could be easily off-line wrt the services. I.e. microservices can transmit different types of data (live, historic, static, etc.) completely without impacting their functionality i.e. without compromising on their independence.

Again, your architecture should be shaped by your requirements. There is no inherent "advantage" to any of this. If your requirements demand you to do either or both, then you are "justified" in doing it.