Author |
Message
|
chris boehnke |
Posted: Tue Jan 17, 2012 8:24 am Post subject: Webservices |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Guys,
I have a question regarding webservices:
I have a scenario where we have to call two webservices(webservice1 and webservice2). Using the output of webservice1 we build a request for webservice2 and call this service. This response is used by message broker for generating final response.
I would like which is the efficient way of calling webservice.
1. call webservice 1 and webservice 2 from message broker.
2. call webservice 1 from message broker which internally calls webservice 2 and returns the final response to message broker.
Thanks
Chris |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 17, 2012 8:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The usual reason to include broker in a scenario is to ensure that end applications are isolated from each other, and such that webservice 1 doesn't have to know about webservice 2.
There's nothing inherently *less* efficient about using Broker in your scenario 1.
But there's also nothing inherently *more* efficient. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 17, 2012 8:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
How smart is webservice 1 at handling errors from webservice 2?
How much control do you need over the unhappy paths?
How much confidence do you have that any changes to webservice 2 will be correctly reflected in webservice 1?
If your answers are:
Very
None
Absolute
then get webservice 1 to call webservice 2. If they're not, make 2 calls from broker. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vennela |
Posted: Tue Jan 17, 2012 8:35 am Post subject: Re: Webservices |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
chris boehnke wrote: |
I would like which is the efficient way of calling webservice.
1. call webservice 1 and webservice 2 from message broker.
2. call webservice 1 from message broker which internally calls webservice 2 and returns the final response to message broker.
Thanks
Chris |
I don't see the difference |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 17, 2012 8:37 am Post subject: Re: Webservices |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vennela wrote: |
I don't see the difference |
In terms of performance I doubt there's any measurable difference.
Getting one webservice to call another puts a lot of trust and future responsibility for service calls outside the ESB. You need to be certain these services are coupled.
Which is an odd design for an ESB. But I've seen odder. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|