Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebCodecs-Echo to the samples directory #430

Merged
merged 15 commits into from
Feb 14, 2023
Merged

Add WebCodecs-Echo to the samples directory #430

merged 15 commits into from
Feb 14, 2023

Conversation

aboba
Copy link
Collaborator

@aboba aboba commented Oct 26, 2022

Rebase of #415

Live demo: https://webrtc.internaut.com/wc/wtSender10/

Requires Chromium M108+ (to support BYOB reader)

Known issues:

  1. Device selection (different behavior in Chrome vs. Chrome Canary).
  2. FIXED: Non-optimal write strategy (added await writer.ready, removed await from writer.write, writer.close)
  3. Server support for "cut-through" forwarding
  4. Server support for RESET_STREAM forwarding
  5. PARTIALLY FIXED: Non-optimal read strategy (removed awaits on read side, while {} loop).
  6. FIXED: Add writer.releaseLock() and reader.releaseLock()

Rebase of #415

Do not merge: still work-in-progress
Removed await writer.write() and implemented a reordering buffer.
@aboba
Copy link
Collaborator Author

aboba commented Oct 30, 2022

Recent updates:

  1. Created an async writeChunk() function, removing await in writer.write(chunk) and writer.close(). This appears to decrease glass-glass latency substantially and reordering is now observed on the receiver (requiring a reordering buffer).

  2. Removed some awaits in reader.read(). This also appears to have enabled concurrency and re-ordering.

@aboba aboba requested review from ricea and vasilvv November 20, 2022 05:53
@aboba aboba marked this pull request as draft November 20, 2022 05:53
@ricea
Copy link
Contributor

ricea commented Nov 21, 2022

3. Tried using writer.close().then() instead of await writer.close(). This resulted in much more reordering, but also frame RTTs that grew over time to very high levels (2000+ ms), causing many more aborted writes. Not exactly sure why this change made so much difference.

This really shouldn't make any difference. Very long RTTs would seem to imply that backpressure is not working effectively.

@aboba
Copy link
Collaborator Author

aboba commented Nov 21, 2022

@ricea Wrote an async writeChunk() function, and made sure to call writer.releaseLock() eventually on all writers, and reader.releaseLock() on all readers. The strange issues with writer.close().then() causing huge glass-glass latency compared with await writer.close() seem to have vanished.

@aboba aboba marked this pull request as ready for review December 11, 2022 06:16
@jan-ivar jan-ivar merged commit 7ffbd7d into w3c:main Feb 14, 2023
github-actions bot added a commit that referenced this pull request Feb 14, 2023
SHA: 7ffbd7d
Reason: push, by jan-ivar

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants