A real-time chat app in 23 lines of Python and 35 lines of JavaScript
github.com
github.com
Would be nice to finally get a replacement for the old RealChat application - everyone seems to be building light ux apps without security. Fine for chatting with friends or coworkers, not so great for open web deployment.
> WebSocket is a low level protocol, Mercure is a high level one. Mercure provides convenient built-in features such as authorization, re-connection and state reconciliation ; while with WebSocket, you need to implement them yourself. Also, unlike Mercure (which is built on top of HTTP and Server-Sent Events), WebSocket is not designed to leverage HTTP/2.
> HTTP/2 connections are multiplexed and bidirectional by default (it was not the case of HTTP/1). When using Mercure over a h2 connection (recommended), your app can receive data through Server-Sent Events, and send data to the server with regular POST (or PUT/PATCH/DELETE) requests, with no overhead.
So my question stands.