I'm learning about RX Java and Spring MVC and see we can have ‘asynchronous/non-blocking' request processing flow in a REST server.
Using Spring's DeferredResult type and RxJava Observable pattern gives a non-blocking thread model in the server which seems a good thing. Some info on non-blocking REST services with Spring MVC here and here
However I am unclear when REST jobs or requests are long enough to require the pattern where the REST server responds immediately and does the work after the initial HTTP request completes.
http://farazdagi.com/blog/2014/rest-long-running-jobs/ shows a response like
± http POST https://api.service.io/stars name='Death Star’
HTTP/1.1 202 Accepted
Location: /queue/12345
This is described in detail at http://restcookbook.com/Resources/asynchroneous-operations/
I presume this async REST pattern is needed to avoid clients having overlong HTTP requests and/or many blocked server-threads but in a world where the server is non-blocking, is it okay to have a bit longer running REST requests than before ?
Where to draw the line - is it seconds or minutes? And with sharing of connections, e.g http pipe-lining, can this be extended further?