cLiPPi

cLiPPi

Phoenix and Mercure

Hey all,

I wonder if you have ever heard of / discussed Mercure, which is a protocol for real-time communication and kind of an abstraction of pub-sub.
I think that Phoenix channels are quite on par with the functionality it offers, but still wonder if anything could be gained by writing a Phoenix-Channel based implementation for a hub / server.

As far as I can see, several frameworks, i.e. Symfony and Laravel, include modules to use a mercure implementation to publish updates to client applications via HTTP/2.

There is a reference implementation written in Go, but as far as I can tell, having an Elixir implementation (which would probably perform very well) could help spread Elixir to other ecosystems such as PHP in a world where real-time updates become more important.

What do you think?

First Post!

wolf4earth

wolf4earth

Disclaimer: up until now I’ve never even heard of Mercure. So my impression might be totally off.

From what I see at a glance I fail to gather how having support for Mercure would provide a tangible advantage over what Phoenix channels already provide today.

Why do you think it would help to spread Elixir to other ecosystems?

Most Liked

LostKobrakai

LostKobrakai

Seems like Mercure was created to make persistent connection easier for non-persistent server environments or languages. So they created a hub between the client and the server. If you already have a client speaking their protocol then phoenix could probably be hub and application server in one. For new projects I’m not sure I’d be interested in it though.

Last Post!

cLiPPi

cLiPPi

I already mentioned I think channels are on par with the things it offers. That is why I think it would probably be very easy to implement a hub in elixir with phoenix channels.

I could also imagine streamlining the client-side channel javascript client with this protocol. Not sure if that is worth anything, but it would allow channel-based code to work with any hub.

The more concrete usecase for a hub would be adding real-live functionality to languages lacking a good tool for that (like PHP). A hub implementation (possibly the one in Elixir) could be used to overcome this for existing apps written in, say, Symfony (or any other framework that happens to have a Mercure module).

This thread is not to convince anyone that there would be merits to this. It is more trying to gather your thoughts if there are merits.

Where Next?

Trending in Discussions Top

AstonJ
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
Lucassifoni
Hello, I had started to work on two “convenience” libraries some time ago : DtsBuddy and Pwmx. Due to my SAAS starting to get clients, m...
New
ashkan117
Background Hey everyone, I’ve been working on developing a personal planner over the last two years called Alpen. Yes I know another tod...
New
Herve37
We’re evaluating alternatives to Stoplight and looking for feedback on: OpenAPI support Documentation workflows Testing capabili...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
nseaSeb
The IETF published RFC 10008 in June 2026, standardizing a new HTTP method: QUERY. It’s meant to fill the gap between GET (safe/idempoten...
New
blackode
Issue: Response count mismatch in decode function under concurrent load Setup: 4-node cluster, 500 concurrent HTTP requests dispatched v...
New

Other Trending Topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
garrison
For those who are not aware, “AI agents” are, for the most part, commodity LLMs which are given access to “tools” and prompted to complet...
#ai
New
bjorng
We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our...
New
telnyxhiring
Introductory paragraph Telnyx is an industry leader that’s not just imagining the future of global connectivity—we’re building it. From ...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New

We're in Beta

About us Mission Statement