SOA Pattern of the Week (#4): Service Normalization
Join the DZone community and get the full member experience.Join For Free
like data normalization, the service normalization pattern is intent on reducing redundancy and waste in order to avoid the governance burden associated with having to maintain and synchronize similar or duplicate bodies of service logic.
when designing data architectures, you can easily end up with different databases or even different database tables containing the same or similar data. this has been the root of many well documented data maintenance and quality issues that helped establish data normalization as widely accepted data modeling best practice. on a fundamental level, the aim of data normalization is to reduce data redundancy to whatever extent possible. this forces any applications that need to use a specific type of data to access it in one location. therefore, by eliminating data redundancy, data normalization also promotes data reuse.
reusability is, of course, also a primary goal of service-orientation. so much so that one of its eight principles (the service reusability principle ) is dedicated solely to enabling this quality in services. service normalization is one of many patterns that support service reusability, but its goals go beyond that. like data normalization, the service normalization pattern is intent on reducing redundancy and waste in order to avoid the governance burden associated with having to maintain and synchronize similar or duplicate bodies of service logic.
to accomplish this, service normalization essentially draws lines in the sand that establish the boundaries of services so that they do not overlap. unlike data normalization, service normalization is not limited to data. its primary concern is the normalization of functional service boundaries. therefore, you will usually find yourself applying this pattern during the service modeling stages, when services are first conceptualized.
one of the most important aspects of understanding the practice of normalizing services is the actual scope or boundary in which the normalization effort is carried out. as we explained in the previous installment in this series, the domain inventory pattern enables you to establish multiple collections of independently standardized and governed services within the same it enterprise. these service inventories (or “continents of services” as they are sometimes referred to) correspond to domains that still allow you to achieve service-orientation goals to a meaningful extent.
a service inventory blueprint is also defined during the analysis and modeling stages and the boundary of a given blueprint typically determines the scope at which service normalization is applied. this means that you are allowed to have overlapping service boundaries and redundant service logic, as long as it occurs across domain service inventories (not within a given service inventory).
the rules established by service normalization make their way into service modeling processes and overall service delivery methodologies. avoiding functional overlap becomes a constant consideration and often forms the basis of a dedicated process step (especially for modeling processes that are carried out iteratively). it is also one of those considerations that needs to be tracked and coordinated when you have different teams working in parallel to model services for the same service inventory.
yet despite best efforts, functional overlap still can happen. something may get missed within the service inventory blueprint and services with similar capabilities are then inadvertently built. or, there may even be hard constraints that prevent this pattern from being fully applied, such as when different services need to encapsulate legacy systems that themselves cannot be normalized. in this case, there may be embedded or entrenched logic that unavoidably leads to an extent of redundancy. then, of course, there is the performance issue. you may run into a situation where delivering fully normalized services will impose unreasonable runtime latency and the only way out of it is to intentionally design some measure of denormalization into the services.
while you can add a real world twist and interpret this pattern as “within a given service inventory, no two service boundaries can overlap, and if they do, there better be a darn good reason for it!”, the point is that the overarching objective of service normalization is to establish a solid foundation in support of the many goals of service-orientation.
the soa pattern of the week series is comprised of original content and insights provided to you courtesy of the authors and contributors of the soapatterns.org community site and the book “soa design patterns” (erl et al., isbn: 0136135161, prentice hall, 2009), the latest title in the prentice hall service-oriented computing series from thomas erl ( www.soabooks.com ).
Published at DZone with permission of Herbjörn Wilhelmsen. See the original article here.
Opinions expressed by DZone contributors are their own.