-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple rooms #18
Comments
I have an idea on how to implement this in some simple incremental steps:
will give a try to the first point and report back when have it working |
Can you implement the first point? I don't fully understand how to do it with EventMachine. |
Yes, sorry for the delay... I will have enough time to contribute on the weekend. I'm not 100% sure how to do, but I believe will be something based on faye channel subscription: Does it make sense? Eventmachine is an hybrid reactor-pattern implementation. While the main thread runs evented loop, you can spawn additional "worker threads" to perform different computations using EM.defer. It would be really cool if @jimmycuadra could give a feedback here :) |
I have tried to subscribe for multiple channels with Faye, but with no result. Is multithreading really necessary for this? I prefer to avoid it. |
Lita already uses it (threads). I have to read documentation again to fully understand whether defer is the right thing or how to use eventmachine own eventloop code correctly (I believe we will have to use something like Fibers). The whole idea is that we need something to subscribe in an "evented way" to different endpoints and when it receives valid data, it should delegate tho the handlers in a non blocking way (this will use defer). This last step is important because handlers can do heavy operations like remote IO, etc. If we don't isolate the handler from the eventloop, lita will have huge latency in crowded channels. |
No description provided.
The text was updated successfully, but these errors were encountered: