I've got a Rails application with a PubSub Server (Faye) as middleware.. I've got the usual Rails-structure for Models, Views and Controllers, and I've got some controllers for my Socket-channels.. (Provided by FayeRails)
The problem: I need to share a client list between my socket controllers and my general controllers. This is because the authentication is done via a Rails controller (so I'm able to use sessions)..
Normally I would put this kind of stuff in my ApplicationController
so all inherited controllers and views can get to it, but the socket controllers are inherited from FayeRails::Controller
so that not an option.. I have no clue where the instances of these controllers go.. Also, I can't edit the initialize because all the controllers are setup automatically by Rails and the FayeRails gem. I tried using globals, but that feels wrong.. Also I've been thinking of ActiveRecord, but it doesn't feel right to add fast-changing data to a database.. Lastly I though of an ActiveRecord-like class that holds the list, but this feels the same as a global..
I can't really think of any other options to share the client list between these two controllers..
What would be a nice and clean way for doing this?