Best implementation to reduce waits
Hi,
I'm looking to use an ESB to act as an intermediary between two SOAP-interfaced systems - 'replicating' record creates/updates between them (so either system can act as a single point of entry). The two systems are similar but record fields and formats are slightly different. However, I want to minimise the time the first system takes in waiting for the response.
When a record is added in system1, it would send a message to system2 to create a similar record. System2 would also send back it's primary key for system1 to store as a future reference. System2 would also do some duplicate checking to make sure it doesn't already exist.
Assuming a proxy is created in the ESB to represent system2 - I want to make sure there is no additional delay when the create request is initiated. This is because it will be fired when a webform submit is made by the user on system1 (adding a logic hook into the PHP code). I don't want the form submit to have to wait for system1 to save, THEN to contact system2 and wait for it's response.
What I hope I can achieve is that the submission to the ESB proxy is made and forgotten - provided the proxy responds properly. The proxy then going on to update system2. The primary key returned from system2 back to the ESB would then be pushed back into system1 in the form of an update. In effect, system1 sends a message to create a record on system2. System2 then sends an update to system1.
Is that possible with the WSO2 ESB?
Thanks
- Login or register to post comments
- Printer friendly version
- 148 reads











Hi Steve, Yes this is
Hi Steve,
Yes this is possible with the WSO2 ESB, and as you thought of in the original post you can create proxy service to proxy the System2 and send the request to the proxy service and this proxy service will forward the request to the System2 get the response back. Possibly with a transformation to the response received by the System2 ESB will then invoke the System1 to notify the primary key created by the System2 which was coming through in the response.
This is very straight forward in the WSO2 ESB.
Thanks,
Ruwan Linton
Steve Yes this is possible..
Steve
Yes this is possible.. however if you could draw a diagram like this http://wso2.org/files/Drawing1.png for your use case, it would be much easier to understand next time :)
asankha
Thank you for the quick
Thank you for the quick responses. My worry was that system1 would have to wait for the proxy to do all the negotiation with system2 before getting a response.
I've been going through the samples but I'm not clear on which one would represent such a system. I'll see if I can put a diagram together to be more specific.
Thanks
You may achieve this by
You may achieve this by invoking the proxy service asynchronously, as described in the sample 155
Thanks,
Ruwan Linton
Steve What I really meant,
Steve
What I really meant, was that its possible to write a proxy to acknowledge immidiately, and then call into other endpoints without blocking the original caller.. this is what you wanted
A diagram will still help better..
asankha
More details
Hi,
Thanks - the async procy sounds right. Here's the image attached.
Going over the flow again:
Pic1:
1: system1 sends soap insert.
2: esb acknowledges reciept.
Pic2:
1: esb sends soap insert to system2.
2: system2 responds.
3: If response is an error - error handler logs details (for later 'replay' if a timeout/transient error) and emails system1 user.
4: If all OK, esb sends soap update instruction to system1 to update originating record.
5: system1 responds.
6: If response is an error - error handler logs details (for later 'replay' if a timeout/transient error) and emails system1 user.
Thanks,
Steve