문제

when writing a CGI script or a basic servlet you can send part of the response to the client before the entire response has been generated. This is advantageous when, for example, performing a large SQL query and displaying the results in an HTML table. Showing the results as they come in makes the application much more responsive. Is this possible in a basic REST framework like Scalatra or Unfiltered--where the return value is often the response text?

올바른 솔루션이 없습니다

다른 팁

I think, that you talking about Chunked Transfer Encoding you need support for this encoding by servlet engine. AFAIK, Atmosphere with right backend may help you, you can try use it with scalatra. About Unfiltered, it has netty backend, I'm not sure, that chunked encoding currently supported by Unfiltered, but you can try to hack it.

P.S. You can look at example of streaming server in Unfiltered: https://github.com/n8han/All-Aboard.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top