-
DescriptionHello, I have long hoped and waited for Symfony to have a full-fledged websocket server integrated with the framework, I think modern work without it is simply useless, for example, Laravel has long had a full-fledged and integrated websocket server with the framework, Symfony is 20 years old and there is still no websocket server for it, and as for what is called Mercure, it is simply not serious for me and is not even a websocket but just a notification channel ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
The issue with websocket is that you have to maintain a connection open for every client. Mercure is a competing technology that leverage HTTP Server-Sent-Events. It is very well integrated with Symfony: https://symfony.com/doc/current/mercure.html |
Beta Was this translation helpful? Give feedback.
If you are talking about browsers on mobile devices, they support EventSource as well, not only desktop browsers, as this is a standard feature of browsers (btw, SSE over HTTP/3 performs much better than WebSocket in a roaming context, as you get the benefits of QUIC which deals better with roaming connections than TCP)
If you are talking about using it from native applications, implementing the client side of SSE can be done in any context able to keep a long-running connection to a server (which is also a requirement for implementing WebSocket). And there are libraries providing this feature in many languages. For instance, java has
okhttp-eventsource
(and probably others) and I foundLβ¦