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 » Web Service Design: Providing Acknowledgement

Post new topic  Reply to topic
 Web Service Design: Providing Acknowledgement « View previous topic :: View next topic » 
Author Message
ayanc
PostPosted: Tue Apr 08, 2008 4:49 am    Post subject: Web Service Design: Providing Acknowledgement Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi,

I am trying to implement a typical "broker mediates a web service" scenario. My current flow design is as follows:

HTTPInput -> Compute -> HTTPRequest -> Compute -> HTTPReply

Now client wishes to have an acknowledgement that the broker has received the request message (an ack after HTTPInput).

I am finding it difficult to design the flow to meet this requirement. If I use an HTTPReply earlier in the flow then the transaction is closed and subsequent replies sent shall be discarded.

I was looking at HTTP 100 Continue status code and tried it out but could not get it to work. The second reply was being discarded and the client was getting timed out.

Any ideas on how I may implement this feature would be very helpful.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 08, 2008 4:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to use Broker v6.1 and Asynchronous HTTP.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue Apr 08, 2008 5:13 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:
You need to use Broker v6.1 and Asynchronous HTTP.


Can you elaborate it?

Isn't HTTP client request (not broker request) synchronous ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Apr 08, 2008 5:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, HTTP is synchronous.

Using WS-Addressing, one can create a "pseudo-asynchronous" HTTP communication as follows, where the request message includes an HTTP reply to address. Two HTTP communications are performed - the original request followed by an ACK, and then a reply request (later) FROM the server to the Requester with a standard HTTP reply back.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac64530_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue Apr 08, 2008 5:22 am    Post subject: Re: Web Service Design: Providing Acknowledgement Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

ayanc wrote:

...

Now client wishes to have an acknowledgement that the broker has received the request message (an ack after HTTPInput).

...


What is additional value of this acknowledgement ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
ayanc
PostPosted: Tue Apr 08, 2008 5:42 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi All,

Thanks for your prompt response. It is good to hear that we have the WS-Addressing capabilities in 6.1 However currently upgrading to 6.1 is not an option available with us.

We had tried to explain our client that the response would anyway be available provided we have the correct timeout values configured in the source application and our broker HTTPRequest node. The entire flow is synchronous and if there is a delay in the response from the second application broker (HTTPRequest) would anyway timeout and a suitable reply can be sent back.

As far as the value of the acknowledgement is concerned ... It is something that I personally dont feel would add much value.

However client doesn't wish to wait for the response from the second application. It wants to have an acknowledgment from the broker beforehand.

Another suggestion is to use an HTTPRequest node in place of an HTTPReply node which will actually send the response but as a request. However it is not a good design per say.

I was thinking on these lines:

1. Send an HTTPReply with a specific HTTP Status code (100?) so that the client application may accept it as an acknowledgment. The status code could be such that the connection is kept open from both ends.
2 The client waits for the actual response.
3. Send the normal response through a second HTTPReply node.

A custom status code perhaps??? However I have no idea how the broker would understand that the intention is to continue to send the response to the client instead of closing the connection / completing the transaction.

I believe there could be some changes required from the client application as well to deal with this scenario. However the whole aspect of implementing it is not yet clear to me and hence I am not in a position to direct their team.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Apr 08, 2008 8:34 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

An HTTPReply node can only send ONE reply.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
ayanc
PostPosted: Tue Apr 08, 2008 8:43 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

So effectively I dont have any other option than using HTTPRequest node as a response sender.

It seems there is no other work around as of now.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 08, 2008 8:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Push back on the client.

Ask them how they intend to have their HTTP requester receive more than one reply to the same HTTP operation (which is illegal in the HTTP standard...)
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ayanc
PostPosted: Tue Apr 08, 2008 8:50 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

They have an answer to that. They are passing a separate transaction ID which is unique in every request. They wish to correlate using that ID. This ID is being sent back during the response message.

Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 08, 2008 8:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

ayanc wrote:
They have an answer to that. They are passing a separate transaction ID which is unique in every request. They wish to correlate using that ID.



That's an answer to a different question.

My question is this: How do they expect to get more than one HTTP document in response to a single HTTP request?

HTTP does not allow this. HTTP says "One http document for a request, one http document for a reply".

HTTP says that the request is completed when *the* reply comes back.

There is no standard HTTP library that will allow you to wait for more than one reply - because it's illegal in the protocol.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ayanc
PostPosted: Tue Apr 08, 2008 9:05 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

I completely agree. This is the exact reason why we tried to explain that it is not a good idea.

However ... they want some kind of confirmation that broker has received a request (something like a MQ Report option) before actually getting the response. They dont care about the content of the acknowledgment.

That is the reason why I was looking at HTTP status code 100. Although it is used for a different purpose altogether, but as per HTTP standard the client waits for the actual response.

In addition I was looking at this site:

http://dev2dev.bea.com/webservices/WS-Acknowledgement-0_9.html

This seems very similar to the capabilities addressed in 6.1
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 08, 2008 9:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Which is not an approved standard...

And WS-Addressing does this, anyway, I believe.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Apr 08, 2008 5:49 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

WSAddressing can send an "ack" if you are using the SOAPNodes in 6.1, and send the actual reply back to a different HTTP location if that helps...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » Web Service Design: Providing Acknowledgement
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.