I am new to EventMachine and am integrating it with a Rails application. I intend to use the EventMachine reactor for connecting over AMQP (ruby-amqp), http/s as well as other protocols.
I start the EM loop in a separate thread, initialized via a Rails initializer script. But thereafter, if I intend to add new channels / queues, or connect to URLs, how do I add these resources to the EM reactor?
1. Is it using EM.next_tick?
2. Is it by encapsulating access to the resource using a deferrable?
3. Is it using EM::Queues?