Gozala / Gozala/lunet

Support streaming request / response body

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
36
Forks
2
PR merge metrics
No merged PRs in 30d

Description

At the moment SW proxy does forward `ArrayBuffer` for request / response bodies. Which seems to work in use cases currently being proved, however it won't be able to handle things like video streams etc...

Ideally `ReadeableStream` would have being made transferable, but sadly they are not (, at least yet). In order to support this we need to polyfill that via `MessagePort` API. We could either create one per request / responce and send it over with response or alternatively multiplex via same `MessagePort`. Former has benefit of not needing to keep track of request IDs, however later might have non-negligible impact on memory use.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the service-worker proxy's request and response body handling, then review how the MessagePort API could carry the stream. The issue leaves the per-request versus multiplexed design unresolved, so determine that approach before implementation. Done means streaming request and response bodies, including video streams, work through the proxy.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.