ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » 8 web service call in sync using message broker

Post new topic  Reply to topic
 8 web service call in sync using message broker « View previous topic :: View next topic » 
Author Message
prabhuoist
PostPosted: Thu Jan 11, 2018 5:13 am    Post subject: 8 web service call in sync using message broker Reply with quote

Apprentice

Joined: 10 Oct 2017
Posts: 39

Dear all,

I want to call 8 web service in sync. i.e. after first success need to call next service.

Is it advisable to call these many web services to get success for one transaction using message broker.

Regards
Back to top
View user's profile Send private message
souciance
PostPosted: Thu Jan 11, 2018 5:53 am    Post subject: Re: 8 web service call in sync using message broker Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

prabhuoist wrote:
Dear all,

I want to call 8 web service in sync. i.e. after first success need to call next service.

Is it advisable to call these many web services to get success for one transaction using message broker.

Regards


So what is your question? I can't advise you since I don't know your requirements. you can do 20 calls after each other if you want to.
Back to top
View user's profile Send private message
prabhuoist
PostPosted: Thu Jan 11, 2018 9:49 pm    Post subject: Reply with quote

Apprentice

Joined: 10 Oct 2017
Posts: 39

My questions here are

1- Is it advisable to make these many synchronous call as the tps is at higher side(somewhere around 25 tps).
2- Do I need to use same http/soap request node or is there any other node available in WMB 7 which can call webservice one after another.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri Jan 12, 2018 5:16 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 364
Location: Columbus, OH

I'm confused by your wording.

Quote:
I want to call 8 web service in sync. i.e. after first success need to call next service.


In sync to me means all at the same time (or nearly so) but your ie indicates you want to call them in sequence, one after the other.

Quote:
Do I need to use same http/soap request node or is there any other node available in WMB 7 which can call webservice one after another.


This is also confusing to me. I would assume you would have 8 separate http/soap nodes, one for each web service you would be calling. But again it depends on what you are really trying to do.
Back to top
View user's profile Send private message
prabhuoist
PostPosted: Fri Jan 12, 2018 6:48 am    Post subject: Reply with quote

Apprentice

Joined: 10 Oct 2017
Posts: 39

My requirement is to call each service one after other. i.e. Once first call is successful then only call next call.

I can think of below design :


MQ Input Node ---> Http Request 1--> Computer Node ---> Http Request2 --> Computer Node ---> Http Request3 --> Computer Node---> Http Request 4--> Computer Node ---> Http Request5 --> Computer Node ---> Http Request6 --> Computer Node ---> Http Request 7--> Computer Node ---> Http Request8 --> Computer Node ---> MQ Output

Does above design looks ok ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 12, 2018 7:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

prabhuoist wrote:
Does above design looks ok ?


If it works, it's fine.

Certainly looks good as far as "happy path" goes.

What do you do if http call 4 fails?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri Jan 12, 2018 9:52 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 364
Location: Columbus, OH

Not sure. What's a Computer node?

You may want to break each of the 8 calls into its own subflow. Each subflow would then have an input, output and error terminal (or more if there are other conditions you are interested in). This way your main flow is clean and you can click into the details for specific calls when needed. Create an error subflow and then your main flow should be an input node, output node, error subflow and the 8 http subflows nodes then.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Jan 12, 2018 3:20 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

If you are concerned about response time then you could issue all of the requests asychronously ( using the SOAPAsyncRequest node) and then wait for all of the replies to come back. This design reduces the response time of each request to the response time of the slowest service.

But that design is more complex, so don't do it unless you need to.
Back to top
View user's profile Send private message
prabhuoist
PostPosted: Sat Jan 13, 2018 1:05 am    Post subject: Reply with quote

Apprentice

Joined: 10 Oct 2017
Posts: 39

What do you do if http call 4 fails?
- If 4th calls fail, I have to return failure response with one indicator( might be parameter having value 4) that 4th call failed and when source would retry that they will provide this value so that I will skip initial 3 success call and start from 4th.

You may want to break each of the 8 calls into its own subflow.
- This is good suggestion.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Tue Jan 16, 2018 5:07 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 364
Location: Columbus, OH

timber wrote:
If you are concerned about response time then you could issue all of the requests asychronously ( using the SOAPAsyncRequest node) and then wait for all of the replies to come back. This design reduces the response time of each request to the response time of the slowest service.

But that design is more complex, so don't do it unless you need to.


This design would not work if later calls need data returned by earlier calls. We've had designs given to us where there are 7 or 8 calls to be made in sequence with each call depending on data from the response of the previous one. Or you make different calls based on results of earlier calls. Some of them are so involved that it seems our code is the application instead of the caller.
Back to top
View user's profile Send private message
ceteareth
PostPosted: Thu Jan 18, 2018 12:30 am    Post subject: Reply with quote

Acolyte

Joined: 12 Aug 2012
Posts: 51

Maybe you can do orchestration.
You may check this link
https://medium.com/capital-one-developers/microservices-when-to-react-vs-orchestrate-c6b18308a14c

You may create a wrapper message. This wrapper message initially contains your original request.
This message will be received by the orchestrator flow. The orchestrator flow will decide which service to call via a particular field in the wrapper message. For example you can have a field named "steps", containing names of services that already has been called.another field you can add is the step status which just so the orchestrator flow will know if the step has failed. the wrapper message can also hold the request messages and response messages.

In regards to your last question. I personally would prefer to use the orchestrator approach wherein you have one orchestrator and one application per target provider/operation. If only one target has changed means that you only have to change that particular application and pretty much the code impact is less.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Jan 18, 2018 3:53 pm    Post subject: Re: 8 web service call in sync using message broker Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2491
Location: Melbourne, Australia

prabhuoist wrote:
Dear all,
I want to call 8 web service in sync. i.e. after first success need to call next service.
Is it advisable to call these many web services to get success for one transaction using message broker.
Regards

Does the next service require any output from the previous service? If not, you could initiate all the calls at the same time, and then wait for the last response. ie. asynchronous
Are they all different web services?
_________________
Glenn
Back to top
View user's profile Send private message
souciance
PostPosted: Tue Jan 23, 2018 4:45 am    Post subject: Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

prabhuoist wrote:
My requirement is to call each service one after other. i.e. Once first call is successful then only call next call.

I can think of below design :


MQ Input Node ---> Http Request 1--> Computer Node ---> Http Request2 --> Computer Node ---> Http Request3 --> Computer Node---> Http Request 4--> Computer Node ---> Http Request5 --> Computer Node ---> Http Request6 --> Computer Node ---> Http Request 7--> Computer Node ---> Http Request8 --> Computer Node ---> MQ Output

Does above design looks ok ?


Test it, see what issues you get and then change your design.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » 8 web service call in sync using message broker
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.