agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

Replace server from websockets for warp server using wai-websockets middlware #296

Closed diogob closed 3 years ago

diogob commented 3 years ago

The first step towards an authentication system.

The plan is to build a TLS server using warp-tls while keeping the server backwards compatible with plain websockets connection. I've implemented something similar on this project for reference.

In order to make the upcoming implementation easier, get acquainted with the code and have more robust websockets server I first replaced the server used in the websockets proxy server for a warp server.

I believe the TLS layer will facilitate any future authentication implementation and it's an improvement in itself, requiring only a few additional dependencies. The final build of the websockets server executable grew by 2MB.

The TLS part will come in a future PR

agentm commented 3 years ago

Very cool! Thanks for working on this!