Request-Response Patterns used in SOA
Following are the most popular Request Response Patterns used in SOA:-
- One Way Message - Here the client doesn't require the response at all. It's used to implement the 'ping' type services where the client simply pings a piece information (for example, one server acting as a client may ping to another server that it's up and running or any other info for that matter) to the server and the communication terminates. In BPEL, it's implemented using one Invoke activity.
- Synchronus Interaction - Here the connection is maintained till the response reaches the requester. In BPEL, it's normally implemented with one Invoke activity at the Consumer end and one Receive & one Reply activity at the Provider end.
- Asynchronous Interaction - In this case the consumer requests and goes into a blocking call, but the Provider doesn't maintain the connection and responds as per its convenience. In BPEL, it's implemented with one Invoke & one Receive activity at the Consumer end and one Receive & one Invoke at the Provider end as well.
- Asynchronous Interaction with Timeout - Here the Consumer go into the blocking call only till the Timeout expires (or if the response reaches in the mean time it resumes the execution). In BPEL, it's implemented with one Invoke & one Pick at the Consumer end and one Receive & one Invoke at the Provider end. In the Pick ACtivity, we can specify the timeout period.
- Asynchronous Interaction with Multiple Mandatory Responses - Mandatory responses mean we can't you the concept of timeout here. So, Receive activity will be used here and not the Pick activity. In BPEL, it can be implemented with one Invoke & Multiple Receive activities at the Consumer end and one Receive & Multiple (the same number as the number of Receive at the Consumer end) Invoke activities at the Provider end.
- Asynchronous Interaction with Notification Timer - Unlike the Async with Timeout, the Consumer doesn't unblock and keeps waiting for the response, but it raises notifications after certain time periods. In BPEL, it can be implemented with one Invoke & one Receive (with OnAlarm for notification) at the Consumer end and one Receive & one Invoke at the Provider end.
- Asynchronous Interaction with a Mandatory Response(s) and an Optional Response(s) - For the mandatory response, we'll those many Receive activities at the Consumer end and the same number of Invoke activities at the Provider end. For optional responses we need to use onMessage at the Consumer end Optional Invoke(s) at the Provider end.
No comments:
Post a Comment