Apr 17th, 2008, 03:05 PM
Spring webservices Synchronous non blocking
I'm experimenting with Spring webservices and looks great and suites most parts of my requirements. Spring webservices gives me the ability to get rid of code generation and annotation framework as we do with Axis and CXF. It gives me ability to decouple XSD and Java implementation. I used Xpath to extract data from the request and JDom API to build the response. The HumanResource service example in the distribution helped me lot to understand about Spring webservices.
As part of requirements the system that we are going to design need to support Synchronous non blocking requests.
Question: What do we mean by Synchronous non blocking requests?
We have a scenario of supporting the clients who will not wait for response and use same connection to send other requests, but server need to send the response using the same port on which server gets the request after processing the request.
With the current system in production, we are using TCP/IP connections from client to server for achieving this.
---End of Answer-----
As we know that HTTP is a Request/Response type protocol. So if use org.springframework.ws.transport.http.MessageDispa tcherServlet then for every request there will be a new thread spanned and holds on until server sends the response.
Is there any other mechanism in Spring webservices to get the request and release the thread on the server after accepting the request and use some kind of push mechanism to send the response to client?
Do we have any idea about the performance of MessageDispatcherServlet ?
Thanks & Regards,
Apr 18th, 2008, 06:14 AM
WS-Addressing addresses this (pun intended). You can send a response via another connection, via the ReplyTo headers. Check the reference docs for more info.
Apr 18th, 2008, 10:28 AM
Thank you for pointing me to this direction.
I'll start exploring WS-Addressing.
Thanks & Regards,