Passing
information from smaller to larger services
Information
and data need to be passed from elementary services to composite
services
or process services. The following list names different mechanisms that can
be
applied for this:
- Request/reply: In this message exchange, a service consumer invokes a service by sending a request message; for example, a composite service that invokes an elementary service. The invoked service responds by sending a reply message that can contain information for the service consumer to act upon. In this case, the data can be used by the composite service. This type of invocation is synchronous, meaning the consumer is blocked between the time the request was made and the time the reply was received. The following figure shows a request/reply message exchange:
-
· Callbacks: Next to synchronous request/reply messages, services can also define callback operations in their interface. When using callbacks, the consumer sends the request and can continue with other activities. At some later point in time, the service that was invoked can send the response as a callback message to the consumer. Callbacks are used when consumers invoke long-running processes. Callbacks still introduce coupling between services, although this is made explicit by denoting operations as callbacks. The following figure shows a callback message exchange.