In this blog, we will explore a Hybrid Message Interaction pattern, which combines the characteristics of traditional Synchronous Request-Reply and Asynchronous patterns. We will also see, the need for such a design pattern and how it can be implemented using Oracle SOA Suite.
A Hybrid Synchronous-Asynchronous message exchange pattern is a requirement that pops up often in architectural discussions at customer engagements. The below discussion summarizes the need for such a design pattern.
Consider the following scenario:
A Web Client end-user fills in a form and submits a request. This is a blocking request and the client waits for a reply. The process is expected to reply to the user within a short period and let us assume that the client times out after 30 seconds. In a happy path, the backend systems are responsive and user receives the response within 30 seconds. This is shown in the below ‘Synchronous – Happy Path’ diagram.
Now, consider if a backend delay or system outage prevents a response from the website within 30s. All that the client receives is a Timeout Error. No further information is available and the user can only refill and resubmit the form, another time! This is shown in the below ‘Synchronous – Not so Happy Path’ diagram.
The above solution is designed for the happy path. It can even be optimized for a high throughput in the happy path scenario. But for the negative path, it is desirable to have a more responsive and user friendly behavior. We should note that any design for the negative scenario would inherently be Asynchronous in nature, as we do not want the user to wait for the delayed response. Rather the user should be notified by other means whenever such a response is available.
Even though the percentage of requests that end up in the delayed scenario may be quite less, it is still desirable that such requests are handled in a more user friendly manner. We also want to achieve the Asynchronous error handling without sacrificing the high performance of a purely synchronous interaction.
The next section proposes such a design. Read the complete article here.
For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.