3 ms·
I made a stupid game as LiveView POC [1] which I posted the other day and tested it on different conditions and can comment a bit on the latency. On a LAN you
by conradfr 7y ago
I made a stupid game as LiveView POC [1] which I posted the other day and tested it on different conditions and can comment a bit on the latency.
On a LAN you really don't feel it 99% of the time. However in the game I have a countdown that I initially updated each seconds with LiveView (probably with send_after/4) and I couldn't make it totally reliable, sometimes the updates would queued up, so in the end I "faked it" in javascript with hooks.
Over the internet there is an added latency obviously. I feel it most in the game part because the button has a instant feedback. On the other parts, forms etc, this does not perform worse than a typical SPA.
So I guess it would be very dependent on the kind of application you use it for. Nobody said it would replace all SPAs and javascript. Also the official demo runs an animation at 60 or 100fps IIRC, so there's that.
Fun anecdote, my devops colleagues tried to ddos my app, they failed and all along people were playing the game without any hiccups.
I wonder though how it performs on mobile networks. Aren't some of them terrible for websockets, when changing towers etc? Would the reconnect and session restoring be too much noticeable?
[1] Demo
On a free Gigalixir instance: https://every-weak-tapaculo.gigalixirapp.com https://every-weak-tapaculo.gigalixirapp.com
On a Raspberry4 behind my FTTH: https://nameguess.funkybits.fr https://nameguess.funkybits.fr