News for hackers. Stuff that matters.
Re:Hotwire: HTML over the Wire by sfusato on Wednesday December 23, 2020 @07:18AM (#25516780)
Your idea of "long polling" sounds more like periodic polling (repeated requests within a frequency), though that's not what long polling is or how it works.
Re:Hotwire: HTML over the Wire by nickjj on Wednesday December 23, 2020 @08:58AM (#25517660)
> Your idea of "long polling" sounds more like periodic polling (repeated requests within a frequency), though that's not what long polling is or how it works.

Right isn't long polling keeping the connection open for every client on the server and then the server is doing interval based loops in the background until it gets a request from the client or times out?

It wouldn't be doing a separate HTTP request every N seconds with setInverval like the "other" type of polling but it's still doing quite a bit of work on the server.

In either case, LV's long polling is much different than keeping no connection open, no state on the server and only intercepting link clicks as they happen for Turbo Drive and Turbo Frames.

I don't think that's necessarily a big deal with Elixir (I wouldn't not pick it due to this alone, etc.), but this thread is more about the differences between Hotwire and LV, and no state being saved on the server for each connection is a pretty big difference for the Drive and Frames aspects of Turbo.

Re:Hotwire: HTML over the Wire by sb8244 on Wednesday December 23, 2020 @10:32AM (#25518591)
Yes there is a lot of stuff different here. I don't want to take that away. Just pointing out that websocket only is not accurate.