When trying to provide a Node/Express-like response interface on top of uWS, frameworks need to bridge Node streams with the uWS backpressure model (tryEnd, onWritable, etc.). This often results in fairly complex logic just to correctly propagate backpressure and resume writes.
For example in ultimate-express the response streaming logic becomes quite involved because it needs to coordinate Node streams with the uWS response lifecycle:
https://github.com/dimdenGD/ultimate-express/blob/main/src/response.js#L133
If ublitzjs exposed a higher-level public API for streaming responses, wrappers could implement Node-style streaming semantics with much less overhead and complexity.
When trying to provide a Node/Express-like response interface on top of uWS, frameworks need to bridge Node streams with the uWS backpressure model (tryEnd, onWritable, etc.). This often results in fairly complex logic just to correctly propagate backpressure and resume writes.
For example in ultimate-express the response streaming logic becomes quite involved because it needs to coordinate Node streams with the uWS response lifecycle:
https://github.com/dimdenGD/ultimate-express/blob/main/src/response.js#L133
If ublitzjs exposed a higher-level public API for streaming responses, wrappers could implement Node-style streaming semantics with much less overhead and complexity.