| Author | Message | 
		
		  | ucbus1 | 
			  
				|  Posted: Thu Sep 10, 2015 10:22 am    Post subject: Datapower- Web Services a design question |   |  | 
		
		  | Knight
 
 
 Joined: 30 Jan 2002Posts: 560
 
 
 | 
			  
				| I have a current application the flow is as indicated below: 
 App A-->MQ Req ---> DP --->MQ Req --->App B
 App A<--MQ Resp <--  DP <---MQ Resp <---App B
 
 DP thread posts the MQ Request to APP B and waits for the response for say 10 sec. If the response comes back within time limit the response is sent to App A. If the message is received after the time out (10 sec), the response messages from App B are accumulated on the MQ queue and a batch script reads the responses from App B and sends them to App A.
 
 Now we are asked to use Web Services for the second leg of the flow
 
 App A-->MQ Req ---> DP --->WS Req --->App B
 App A<--MQ Resp <--  DP <---WS Resp <---App B
 
 Given the above change, how should I handle the WS responses received from App B "after the timeout". This as I explained above is not a big issue with current MQ set up. But with the change to WS how can this be addressed.  please share your experiences.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | ucbus1 | 
			  
				|  Posted: Mon Sep 14, 2015 8:13 am    Post subject: |   |  | 
		
		  | Knight
 
 
 Joined: 30 Jan 2002Posts: 560
 
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | ucbus1 | 
			  
				|  Posted: Thu Sep 24, 2015 9:13 am    Post subject: |   |  | 
		
		  | Knight
 
 
 Joined: 30 Jan 2002Posts: 560
 
 
 | 
			  
				| Wondering if this is specific scenario, any insight? |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Thu Sep 24, 2015 10:16 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| Perhaps I'm misunderstanding your question. 
 You want to know what happens if the backend tries to send a response to Datapower after DP has timed out waiting for the response?
 
 If it's a WS call, then it's HTTP.  If an HTTP request times out, the socket closes.  So the backend *can't* send the response after DP has stopped waiting.
 
 HTTP is synchronous.  MQ is asynchronous - so responses can arrive regardless of whether anyone is still looking for them or not.
 _________________
 chmod  -R ugo-wx /
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | ganesh | 
			  
				|  Posted: Fri Oct 23, 2015 8:06 am    Post subject: |   |  | 
		
		  | Master
 
 
 Joined: 18 Jul 2010Posts: 294
 
 
 | 
			  
				| 
   
	| Quote: |  
	| how should I handle the WS responses received from App B "after the timeout". |  
 App B will not be able to send a web service response to DP after DP has timed out, in a time out scenario what you may want to do is make DP send a timeout response to MQ  Resp which will be consumed by App A.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Gaya3 | 
			  
				|  Posted: Fri Oct 23, 2015 10:28 am    Post subject: |   |  | 
		
		  |  Jedi
 
 
 Joined: 12 Sep 2006Posts: 2493
 Location: Boston, US
 
 | 
			  
				| if that is the case you can write the process internal to the DP and send it out to the MQ _________________
 Regards
 Gayathri
 -----------------------------------------------
 Do Something Before you Die
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | anveshita | 
			  
				|  Posted: Tue Jan 19, 2016 12:28 pm    Post subject: Re: Datapower- Web Services a design question |   |  | 
		
		  | Master
 
 
 Joined: 27 Sep 2004Posts: 254
 Location: Jambudweepam
 
 | 
			  
				| 
   
	| ucbus1 wrote: |  
	| I have a current application the flow is as indicated below: 
 App A-->MQ Req ---> DP --->MQ Req --->App B
 App A<--MQ Resp <--  DP <---MQ Resp <---App B
 
 DP thread posts the MQ Request to APP B and waits for the response for say 10 sec. If the response comes back within time limit the response is sent to App A. If the message is received after the time out (10 sec), the response messages from App B are accumulated on the MQ queue and a batch script reads the responses from App B and sends them to App A.
 
 Now we are asked to use Web Services for the second leg of the flow
 
 App A-->MQ Req ---> DP --->WS Req --->App B
 App A<--MQ Resp <--  DP <---WS Resp <---App B
 
 Given the above change, how should I handle the WS responses received from App B "after the timeout". This as I explained above is not a big issue with current MQ set up. But with the change to WS how can this be addressed.  please share your experiences.
 |  
 I am not sure if you have received a response you are looking for. anyways. Here are my two cents...
 
 If I am correct you have MQ reuest-response message pattern using Datapower. As mqjeff pointed out it may not be possible to implement in HTTP as it is asynchronous.
 
 Now here is my suggestion and see if ti works for you. Can you add your app related information into WS header? Is the App B able to handle the custom information header?
 
 DPFLow 1: App A-->MQ Req ---> DP --->WS Req --->App B
 DP could take the MQ header information  and insert into WS request message header.
 
 DPFLow 2: App A<--MQ Resp <--  DP <---WS Resp <---App B
 App B will send the WS Response inserting the custom header (MQ related) on the response send it back
 
 DPFlow1 and DPFlow2 are independent.
 Once  DP receives the response it builds the MQ message response and sends it back to your origination.
 
 I am just thinking aloud and would like to know if the above makes sense to you.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | manoj5007 | 
			  
				|  Posted: Wed Feb 03, 2016 12:34 am    Post subject: |   |  | 
		
		  |  Acolyte
 
 
 Joined: 15 May 2013Posts: 64
 
 
 | 
			  
				| You can still go with the approach followed with MQ. Here the issue will be DP response timing out, so in those scenarios, MQ Responses can be collected in a separate queue but you will need to discuss a way to communicate these failed responses with App A.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |