ProgrammingNotes

Selvutvikling

May 17

Rails 4, websockets , ActionCable , LiteCable and Anycable.

AnyCable allows you to use any WebSocket server (written in any language) as a replacement for your Ruby server (such as Faye, ActionCable, etc).AnyCable uses ActionCable protocol, so you can use ActionCable JavaScript client without any monkey-patching.

That's what I needed. Since with the current configuration (Faye + PrivatePub) in the future under the load there would certainly be problems.

We had to consider other options. And this was the decision of AnyCable.

How it's works:

There are already two ready-made solutions for Rails 5 and for Sinatra. You can look here.

We use Rails 4, so we had to twist it a little.

To do this, we take LiteCable, a websocket server written on Go anycable-go and link it all together.