[undertow-dev] Async proxy to Async API

Stuart Douglas sdouglas at redhat.com
Tue Nov 18 15:24:49 EST 2014

----- Original Message -----
> From: "Davide Ungari" <ungarida at gmail.com>
> To: undertow-dev at lists.jboss.org
> Sent: Tuesday, 18 November, 2014 10:57:49 PM
> Subject: [undertow-dev] Async proxy to Async API
> Hi everybody,
> this is the big picture:
> a. frontend application with Undertow
> b. backend application with Undertow and Resteasy for REST API
> A serves JS,HTML,CSS and exposes B's REST API with a proxy servlet (
> https://github.com/mitre/HTTP-Proxy-Servlet ).
> Since one method of my backend API does some image processing, I'm wondering
> how to implement this method in an asynchronous way.
> On B side I'm reading Resteasy documentation
> http://docs.jboss.org/resteasy/docs/3.0.9.Final/userguide/html_single/#Asynchronous_HTTP_Request_Processing
> On A side is there something could help me from undertow to proxy in async
> way the requests to this method of B?

Use org.wildfly.extension.undertow.handlers.ReverseProxyHandler

The example io.undertow.examples.reverseproxy.ReverseProxyServer shows you how to use it. Basically it works in the IO thread, so there is no dispatch to an executor required, and both the incoming requests and async client connection both use the same thread for maximum efficiency. 


> --
> Davide
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev

More information about the undertow-dev mailing list