Introduction to ActionCable
Learn about immediate communication with ActionCable.
We'll cover the following...
We'll cover the following...
Background
In the last chapter, we learned how to communicate with the server using regular HTTP requests and receiving either HTML or JSON in response. One feature of our server interactions in both Stimulus and React is that we are simulating a real-time connection with the server by polling the server repeatedly.
Problems with polling
Polling this way has some potential drawbacks. That is, there’s some extra overhead to make all the HTTP calls locally and querying the server often can have negative performance implications.
WebSocket protocol
An alternative for client-server ...