Skip to content
loading...

re: My Struggle With Rails ActionCable VIEW POST

FULL DISCUSSION
 

Great piece and an interesting problem. At work we started off using action cable for a live log so you could see your requests going through our system in your browser. We were already using redis as a comms layer between the Ruby on Rails app and the erlang simulator so it was easy enough to setup the channels and start listening. We even managed to dynamically set the channel names albeit we where setting the users api key and not changing domains.

Ultimately though we ended up using a really small Phoenix application just to manage the channels (request counters and live log). We had to keep redis for rails/erlang comms and listen on that but overall the Phoenix version is much more performant than the rails version was. Hope you get the issue fixed though actioncable has a lot of promise and serves great for the majority of applications.

 

Thanks for chiming in, James. Hey... we're both James!

I've also looked into Elixir/Phoenix for solving this problem and I may move to that framework/language for this particular platform.

ActionCable is amazing but I've yet to see a multi-tenant platform integrate ActionCable yet. Surely I can't be the only use case on the Internet? Granted AC is brand new with Rails 5 so I'm sure as time progresses the kinks will be worked out.

My goal over the next week is to tear AC apart and figure out how to get the request passed from the connection to the channel. I'm hoping to do a PR against Rails core soon that will introduce the request into the channel, but the Rails community is picky about PRs and use cases. So we'll see :)

code of conduct - report abuse