I’m following along the book “Programming Phoenix >= 1.4” and Channels are brought up around page 200.
I’ve already played with LiveView prior to buying this book, and I understood that LiveView sits on top of the Channels concept.
Now that LiveView exists, does it make sens to use a Channel-only solution or are there no practical reasons to do so?
I’m asking since I can gather that Channels were a concept baked into the defaults, and those defaults have switched over to LiveView.
I’m wondering if it’s worth spending time learning Channels, or if I’d better spend my time implementing this portion of the book with straight LiveView (I’m fine doing both)
Good to know
I had that same question: “Does LiveView supersede channels?”
I really like Ben’s answer. Thanks for that!
September 15, 2022, 11:44pm
There are a few elixir-elixir libraries for this. I use the former for multi client to server style comms to great success.
Thanks! I hope they remain important, and the creators of Phoenix don’t abandon them. I have just started learning them and plan to use them
They’re the backbone of a lot of the cool things in the ecosystem, including liveview and phx presence—they’re not going anywhere.
Nice! Thinking about connecting backends again, when would you favor using such a channels client over implementing and connecting to a gen server?
The only thing I can think of is using channels could be more practical when crossing WANs.
I understood I can offload processes to other nodes with Erlang/Elixir tech, but no security (must implement some kind of private network)
September 16, 2022, 5:04am
Well, I’m not talking about connecting backends per se. When I was looking into it the advice seemed to be “if you can do it without using Erlang distribution, then do so. It will be easier”. By it, I mean connecting X clients to a server, where clients are applications running on PCs on a LAN.
Got ya, seems like I wrongly assumed the use case for your lib