Re: [Resteasy-users] Long task, short request

2013-04-05 Thread Friso Vrolijken
Not sure why this isn’t showing up in the list, so resending it...

Van: Friso Vrolijken 
Verzonden: vrijdag 5 april 2013 13:10
Aan: resteasy-users@lists.sourceforge.net
Onderwerp: RE: [Resteasy-users] [repost]: Long task, short request

Hi Li,

No, I’ve not tried that, as from the documentation I gather that the 
request will not return (i.e. the client will be kept waiting). One of 
my goals is to free up the client as soon as possible. Please let me 
know if my assumption (that the client needs to keep waiting) is 
incorrect.

Groeten,

Friso

Van: Weinan Li 
Verzonden: vrijdag 5 april 2013 13:06
Aan: Friso Vrolijken
CC: resteasy-users@lists.sourceforge.net
Onderwerp: Re: [Resteasy-users] [repost]: Long task, short request

Have you tried the new async feature in servlet 3.0? RESTEasy supports it. 

-- 
Weinan Li
Sent with Sparrow
--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Long task, short request

2013-04-05 Thread Jesus M. Rodriguez
Friso,

We had a similar problem on our project, Candlepin [1]. We have a number of
items that end up being Quartz jobs that get kicked off via a POST call.
Our POST methods return a JobDetail object [2], and we have an Interceptor
[3] that on postProcess looks at the returned entity, if it's a JobDetail
it returns HTTP.ACCEPTED [4] (202) and a status object that has a url to
get status. The HTTP 202 code tells the client we got the request but it's
not done yet.

So far we've had pretty good success with this paradigm. I know we looked
at the async feature in resteasy but I don't remember why we didn't end up
using it.

Sincerely,
jesus

[1] https://github.com/candlepin/candlepin
[2]
https://github.com/candlepin/candlepin/blob/master/src/main/java/org/candlepin/resource/MigrationResource.java
[3]
https://github.com/candlepin/candlepin/blob/master/src/main/java/org/candlepin/resteasy/interceptor/PinsetterAsyncInterceptor.java
[4] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3


On Fri, Apr 5, 2013 at 9:34 AM, Friso Vrolijken friso.vrolij...@caci.nlwrote:

 Not sure why this isn’t showing up in the list, so resending it...

 Van: Friso Vrolijken
 Verzonden: vrijdag 5 april 2013 13:10
 Aan: resteasy-users@lists.sourceforge.net
 Onderwerp: RE: [Resteasy-users] [repost]: Long task, short request

 Hi Li,

 No, I’ve not tried that, as from the documentation I gather that the
 request will not return (i.e. the client will be kept waiting). One of
 my goals is to free up the client as soon as possible. Please let me
 know if my assumption (that the client needs to keep waiting) is
 incorrect.

 Groeten,

 Friso

 Van: Weinan Li
 Verzonden: vrijdag 5 april 2013 13:06
 Aan: Friso Vrolijken
 CC: resteasy-users@lists.sourceforge.net
 Onderwerp: Re: [Resteasy-users] [repost]: Long task, short request

 Have you tried the new async feature in servlet 3.0? RESTEasy supports it.

 --
 Weinan Li
 Sent with Sparrow

 --
 Minimize network downtime and maximize team effectiveness.
 Reduce network management and security costs.Learn how to hire
 the most talented Cisco Certified professionals. Visit the
 Employer Resources Portal
 http://www.cisco.com/web/learning/employer_resources/index.html
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/resteasy-users

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users