Skip to content

Utility for streaming and backpressure handling #5

@cesco69

Description

@cesco69

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions