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

Allow Phoenix to provide generic WebSocket support #5003

Closed
mtrudel opened this issue Oct 3, 2022 · 1 comment
Closed

Allow Phoenix to provide generic WebSocket support #5003

mtrudel opened this issue Oct 3, 2022 · 1 comment

Comments

@mtrudel
Copy link
Member

mtrudel commented Oct 3, 2022

This issue serves as an omnibus overview of the work being undertaken to improve Phoenix's ability to be hosted by web servers other than Cowboy, and as a follow-on benefit, simplifying the WebSocket implementation in Phoenix. The goals of this workup are to:

  • Allow Phoenix to provide WebSocket functionality via a Plug-mediated upgrade flow, using Plug's new Plug.Conn.upgrade_adapter/3
  • Expose sockets via the Sock API
  • Simplify the implementation of Phoenix.Endpoint by leveraging Plug.Router, now that everything is done via Plug
  • Remove the necessity for Phoenix.Endpoint.Cowboy2Handler, now that everything is done via Plug & Sock

The work to enable this spans a number of PRs across the Plug, Plug.Cowboy & Bandit repos:

All of the above work is complete, testing green, and functional (with the exception of commits to update Mix dependencies as the various PRs above are merged). The primary concern now is staging PR reviews in the correct order. To that end, a proposal:

Review & Merge Proposal

  1. Plug folks to review & merge changes in Plug PR above and push a point release of Plug once merged
  2. @mtrudel to update Plug.Cowboy & Bandit PRs to depend on this new released version
  3. Plug.Cowboy folks to review & merge Plug.Cowboy PR above
  4. @moogle19 to review Bandit PR above done
  5. @mtrudel to update Phoenix PR to depend on this newly released Plug.Cowboy version
  6. Phoenix folks to review Phoenix PR
@mtrudel
Copy link
Member Author

mtrudel commented Nov 1, 2022

This work is now done! There are a number of followup tasks which are small enough to be handled via standalone PRs:

  • Landing WebSocket upgrade/handling support via Sock (Websock support #5063)
  • Moving socket declarations into Router
  • Updating docs / generator flags to make Cowboy 'one among several' possible servers

I'll make sure any such issues get back linked to here

@mtrudel mtrudel closed this as completed Nov 1, 2022
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

1 participant