sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Add HTTP/3 support

Open AlvaroVasconcelos opened this issue 4 years ago • 18 comments

I searched for an issue to track progress of implementing HTTP/3 in the standard library but couldn't find one, so I'm opening this new issue to track this (presumably inevitable) effort.

AlvaroVasconcelos avatar Sep 26 '19 17:09 AlvaroVasconcelos

@Irhn given that

What are the plans for Dart's implementation? Will it be a separate package like http2 or grpc? Any timeline for a release?

iapicca avatar Oct 20 '20 10:10 iapicca

There are currently no plans (or bandwidth) to implement HTTP/3 support as either builtin dart:io feature or even as a package.

@lrhn do you think we should maybe close this as not planned to reflect the current thinking around dart:io and networking package priorities?

/cc @mit-mit @a-siva

mraleph avatar Oct 20 '20 13:10 mraleph

Not sure closing is the right thing to do. When HTTP/3 becomes a stable standard, we will most likely have to implement it. We are just not going to be riding the bleeding edge and implement the draft specification. It's unlikely that there will be any clients or back-ends which will be HTTP/3 only, so falling back on HTTP/2 is a valid option.

So, keeping this open as a place where people needing the feature can weigh in, but with no near-time plans to do an implementation in Dart. It's a non-trivial piece of networking code, especially for the server code, so we'll have to ensure we have someone qualified to implement it when the time comes. At that time, we can figure out whether we want it in a separate package or not.

lrhn avatar Oct 20 '20 14:10 lrhn

What about the quic protocol in general, apart from HTTP/3?

gargakshit avatar Oct 20 '20 16:10 gargakshit

There have already had https://tools.ietf.org/html/draft-ietf-quic-transport-32. It's a really nice package that the Dart SDK should have.

lovung avatar Dec 01 '20 04:12 lovung

@lrhn this feature request could help implementing the feature

iapicca avatar Jul 02 '21 21:07 iapicca

Any update on this? I'd really want to use QUIC with my application. Isn't it a bit overdue for such a cutting-edge framework like Flutter to implement this?

flawnn avatar Aug 29 '21 20:08 flawnn

@flawnn

Nothing has changed since https://github.com/dart-lang/sdk/issues/38595#issuecomment-712857906

If you want to use QUIC just bind to a library that implements it (e.g. cronet, see https://github.com/google/cronet.dart).

mraleph avatar Aug 29 '21 20:08 mraleph

@lrhn @mraleph

I see there is no update.

I'm developing a back-end framework (There is not enough documentation yet. Sorry about that). Also, a library with various easy codes for Flutter (or any client).

Not ready yet. But I want to offer http2 and http3 support when ready. In this context, when I examine the drafts, I think I can do it with native dart even if it takes a long time (a quic and an http3 package). For this, I will need to find developers I can collaborate with.

Knowing whether the Dart team will be working on http3 in the current or (short or medium term) future is important so that my efforts are not wasted.

Mehmetyaz avatar Dec 30 '21 19:12 Mehmetyaz

@lrhn @mraleph It is good time to introduce HTTP/3 support for the Dart and Flutter

zs-dima avatar Dec 30 '21 21:12 zs-dima

I believe that nothing has changed here: we still have no bandwidth to provide http/3 implementations in the core SDK.

I strongly believe that HTTP3 protocol implementation should be implemented in package, contributed and maintained by the community.

mraleph avatar Jan 03 '22 07:01 mraleph

I believe that nothing has changed here: we still have no bandwidth to provide http/3 implementations in the core SDK.

I strongly believe that HTTP3 protocol implementation should be implemented in package, contributed and maintained by the community.

Since http3 support for gRPC(https://github.com/grpc/grpc/issues/19126) and nodeJs(https://github.com/nodejs/node/issues/38478) on the way, I think it's time to increase priority for this feature. Also, probably very few people in community has network programming experience since Flutter itself is an UI framework, some internal wiggling from Google would be very nice, otherwise chances are high we won't have this feature for a long time.

esenmx avatar Feb 23 '22 11:02 esenmx

/cc @brianquinlan

a-siva avatar Feb 24 '22 05:02 a-siva

HTTP/3 was standardized as RFC 9114. Already supported in Edge, Firefox, and Chrome in version 101. And the best news Amazon CloudFront is scheduled to be the first AWS service to integrate s2n-quic with its support for HTTP/3 in 2022.

robbecker-wf avatar Jun 07 '22 18:06 robbecker-wf

+1

khteh avatar Jul 02 '22 08:07 khteh

it's sad to see Flutter which is known for "Cutting edge technology" be one of the last framework to join the QUICK protocol

marwenbk avatar Jul 26 '22 20:07 marwenbk

@marwenbk Just now, have cronet (https://pub.dev/packages/cronet) but they have bug, but if the authors update the version, then the rules will be. I hacked with rebuilding what was needed.

Additional pub cronet with grpc (https://pub.dev/packages/grpc_cronet)

aospiridonov avatar Aug 02 '22 14:08 aospiridonov

cupertino_http is a new experimental Flutter plugin that provides access to Apple's Foundation URL Loading System - which has HTTP/3 support

cupertino_http has the same interface as package:http Client so it is easy to use in a cross-platform way. For example:

late Client client;
if (Platform.isIOS) {
  final config = URLSessionConfiguration.ephemeralSessionConfiguration()
    # Do whatever configuration you want.
    ..allowsCellularAccess = false
    ..allowsConstrainedNetworkAccess = false
    ..allowsExpensiveNetworkAccess = false;
  client = CupertinoClient.fromSessionConfiguration(config);
} else {
  client = IOClient(); // Uses an HTTP client based on dart:io
}

final response = await client.get(Uri.https(
    'www.googleapis.com',
    '/books/v1/volumes',
    {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'}));

I would really appreciate it if you can try cupertino_http out.

Comments or bugs in the cupertino_http issue tracker would be appreciated!

brianquinlan avatar Aug 09 '22 21:08 brianquinlan

Hey, would those of you who want HTTP/3 support briefly explain what HTTP/3 features are important to you e.g. QUIC (to provide better multiplexing), better header compression, etc.?

Thanks!

brianquinlan avatar Aug 12 '22 20:08 brianquinlan

Hey, would those of you who want HTTP/3 support briefly explain what HTTP/3 features are important to you e.g. QUIC (to provide better multiplexing), better header compression, etc.?

Thanks!

  • QUIC to improve response times when requesting resources over larger geographic distances and less reliable networks
  • 0-RTT QUIC to lower the number of round trips required to establish a secure TLS connection with the server

Jure-BB avatar Aug 13 '22 08:08 Jure-BB

I understand it would be a bigger undertaking than "just" http/3, but webtransport support would be awesome for any real-time game/application. It could make sense since Flutter's been pushing games - and I say this as a Flutter game dev.

Otherwise yes, 0-RTT quic support would be great.

nicoroy2561 avatar Aug 18 '22 10:08 nicoroy2561

I thought I'd mention the following too, since the original response was that "there's not enough bandwidth to work on this": you could leverage the work done at https://github.com/google/cronet.dart too.

Now that Cronet is available on every major OS supported by Flutter, you could use this by relying on it for the networking stack. Being Chromium/Chrome's networking stack means by integrating it into Dart you wouldn't need to worry much about integrating any new features in the future - it'd be simply about updating the Cronet version you'd boundle with Dart and exposing the relative APIs.

I don't mean to disrespect anyone - I think the Dart networking stack works totally fine and has served its purpose well so far. I'm only mentioning this because you might be interested in leveraging the work being done on Cronet instead of rolling and maintaining your own networking stack.

This would give developers access to bleeding edge technologies with one of the best implementations available, while making it potentially easier for the Dart developers to integrate them.

nicoroy2561 avatar Aug 18 '22 17:08 nicoroy2561

@marwenbk Just now, have cronet (https://pub.dev/packages/cronet) but they have bug, but if the authors update the version, then the rules will be. I hacked with rebuilding what was needed.

Additional pub cronet with grpc (https://pub.dev/packages/grpc_cronet)

wait is cronet flutter only?! why?

iapicca avatar Sep 29 '22 11:09 iapicca

Hey, would those of you who want HTTP/3 support briefly explain what HTTP/3 features are important to you e.g. QUIC (to provide better multiplexing), better header compression, etc.? Thanks!

  • QUIC to improve response times when requesting resources over larger geographic distances and less reliable networks
  • 0-RTT QUIC to lower the number of round trips required to establish a secure TLS connection with the server

HTTP3 solves TCP Head of the line blocking by using QUIC which combines both layer 3 and layer 4 avoid tcp, into one single layer, HTTP/2 was introduced to make multiple http requests with in the same tcp connection since tcp connection is resource intensive and stateful the idea of streams was introduced in HTTP/2, but that means if there was one missing packet whole fleet of requests keep waiting until we get back that packet. and also QUIC solves other issues like switching from wifi to mobile network ig.

dhikshith12 avatar Oct 04 '22 17:10 dhikshith12

Hey, would those of you who want HTTP/3 support briefly explain what HTTP/3 features are important to you e.g. QUIC (to provide better multiplexing), better header compression, etc.?

Thanks!

I like the connection migration feature, which means when you walk outside, from one BTS to another, the connection will not be reset, or maybe you just walk to home, the net changed from 5G to WIFI, your connection to server will keep with the same connection id.

techwn avatar Nov 08 '22 07:11 techwn

FWIW, package:cronet_http is also available on Android and supports HTTP/3.

The API is the same as package:cupertino_http so it is possible to use cupertino_http on macOS/iOS and cronet_http on Android.

brianquinlan avatar Dec 14 '22 00:12 brianquinlan

package:cronet_http

@brianquinlan is there any plan for a non-flutter implementation?

iapicca avatar Dec 14 '22 07:12 iapicca

Are there plans to support http3?

SamuelMauricioL avatar Jan 15 '23 02:01 SamuelMauricioL

Any updates on plans to support QUIC protocol HTTP/3

fisforfaheem avatar Mar 22 '23 20:03 fisforfaheem

Are there plans to support http3?

CristovoXDGM avatar Apr 01 '23 03:04 CristovoXDGM