When user logs into my website I want to open a connection with another server. User requests to my server would translate into read/write requests to that server. The connection object with that server should be alive as long as user is logged in, so that I don't need to reconnect on every user request.
As I understand ruby on rails, all objects in Controllers/Helpers get cleared out once the request is finished. I need to keep that object alive throughout many requests to different controllers until user logs off.
Architecture-wise, is there any place in the RoR framework where such objects can be put?