dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.62k stars 4.56k forks source link

Add support for WebTransport #43641

Open scalablecory opened 3 years ago

scalablecory commented 3 years ago

With QUIC incoming, WebSockets is being retired in favor of WebTransport. Consider implementing an API for this.

WebSockets may have fallen out of favor versus e.g. gRPC; I don't know enough about the landscape here. @rynowak @davidfowl @JamesNK any idea?

ghost commented 3 years ago

Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.

davidfowl commented 3 years ago

cc @BrennanConroy this looks super interesting for signalr.

This document defines a set of ECMAScript APIs in WebIDL to allow data to be sent and received between a browser and server, implementing pluggable protocols underneath with common APIs on top

☺️

halter73 commented 3 years ago

In the browser, gRPC-web client-streaming is still very new. SignalR still uses WebSockets as its primary transport.

wegylexy commented 3 years ago

I wish SignalR can take advantage of reliable streams and unreliable datagrams of WebTransport.

MeydanOzeri commented 3 years ago

any update on that ? is it planned anytime soon ?

wegylexy commented 3 years ago

Since the QUIC datagram extension is not yet RFCed, I wouldn't expect it in .NET 6 soon even though msquic already supports it.

wegylexy commented 2 years ago

How possible is it to inject custom transport implementation for non-browser use cases? e.g. replace WebSocket with a QUIC stream to share an existing QUIC connection in another custom service. I can think of intercepting the Redis backbone.

davidfowl commented 2 years ago

@wegylexy it's not clear what you're asking for here. Where do you want to replace the transport?

wegylexy commented 2 years ago

@davidfowl in addition to WebSocket, long polling, and server push, I want to add a custom transport by implementing certain interfaces (dependency injection), without baking it into the runtime.

davidfowl commented 2 years ago

@davidfowl in addition to WebSocket, long polling, and server push, I want to add a custom transport by implementing certain interfaces (dependency injection), without baking it into the runtime.

But what does that mean? Add a custom transport to what? Are you talking about SignalR?

wegylexy commented 2 years ago

Oh, ya. Didn't notice the original issue is not scoped to SignalR. Yes, I just want to inject a custom SignalR transport.

wegylexy commented 2 years ago

I figured that I can inject clients from QUIC connections into HubLifetimeManager<> in a custom hosted service via a dedicated stream, without touching internal SignalR transports.

wegylexy commented 2 years ago

Let's see how https://github.com/wegylexy/webtransport may be incorporated into the runtime.

ghost commented 1 year ago

Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.

Issue Details
With QUIC incoming, WebSockets is being retired in favor of [WebTransport](https://w3c.github.io/webtransport/). Consider implementing an API for this. WebSockets may have fallen out of favor versus e.g. gRPC; I don't know enough about the landscape here. @rynowak @davidfowl @JamesNK any idea?
Author: scalablecory
Assignees: -
Labels: `api-suggestion`, `area-System.Net.Http`
Milestone: Future