Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous transformation and validation #31

Open
twagoo opened this issue Mar 2, 2017 · 0 comments
Open

Asynchronous transformation and validation #31

twagoo opened this issue Mar 2, 2017 · 0 comments

Comments

@twagoo
Copy link
Member

twagoo commented Mar 2, 2017

Transformation (xml->xsd) and validation can be relatively expensive operations. It might be a good idea to make use of Jersey's asynchronous Server API to (theoretically) increase the throughput of the server:

In this model, the association between a request processing thread and client connection is broken. I/O container that handles incoming request may no longer assume that a client connection can be safely closed when a request processing thread returns. Instead a facility for explicitly suspending, resuming and closing client connections needs to be exposed. Note that the use of server-side asynchronous processing model will not improve the request processing time perceived by the client. It will however increase the throughput of the server, by releasing the initial request processing thread back to the I/O container while the request may still be waiting in a queue for processing or the processing may still be running on another dedicated thread. The released I/O container thread can be used to accept and process new incoming request connections.

This may mitigate the 'broken pipe' SocketException (see Trac #714) occurring regularly but this is speculative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant