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

Status? #7

Closed
azenla opened this issue Nov 30, 2015 · 16 comments
Closed

Status? #7

azenla opened this issue Nov 30, 2015 · 16 comments

Comments

@azenla
Copy link

azenla commented Nov 30, 2015

Is there a status update on this package? Will it make it easy for me to transition my current HTTP Server code to HTTP2?

@azenla
Copy link
Author

azenla commented Dec 10, 2015

@mkustermann

@mkustermann
Copy link
Member

Right it is now possible to make a http/2 only client and server with the code in this package. There are examples in this github repository showing how one can do this (and it's possible to make abstractions on top if one wants). One of the main motivations of creating this, is being able to make a gRPC client/server in Dart, which is now possiblie.

The other question is whether it will make it easy to make a general http client/server (supporting both http/1.1 and http/2). This is currently not easily possible, due to the fact that dart:ios implementations of http/1.1 are not reusable. There are two options, either make the dart:io http/1.1 implementation more reuseable (basically: select the version based on negogiated ALPN protocol). The alternative is simply extracting the dart:io implementation into a package. We'll be discussing this and see what the best solution is.

@sgjesse

@davenotik
Copy link

Thank you for the insights. I'm following along, hoping to try http2 to speed up my Polymer.dart site soon!

@mkustermann
Copy link
Member

A quick update:

I've made now a shelf adaptor which is available here: mkustermann/shelf@80329c2 This just exposes a new serveSecure method. An example can be found example/multiprotocol_server.dart. Feel free to try it out and provide feedback.

Though I'll expect it to take a bit more time before it can land.

@dynaxis
Copy link

dynaxis commented Jan 13, 2016

@mkustermann the new MultiProtocolServer seems built on whatever readily available in dart:io. And shelf seems being tweaked for simplifying building of multiprotocol servers. Is it the current, at least tentative, decision for what's coming in the end? Are the possibilities you mentioned above all dropped?

BTW, It's really good to see such good progress. Thanks.

@mkustermann
Copy link
Member

@dynaxis Yes, I've found a way to inject http/1.1 sockets into an HttpServer instance by using the new HttpServer.listenOn(ServerSocket) constructor by passing a custom version of ServerSocket. I didn't know about this method before.

But what I wrote is still true for the client. The HttpClient does not support injecting things (like the HttpServer.listenOn does) and I expect it to be much more complicated there. The HttpClient is very monolithic and has support for http proxies, http authentication, redirection .... This functionality is also needed if we hit a server that supports http/2. But since HttpClient is doing the socket connections internally - and we can't inject anything - we need to change it.

We've talked about this topic a bit, and the conclusion was that if it would require bigger changes to the dart:io HttpClient then we rather copy that code to a package and modify it there.

@Scorpiion
Copy link

Hi, sorry to bump the thread but I was a little curious. Personally I'm mostly interested in gRPC support, I liked this quote:

"One of the main motivations of creating this, is being able to make a gRPC client/server in Dart, which is now possiblie."

I know this is not the issue tracker for the future gRPC package, but since these packages are so related I thought I could ask here. Have there been any development on a gRPC client? I don't know the details of how much work is involved, but if this package no longer a blocker I am indeed curious if work has started on the gRPC part.

The announcement of TensorFlow 0.8 with support for gRPC reminded me to check the status for gRPC with Dart. We also have a quite big code base using a custom transition layer to execute Go's standard builtin RPC methods via a Dart backend that I have plans to maybe port over to gRPC when possible.

@mkustermann
Copy link
Member

Lately we have shifted our focus a bit more towards all our client side efforts (flutter, dartino and dart4web) and that's why we haven't started working on gRPC so far. But implementing should be fairly straightforward - it was an explicit goal of the gRPC project to base it heavily on http2 and make it as easy as possible to write a gRPC client on top of http2 (in the order of a few 100 lines of code).

I've actually made a proof-of-concept and published it today (see grpc-dart-poc and an example of making gRPC calls to the Pub/Sub service ).

It would be awesome if the Dart community would make a pub package for gRPC.

/cc @Scorpiion

@Scorpiion
Copy link

Thanks for the update Martin, I understand there is a lot of interesting projects to work on...

Great to see that you could do a proof-of-concept so fast! Yeah maybe it could be a nice addition from the community, if no one else does it I might take a stab at it some time this summer. I'm a little busy myself as well at the moment, but I think your proof of concept will be very helpful if someone takes on the challenge. 👍

@RdeWilde
Copy link

+1 :)

@dynaxis
Copy link

dynaxis commented Oct 28, 2016

Please roll the development of HTTP2 forward now.

@sandrobilbeisi
Copy link

what about helping the dartVM project implement ALPN under Mac OS X ?

@thosakwe
Copy link

thosakwe commented Jul 2, 2017

A little late to the party here, but... Is this still alive? I'd love to contribute if necessary.

@jakobr-google
Copy link
Contributor

A little late to reply, but yes, this is still alive, and contributions are welcome! I'd suggest opening an issue describing what you intend to do, so we have a place to discuss and agree on your approach.

And ALPN support has been implemented for macOS.

@sandrobilbeisi
Copy link

sandrobilbeisi commented Oct 2, 2017

whoa ! support for ALPN on Mac OS X has been restored for Dart 2.0
dart-lang/sdk#29240

now I'm going to be trying again with multi-proto and gRPC

@jakobr-google
Copy link
Contributor

I'm going to close this one, since there isn't anything extra to do here. When you run into things that don't work, or you wish package:http2 would do, please file issues!

Development is still ongoing. My contributions are driven by what it need for dart-lang/grpc-dart, and other contributions are very welcome, too.

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

No branches or pull requests

9 participants