Git Product home page Git Product logo

Comments (3)

chungthuang avatar chungthuang commented on September 21, 2024

#4145 is a proposal for how the SendDatagram will look like with context.

from quic-go.

marten-seemann avatar marten-seemann commented on September 21, 2024

How do other datagram APIs deal with this? For example, WebTransport has an API to send datagrams. They must be running into the same issue.

One option would be to return a ErrDatagramTooLarge error. However, one reason for the bad datagram performance we're currently suffering from (#3766) is that every call to SendDatagram waits until the datagram has been packaged. The fix for that seems easy: just have a queue of datagrams, allowing more datagrams to be queued, so we can efficiently send them out. However, this also means that we won't be able to return a separate error per call to SendDatagram.

from quic-go.

chungthuang avatar chungthuang commented on September 21, 2024

Looking at https://www.w3.org/TR/webtransport/#example-fixed-rate, WebTransport API provides an option for the caller to wait till the transport is ready. Perhaps SendDatagram can return an error channel of size 1 if we move to a queue of datagrams. That way the caller can decide if they want to wait for the feedback.
However, I think improving performance can be tackle separately. In the meantime to prevent large datagrams from blocking the queue, we can:

  • Reject datagrams larger than current MTU. MTU is unlikely to increase in the near future
  • For datagrams size less than MTU but larger than the remaining size of the QUIC packet, drop it if it cannot be sent after a few retries

from quic-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.