dlang / project-ideas

Collection of impactful projects in the D ecosystem
36 stars 12 forks source link

Implement the QUIC protocol #84

Closed s-ludwig closed 1 year ago

s-ludwig commented 3 years ago

Status

key value
Status Project Started
SAOC Edition 2022
SAOC Contributor @vladchicos
SAOC Mentor(s) @PetarKirov @RazvanN7
Repo https://github.com/dlang-community/quic-d
Dub https://code.dlang.org/packages/quic-d

Description

The QUIC protocol is now officially standardized and is the basis for HTTP/3. The protocol has a number of very interesting properties for many kinds of internet communication protocols and it would be highly valuable to have in the D ecosystem.

The implementation should be able to run on top of vibe.d's UDPConnection and task system, but should ultimately be implemented in a generic way, to be able to work with any UDP API, such as Phobos' sockets. However, handling the concurrent nature of a Quic connection may make the latter a non-trivial design question and could be considered as an optional goal.

What are rough milestones of this project?

  1. Getting a successful TLS handshake working
  2. A proof-of-concept single connection to a server to work (no multiplexing or advanced functionality)
  3. Implement stream multiplexing
  4. Implement flow control, stream prioritization etc.
  5. Test against one or more Quic test suites, such as QUIC-Tracker

Each milestone should be accompanied by matching tests, even if testing against a more sophisticated test suite may only make sense during the later stages. QUICK-Tracker offers the possibility to test specific features, though, so using it as early as possible is something to be looked into.

How does this project help the D community?

While there are C implementations, using them requires bindings, a rather cumbersome build process that includes dependencies (TLS), and most importantly they do not mix well with D's exceptions or a fiber based concurrency model. Having a native implementation would facilitate efforts to implement HTTP/3 and to experiment with other layered protocols within the D community/ecosystem.

Recommended skills

Some experience in implementing network protocols and working with standards documents is recommended.

What can students expect to get out of doing this project?

Gaining experience about the inner workings of a modern network protocol, as well as practicing the skills for implementing standards.

Point of Contact

@s-ludwig

References

https://datatracker.ietf.org/doc/rfc9000/ https://github.com/QUIC-Tracker https://vibed.org/api/vibe.core.net/listenUDP http://repos.intern.outerproduct.org/soenke.ludwig/dquic

mdparker commented 1 year ago

This one has been worked on for SAOC 2022 and is continuing after, so we can close it.

https://github.com/dlang-community/quic-d