roadrunner icon indicating copy to clipboard operation
roadrunner copied to clipboard

[💡FEATURE REQUEST]: Support SSE as an alternative to websockets

Open steffendietz opened this issue 3 years ago • 2 comments

Now that we have websockets as a means to provide (bidirectional) push communication from the server to the browser, it would also be nice to support server-sent events for (unidirectional) push messages.

SSE could potentially use the already existing pub-sub infrastructure of the websockets.

Additional context This was discussed here https://github.com/spiral/roadrunner/discussions/704

steffendietz avatar Jun 07 '21 08:06 steffendietz

Thanks @steffendietz. I'll investigate the possibility of adding this feature.

rustatian avatar Jun 08 '21 07:06 rustatian

TODO: investigate with Mercure: https://github.com/spiral/roadrunner-plugins/issues/6

rustatian avatar Dec 25 '21 16:12 rustatian

We've implemented the bidirectional communication via centrifugo (browser <-> RR <-> PHP): https://github.com/roadrunner-php/centrifugo Unfortunately, a separate SSE plugin is not planned. Thanks for the FR 👍🏻

rustatian avatar Mar 24 '23 01:03 rustatian

SSE feature would be fantastic! (Considering that the main RoadRunner competitor, FrankenPHP, has one.)

maximal avatar Apr 01 '24 15:04 maximal

Hey @maximal 👋 That's cool, that FrankenPHP supports this 😃 I'm not against this feature, would be happy to review the PR 😃 Nowadays, RR supports HTTP response streaming as well as HTTP 103 early hints code.

rustatian avatar Apr 01 '24 15:04 rustatian

@rustatian, okay, I’ll investigate into this.

maximal avatar Apr 01 '24 15:04 maximal