Service Selector is a service implementation pattern which allows multiple implementations of the same service interface to be grouped behind a single endpoint address. Different service implementations can offer different qualities of service or behaviours, and each client request can be matched to a particular implementation according to their requirements or priority.
You can use this pattern to:
The set of service providers is virtualized by deploying an Enterprise Service Bus (ESB) mediation which implements the same interface as the service providers. This mediation implements the required logic to select a specific endpoint based on the context and content of each client request, and then routes the request to the selected service provider. Clients see only the virtual service provided by the mediation, which to them seems to be the actual provider of the service.
The service mediation can implement a number of additional features, including:
The following diagram illustrates an example of a Service Selection scenario:
The solution is to implement a mediation flow that contains the following:
The request flows map each inbound request to one of multiple pre-configured service provider endpoints.
In addition, you have the option to log and trace the request and response messages.