3 ms·
> is that it seems you now need to keep a connection with every connected client But seriously, what is the problem with this? I am guessing you don't really
by dnautics 5y ago
> is that it seems you now need to keep a connection with every connected client
But seriously, what is the problem with this? I am guessing you don't really have much experience with the BEAM. It's completely not-objectionable, there aren't many stability issues, and they are very light weight (maybe a couple of kB/process).
I believe (have not done this myself) you can do liveview over long-poll, since liveview only cares about there being Phoenix Channel, which abstracts over websocket/longpoll.
https://equip9.org/2020/01/06/phoenix-liveview-longpoll https://equip9.org/2020/01/06/phoenix-liveview-longpoll
One of the things I want to try for the gee-whiz factor is to build an Elixir WebRTC client and serve liveview over a WebRTC data channel. I see no reason why that shouldn't work.
- deleted 5y ago[deleted]
- hamandcheese 5y agoDo Phoenix channels have server-side state though? LiveView has server side state, so long polling would only work if there were also some form of server pinning involved (or a single server). Websockets are persistent connections so no need to worry about pinning a server across several requests.