They address this in the README of the repo (https://github.com/dunglas/mercure) under the "What's the Difference Between Mercure and WebSocket?" section:
> 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.
Wamp.ws is not raw websocket, it's a high level open protocol standardized and registered at IANA. It features rpc, pub sub, namespaces, realms and has FOSS client implementations in python, c++, java, js, php, c#...
I'd take 46 lines of python and 70 lines of javascript if we could have a moderation panel that gives admins access to vistor ips and ability to block names, ip subnets and cidrs.
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.
8 comments
[ 2.8 ms ] story [ 19.5 ms ] thread> 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.
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.