Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have a Rails app running in production now where I used Faye for the websocket component. Faye is running in an isolated process (the nodejs version actually), and the Rails app POSTs to it through a Sidekiq worker.

Interestingly enough, that's not too dissimilar to the ActionCable model despite using slightly different techs.

Long story short, I had no issues with this set up and it's been running for around a year. I'm not at roflcopter scale, but it churns out about 100k events per month through Rails->Sidekiq->Faye without breaking a sweat.



That sounds really complicated to me. Lots of moving parts to maintain. What is Sidekiq doing for you?


It's simple to me because Rails doesn't know or care about the websocket server, it just understands that it needs to POST data to an end point with certain data. I can have 1 or 100 Rails instances posting to the single Faye server.

The Faye server doesn't know or care about Rails. It just needs to do its job of broadcasting the event to subscribers.

Sidekiq is there for me to easily monitor the events processed, and in theory the Rails app may not be in the same private network as the Faye server, so I decided to make the POST requests happen in Sidekiq. It seems like a good spot for that, since it's a "send it and move on with life".

The Faye server pretty much runs itself, it's been going for months and months without maintenance. Sidekiq gets updated once in a while because I'm using it for other things too and sometimes the app code for it changes, not a big deal tho.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: