WebSockets is a beautiful way to allow the client-server communication using a persistent bidirectional channel without the client having to poll the server.
In this article I’d like to explain how to get started with websocket in Ruby on Rails from a generic application. I wont’ dive into what is a Websocket or how to create a Rails project. I’ll just leave some links at the end of this article.
Context: a PHP server and a MySQL database. This is a very common setup. You’ve to create a PHP script that interact with that database, but you’ve no access to the server because only script from localhost works due to firewall security restriction for example.
Problem: To test your script you’ve to open a FTP client, upload the .php script to the server and test it. Every time the php file changes you’ve to repeat this procedure, not considering that make attempts in production is a very bad practice.
Solution: Docker can come to rescue as he let the developer…
Computer science master degree, mobile and full-stack developer, research fellow in the field of accessibility at the University of The Studies of Turin..