SOA Patterns > REST-inspired Patterns > Entity Linking
Entity Linking (Balasubramanian, Carlyle, Pautasso)
How can services expose the inherent linkage between business entities in order to support loosely-coupled composition?
Problem
Business entities have natural relationships, yet entity services are commonly designed autonomously with no indication of these relationships. Service consumers acting as composition controllers are commonly required to have entity linking logic hard-coded in order to work with entity relationships. This limits the composition controller to any additional links that may become relevant and further adds a governance burden to ensure that hard-coded entity linking logic is kept in synch with the business.
Solution
Services inform their consumers about the existence of related entities as part of the consumer’s interactions with the services.
Application
Links are included in relevant response messages from the service. Service consumers are able to navigate from entity to entity by following these links, and accumulate further business knowledge along the way. This allows service consumers with little up-front entity linking logic to correctly compose entity services based on their relationships.
Impacts
Resource identifiers representing business entities need to remain relatively stable over the lifespan of the business entities they identify. Once an identifier is known it can be referred to in the future again by the same service consumers.
Links can be difficult to define if identifiers for business entities are specific to the services that own them. The application of Lightweight Endpoint can help achieve a uniform syntax for linked identifiers.
Links are not valuable if the service consumer is unable to access information about the linked entity. Therefore, the further application of Reusable Contract can ensure that service consumers are able to interact with linked entities.
Principles
Service Reusability, Service Abstraction, Service Composability
Architecture
Inventory, Service