Elmish.Bridge
Elmish.Bridge copied to clipboard
Q: SignalR for automatic fallback?
Hi @Nhowka,
I have a question on fallbacks. Is there a plan to use / upgrade to https://github.com/aspnet/SignalR so that Elmish.Bridge
can take advantage of automatic fallbacks? According to https://docs.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-2.1, using Microsoft.AspNetCore.WebSockets
requires the developer (aka either you or the app developer) to implement fallback to alternative transport protocols.
Would love to hear your thoughts on this.
Thank you
Good thinking! I'll check the impact on bundle size if any and if I can keep the ServerHub as it is or give some access to SignalR Hub.
I'm not sure if it will be needed... Looks like there is good support for it: https://caniuse.com/#feat=websockets
As Elmish doesn't do much with javascript disabled, maybe it will be unnecessary complexity.
For us the issue is not the browsers themselves, but rather intercepting proxies / firewalls, which are unfortunately common in corporate environments.
Have you already taken a look at how much effort it would be to model Elmish.Bridge on top of SignalR, or whether the SignalR communication layer can be extracted out?
That's fair. Now that there's a possibility of having more options, I'll do it as a choice and if it works well I'll make it the default. I hope I can work on it soon.