4 ms·
My JSGI implementation in Common Node (https://github.com/olegp/common-node https://github.com/olegp/common-node) uses node-fibers allowing it to stream out res
by olegp 15y ago
My JSGI implementation in Common Node (https://github.com/olegp/common-node https://github.com/olegp/common-node) uses node-fibers allowing it to stream out responses without blocking the event loop.
In fact, by connecting an input stream to an output stream (forEachable objects), the underlying code automatically enables Node's pipe like behavior.
Check out this example: https://github.com/olegp/common-node/blob/master/examples/http.js https://github.com/olegp/common-node/blob/master/examples/ht...
- mjijackson 15y agoEven so, this breaks down with JSGI middleware that depends on running in a Java environment. For example, JSGI's gzip middleware uses Java's byte buffers.
- olegp 15y agoWhich JSGI gzip middleware are you referring to? It should use portable CommonJS Binary objects, which in Common Node's case wraps Buffers and in RingoJS (Java) byte arrays.
- tlrobinson 15y agoJSGI is an API, not an implementation. Nothing in the API is dependent on Java.