You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrew Clegg <an...@nervechannel.com> on 2009/08/06 11:54:13 UTC
Re: Asynchronous Invocation and connection keep alive on the TCP
level
2009/8/5 conficio <Ka...@conficio.com>:
> My question is: Does the asynchronous Web service some active polling across
> the TCP connection to keep it alive? Is that the solution I'm looking for,
> Asynchronous invocation?
I'm happy to be corrected if wrong, but I believe the actual TCP
conversation is basically the same for CXF sync/async service
invocation, it just *appears* to work asynchronously from the POV of
the client code.
For really long-running jobs you are probably better off doing proper
server-side asynchronous services with persistent state, like this:
http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous_web
Andrew.
--
:: http://biotext.org.uk/ ::
RE: Asynchronous Invocation and connection keep alive on the TCP level
Posted by EVENO Manuel <ME...@generali.fr>.
Thasnk to both of you !
-----Message d'origine-----
De : Daniel Kulp [mailto:dkulp@apache.org]
Envoyé : jeudi 6 août 2009 17:32
À : users@cxf.apache.org
Cc : Eric Johnson
Objet : Re: Asynchronous Invocation and connection keep alive on the TCP level
On Thu August 6 2009 11:21:03 am Eric Johnson wrote:
> See
> http://fusesf.fusesource.org/docs/2.2/bind_trans/HTTPDecoupled.html for a discussion of decoupled endpoints.
>
> http://iona.com/support/docs/artix/5.5/jaxrpc_pguide/references12.html
> talks about using a WSDL callback pattern. The code examples are all
> from JAX-RPC, but it should be an OK starting point.
As a point of note, the CXF distribution ships a callback sample in
samples/callback. That is JAX-WS, not JAX-RPC. :-)
SVN location:
https://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/callback/
Dan
> -----Original Message-----
> From: EVENO Manuel [mailto:MEVENO@generali.fr]
> Sent: Thursday, August 06, 2009 10:39 AM
> To: users@cxf.apache.org
> Subject: RE: Asynchronous Invocation and connection keep alive on the
> TCP level
>
>
> Do you have example or documentation of a "decoupled response endpoint"
> or the callbacks-tyle mecanism you wrote about ?
> I can find anything on the CXF Wiki ...
>
> Manuel
>
> -----Message d'origine-----
> De : Eoghan Glynn [mailto:eoglynn@gmail.com] Envoyé : jeudi 6 août
> 2009
> 16:04 À : users@cxf.apache.org Objet : Re: Asynchronous Invocation and
> connection keep alive on the TCP level
>
> Andrew is correct.
>
> JAX-WS async is purely a convenience mechanism to allow the
> application avoid creating a separate thread to manage the invocation direction.
>
> What you really need to avoid is tying up the client->server
> connection for the duration of the long-running invocation.
>
> This could be achieved via WS-Addressing with a decoupled response
> endpoint , so that the client->server may be torn down once the
> request has been transmitted and the response when ready is sent over
> a separate
> server->client connection. Though it sounds like WS-A is not an option
> server->for
> you.
>
> Otherwise you can model a polling-style (as suggested by Glen) or
> callback-style of interaction in the WSDL.
>
> Cheers,
> Eoghan
>
>
> 2009/8/6 Andrew Clegg <an...@nervechannel.com>
>
> > 2009/8/5 conficio <Ka...@conficio.com>:
> > > My question is: Does the asynchronous Web service some active
> > > polling
> >
> > across
> >
> > > the TCP connection to keep it alive? Is that the solution I'm
> > > looking
> >
> > for,
> >
> > > Asynchronous invocation?
> >
> > I'm happy to be corrected if wrong, but I believe the actual TCP
> > conversation is basically the same for CXF sync/async service
> > invocation, it just *appears* to work asynchronously from the POV of
> > the client code.
> >
> > For really long-running jobs you are probably better off doing
> > proper server-side asynchronous services with persistent state, like this:
> >
> > http://www.jroller.com/gmazza/entry/creating_service_side_asynchrono
> > us
> > _web
> >
> > Andrew.
> >
> > --
> >
> > :: http://biotext.org.uk/ ::
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Asynchronous Invocation and connection keep alive on the TCP level
Posted by Daniel Kulp <dk...@apache.org>.
On Thu August 6 2009 11:21:03 am Eric Johnson wrote:
> See http://fusesf.fusesource.org/docs/2.2/bind_trans/HTTPDecoupled.html for
> a discussion of decoupled endpoints.
>
> http://iona.com/support/docs/artix/5.5/jaxrpc_pguide/references12.html
> talks about using a WSDL callback pattern. The code examples are all from
> JAX-RPC, but it should be an OK starting point.
As a point of note, the CXF distribution ships a callback sample in
samples/callback. That is JAX-WS, not JAX-RPC. :-)
SVN location:
https://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/callback/
Dan
> -----Original Message-----
> From: EVENO Manuel [mailto:MEVENO@generali.fr]
> Sent: Thursday, August 06, 2009 10:39 AM
> To: users@cxf.apache.org
> Subject: RE: Asynchronous Invocation and connection keep alive on the TCP
> level
>
>
> Do you have example or documentation of a "decoupled response endpoint"
> or the callbacks-tyle mecanism you wrote about ?
> I can find anything on the CXF Wiki ...
>
> Manuel
>
> -----Message d'origine-----
> De : Eoghan Glynn [mailto:eoglynn@gmail.com] Envoyé : jeudi 6 août 2009
> 16:04 À : users@cxf.apache.org Objet : Re: Asynchronous Invocation and
> connection keep alive on the TCP level
>
> Andrew is correct.
>
> JAX-WS async is purely a convenience mechanism to allow the application
> avoid creating a separate thread to manage the invocation direction.
>
> What you really need to avoid is tying up the client->server connection for
> the duration of the long-running invocation.
>
> This could be achieved via WS-Addressing with a decoupled response endpoint
> , so that the client->server may be torn down once the request has been
> transmitted and the response when ready is sent over a separate
> server->client connection. Though it sounds like WS-A is not an option
> server->for
> you.
>
> Otherwise you can model a polling-style (as suggested by Glen) or
> callback-style of interaction in the WSDL.
>
> Cheers,
> Eoghan
>
>
> 2009/8/6 Andrew Clegg <an...@nervechannel.com>
>
> > 2009/8/5 conficio <Ka...@conficio.com>:
> > > My question is: Does the asynchronous Web service some active
> > > polling
> >
> > across
> >
> > > the TCP connection to keep it alive? Is that the solution I'm
> > > looking
> >
> > for,
> >
> > > Asynchronous invocation?
> >
> > I'm happy to be corrected if wrong, but I believe the actual TCP
> > conversation is basically the same for CXF sync/async service
> > invocation, it just *appears* to work asynchronously from the POV of
> > the client code.
> >
> > For really long-running jobs you are probably better off doing proper
> > server-side asynchronous services with persistent state, like this:
> >
> > http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous
> > _web
> >
> > Andrew.
> >
> > --
> >
> > :: http://biotext.org.uk/ ::
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
RE: Asynchronous Invocation and connection keep alive on the TCP level
Posted by S....@shell.com.
Hi everyone
I need to start using the asynchronous web services.
Right now I am using Apache CXF 2.0.3
Please provide me a path to achieve this.
Regards
Sankar.
-----Original Message-----
From: Eric Johnson [mailto:EMJOHNSO@progress.com]
Sent: Thursday, August 06, 2009 8:51 PM
To: users@cxf.apache.org
Subject: RE: Asynchronous Invocation and connection keep alive on the TCP level
See http://fusesf.fusesource.org/docs/2.2/bind_trans/HTTPDecoupled.html for a discussion of decoupled endpoints.
http://iona.com/support/docs/artix/5.5/jaxrpc_pguide/references12.html talks about using a WSDL callback pattern. The code examples are all from JAX-RPC, but it should be an OK starting point.
-----Original Message-----
From: EVENO Manuel [mailto:MEVENO@generali.fr]
Sent: Thursday, August 06, 2009 10:39 AM
To: users@cxf.apache.org
Subject: RE: Asynchronous Invocation and connection keep alive on the TCP level
Do you have example or documentation of a "decoupled response endpoint"
or the callbacks-tyle mecanism you wrote about ?
I can find anything on the CXF Wiki ...
Manuel
-----Message d'origine-----
De : Eoghan Glynn [mailto:eoglynn@gmail.com] Envoyé : jeudi 6 août 2009 16:04 À : users@cxf.apache.org Objet : Re: Asynchronous Invocation and connection keep alive on the TCP level
Andrew is correct.
JAX-WS async is purely a convenience mechanism to allow the application avoid creating a separate thread to manage the invocation direction.
What you really need to avoid is tying up the client->server connection for the duration of the long-running invocation.
This could be achieved via WS-Addressing with a decoupled response endpoint , so that the client->server may be torn down once the request has been transmitted and the response when ready is sent over a separate
server->client connection. Though it sounds like WS-A is not an option
server->for
you.
Otherwise you can model a polling-style (as suggested by Glen) or callback-style of interaction in the WSDL.
Cheers,
Eoghan
2009/8/6 Andrew Clegg <an...@nervechannel.com>
> 2009/8/5 conficio <Ka...@conficio.com>:
>
> > My question is: Does the asynchronous Web service some active
> > polling
> across
> > the TCP connection to keep it alive? Is that the solution I'm
> > looking
> for,
> > Asynchronous invocation?
>
> I'm happy to be corrected if wrong, but I believe the actual TCP
> conversation is basically the same for CXF sync/async service
> invocation, it just *appears* to work asynchronously from the POV of
> the client code.
>
> For really long-running jobs you are probably better off doing proper
> server-side asynchronous services with persistent state, like this:
>
> http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous
> _web
>
> Andrew.
>
> --
> :: http://biotext.org.uk/ ::
>
RE: Asynchronous Invocation and connection keep alive on the TCP level
Posted by Eric Johnson <EM...@progress.com>.
See http://fusesf.fusesource.org/docs/2.2/bind_trans/HTTPDecoupled.html for a discussion of decoupled endpoints.
http://iona.com/support/docs/artix/5.5/jaxrpc_pguide/references12.html talks about using a WSDL callback pattern. The code examples are all from JAX-RPC, but it should be an OK starting point.
-----Original Message-----
From: EVENO Manuel [mailto:MEVENO@generali.fr]
Sent: Thursday, August 06, 2009 10:39 AM
To: users@cxf.apache.org
Subject: RE: Asynchronous Invocation and connection keep alive on the TCP level
Do you have example or documentation of a "decoupled response endpoint"
or the callbacks-tyle mecanism you wrote about ?
I can find anything on the CXF Wiki ...
Manuel
-----Message d'origine-----
De : Eoghan Glynn [mailto:eoglynn@gmail.com] Envoyé : jeudi 6 août 2009 16:04 À : users@cxf.apache.org Objet : Re: Asynchronous Invocation and connection keep alive on the TCP level
Andrew is correct.
JAX-WS async is purely a convenience mechanism to allow the application avoid creating a separate thread to manage the invocation direction.
What you really need to avoid is tying up the client->server connection for the duration of the long-running invocation.
This could be achieved via WS-Addressing with a decoupled response endpoint , so that the client->server may be torn down once the request has been transmitted and the response when ready is sent over a separate
server->client connection. Though it sounds like WS-A is not an option
server->for
you.
Otherwise you can model a polling-style (as suggested by Glen) or callback-style of interaction in the WSDL.
Cheers,
Eoghan
2009/8/6 Andrew Clegg <an...@nervechannel.com>
> 2009/8/5 conficio <Ka...@conficio.com>:
>
> > My question is: Does the asynchronous Web service some active
> > polling
> across
> > the TCP connection to keep it alive? Is that the solution I'm
> > looking
> for,
> > Asynchronous invocation?
>
> I'm happy to be corrected if wrong, but I believe the actual TCP
> conversation is basically the same for CXF sync/async service
> invocation, it just *appears* to work asynchronously from the POV of
> the client code.
>
> For really long-running jobs you are probably better off doing proper
> server-side asynchronous services with persistent state, like this:
>
> http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous
> _web
>
> Andrew.
>
> --
> :: http://biotext.org.uk/ ::
>
RE: Asynchronous Invocation and connection keep alive on the TCP level
Posted by EVENO Manuel <ME...@generali.fr>.
Do you have example or documentation of a "decoupled response endpoint"
or the callbacks-tyle mecanism you wrote about ?
I can find anything on the CXF Wiki ...
Manuel
-----Message d'origine-----
De : Eoghan Glynn [mailto:eoglynn@gmail.com]
Envoyé : jeudi 6 août 2009 16:04
À : users@cxf.apache.org
Objet : Re: Asynchronous Invocation and connection keep alive on the TCP level
Andrew is correct.
JAX-WS async is purely a convenience mechanism to allow the application avoid creating a separate thread to manage the invocation direction.
What you really need to avoid is tying up the client->server connection for the duration of the long-running invocation.
This could be achieved via WS-Addressing with a decoupled response endpoint , so that the client->server may be torn down once the request has been transmitted and the response when ready is sent over a separate
server->client connection. Though it sounds like WS-A is not an option
server->for
you.
Otherwise you can model a polling-style (as suggested by Glen) or callback-style of interaction in the WSDL.
Cheers,
Eoghan
2009/8/6 Andrew Clegg <an...@nervechannel.com>
> 2009/8/5 conficio <Ka...@conficio.com>:
>
> > My question is: Does the asynchronous Web service some active
> > polling
> across
> > the TCP connection to keep it alive? Is that the solution I'm
> > looking
> for,
> > Asynchronous invocation?
>
> I'm happy to be corrected if wrong, but I believe the actual TCP
> conversation is basically the same for CXF sync/async service
> invocation, it just *appears* to work asynchronously from the POV of
> the client code.
>
> For really long-running jobs you are probably better off doing proper
> server-side asynchronous services with persistent state, like this:
>
> http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous
> _web
>
> Andrew.
>
> --
> :: http://biotext.org.uk/ ::
>
Re: Asynchronous Invocation and connection keep alive on the TCP level
Posted by Daniel Kulp <dk...@apache.org>.
On Thu August 6 2009 10:03:57 am Eoghan Glynn wrote:
> Andrew is correct.
>
> JAX-WS async is purely a convenience mechanism to allow the application
> avoid creating a separate thread to manage the invocation direction.
>
> What you really need to avoid is tying up the client->server connection for
> the duration of the long-running invocation.
>
> This could be achieved via WS-Addressing with a decoupled response endpoint
> , so that the client->server may be torn down once the request has been
> transmitted and the response when ready is sent over a separate
> server->client connection. Though it sounds like WS-A is not an option for
> you.
>
> Otherwise you can model a polling-style (as suggested by Glen) or
> callback-style of interaction in the WSDL.
Just a point of note: both the WS-Addressing decoupled response thing and the
callback style thing would require that the server be able to open a port BACK
to the client. Obviously, that requires the client to have their firewall
and such configured to allow that which may not be the case. (On a side note:
I would be kind of cool if the ws-addressing decoupled stuff could be
configured to use upnp to negotiate with a router/firewall for a port. Just a
thought. :-) In that case, the polling style is definitely the best
option.
Basically, your "doWorkThatTakesALongTime" method would return some sort of
identifier immediately. You would add a "getResult(id)" method that would
actually retrieve the result (or a status message if not done yet).
Actually, you COULD even have getResult "wait" for the result for a period of
time (like 10 minutes) and if it hasn't gotten the result, send back a "timed
out, please retry" type thing and have the client loop on that call. On
there server side, the getResult call could use the continuations stuff we
added (providing you are using our Jetty stuff) to not even consume threads
there.
Dan
>
> Cheers,
> Eoghan
>
>
> 2009/8/6 Andrew Clegg <an...@nervechannel.com>
>
> > 2009/8/5 conficio <Ka...@conficio.com>:
> > > My question is: Does the asynchronous Web service some active polling
> >
> > across
> >
> > > the TCP connection to keep it alive? Is that the solution I'm looking
> >
> > for,
> >
> > > Asynchronous invocation?
> >
> > I'm happy to be corrected if wrong, but I believe the actual TCP
> > conversation is basically the same for CXF sync/async service
> > invocation, it just *appears* to work asynchronously from the POV of
> > the client code.
> >
> > For really long-running jobs you are probably better off doing proper
> > server-side asynchronous services with persistent state, like this:
> >
> > http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous_we
> >b
> >
> > Andrew.
> >
> > --
> >
> > :: http://biotext.org.uk/ ::
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Asynchronous Invocation and connection keep alive on the TCP
level
Posted by Eoghan Glynn <eo...@gmail.com>.
Andrew is correct.
JAX-WS async is purely a convenience mechanism to allow the application
avoid creating a separate thread to manage the invocation direction.
What you really need to avoid is tying up the client->server connection for
the duration of the long-running invocation.
This could be achieved via WS-Addressing with a decoupled response endpoint
, so that the client->server may be torn down once the request has been
transmitted and the response when ready is sent over a separate
server->client connection. Though it sounds like WS-A is not an option for
you.
Otherwise you can model a polling-style (as suggested by Glen) or
callback-style of interaction in the WSDL.
Cheers,
Eoghan
2009/8/6 Andrew Clegg <an...@nervechannel.com>
> 2009/8/5 conficio <Ka...@conficio.com>:
>
> > My question is: Does the asynchronous Web service some active polling
> across
> > the TCP connection to keep it alive? Is that the solution I'm looking
> for,
> > Asynchronous invocation?
>
> I'm happy to be corrected if wrong, but I believe the actual TCP
> conversation is basically the same for CXF sync/async service
> invocation, it just *appears* to work asynchronously from the POV of
> the client code.
>
> For really long-running jobs you are probably better off doing proper
> server-side asynchronous services with persistent state, like this:
>
> http://www.jroller.com/gmazza/entry/creating_service_side_asynchronous_web
>
> Andrew.
>
> --
> :: http://biotext.org.uk/ ::
>