Mercure
- https://mercure.rocks/
- built-on: Server Sent Events
- written-in: go
- Centrifugo Mercure similar:
Comparison
WebSub vs Mercure
-
WebSub is a server-to-server only protocol, while Mercure is also a server-to-client and client-to-client protocol.
-
Mercure has been heavily inspired by WebSub, and we tried to make the protocol as close as possible from the WebSub one.
-
Mercure uses Server-Sent Events to dispatch the updates, while WebSub use POST requests. Also, Mercure has an advanced authorization mechanism, and allows to subscribe to several topics with only one connection using URI templates.
Mercure vs Web Push
The Push API is a simplex protocol mainly designed to send notifications to devices currently not connected to the application. In most implementations, the size of the payload to dispatch is very limited, and the messages are sent through the proprietary APIs and servers of the browsers' and operating systems' vendors.
On the other hand, Mercure is a duplex protocol designed to send live updates to devices currently connected to the web or mobile app. The payload is not limited, and the message goes directly from your servers to the clients.
In summary, use the Push API to send notifications to offline users (that will be available in Chrome, Android and iOS's notification centers), and use Mercure to receive and publish live updates when the user is using the app
Mercure vs Centrifugo
- Centrifugo supports more complex and diverse communication protocols beyond SSE, including WebSocket, which is more suitable for environments where high throughput and lower latency are required.
- Centrifugo offers private and public channels, presence channels, and authentication features.
- Scalability: Centrifugo is designed to handle large numbers of concurrent clients, making it suitable for more intensive real-time applications.
- Mercure has that built-in integration with API Platform
Backlinks