ai icon indicating copy to clipboard operation
ai copied to clipboard

chore(node): node stream bypass should support backpressure

Open tangye1234 opened this issue 1 year ago • 2 comments

Use a compatible way to support pipeline from web stream to node server response.

Node stream pipeline supports backpressure, so the server response sink will not suffer memory issues. Implementations uses nodejs 18 web stream adapters as a reference and are ported from @hono/[email protected] which is also used by many developers for a long time.

This implementation is compatible with stream-polyfill and nodejs native stream.

tangye1234 avatar Jun 16 '23 10:06 tangye1234

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ❌ Failed (Inspect) Jun 16, 2023 10:17am

vercel[bot] avatar Jun 16 '23 10:06 vercel[bot]

⚠️ No Changeset found

Latest commit: 52258e7757ea98afc8981f67a2479145eb134bed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jun 16 '23 10:06 changeset-bot[bot]

What's left before we can merge?

jaredpalmer avatar Jun 29 '23 14:06 jaredpalmer

hey @tangye1234, are you planning on continuing work on this PR?

MaxLeiter avatar Jul 06 '23 16:07 MaxLeiter

hey @tangye1234, are you planning on continuing work on this PR?

Recently I have been a little busy. I just don’t know whether adding edge-runtime deps is a good idea. I think developers who want nodejs streaming for web standard stream can directly import edge-runtime on their own.

I will continue, but at least in a month later.

tangye1234 avatar Jul 06 '23 16:07 tangye1234