3 ms·
Ring supports streaming (via Java InputStreams), but not non-blocking I/O.
by weavejester 14y ago
Ring supports streaming (via Java InputStreams), but not non-blocking I/O.
- andrewvc 14y agoAh, good to know James! Of course non-blocking is what people want for stuff like websockets in most situations.
- weavejester 14y agoRight, websockets servers tend to need NIO otherwise you just wind up with too many threads to manage. However, streaming has uses outside of websockets; for instance, returning a response that's too large to want to hold in memory.
- gerrit 14y agoOr simply flushing out the <head> of a html document before the body is generated so the browser can start pre-fetching resources. That's the main use case that motivated Rails to implement streaming.