-
Notifications
You must be signed in to change notification settings - Fork 247
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
MAJOR changes for Listen 3.x (no TCP, no Celluloid) #319
Comments
Thanks @e2, I will try & review the proposal next week! |
Hey @e2, sounds like all great ideas, I'm completely for an easier codebase to maintain. 👍 |
Ok, I'm done - there are a lot of changes here, but mostly removing code and reimplementing in new classes. It's funny, but Listener's initialize method pretty much gives a bird's eye view of the architecture (and the messy dependencies): Lines 39 to 57 in 2ee1fb0
Anyway - I plan to merge this into master, and release this as a 3.x prerelease. I haven't tested performance properly, but here is a comparison with current 2.10: 3.x proposal here (forced polling): current released 2.10 (forced polling): (5 times less CPU usage - YMMV) |
Awesome! |
TL;DR - very good question. In short, TCP has pretty much nothing to do with Listen, and custom implementations/setups will always outperform whatever Listen can provide. If you can, go to #258 and explain your use case accurately (what os you're listening on, what os you're receiving on, what kind of changes you're making, and what you're using, e.g. Guard). Details: I intend to release separate gems for TCP support. I indent to do it natively, because there's no need for Celluloid when running the TCP server and listeners in their own app. This should help with Windows issues also and VM setups. I may try to create a minimal TCP-only version of Listen, but I need use cases to make sure I properly set up the buffering, latency, queue optimizing, etc. TCP has little in common with Listen - and this just obscured the codebase too much. Some scenarios can be handled with specific tools, e.g. netcat, pipes, ssh, etc. Examples of issues/conflicts:
|
Closing, since 3.x is released. Linking to issue about extracting TCP: #258 |
Listen's priorities have drastically changed since it was created. Time to deal with major problems.
Current the major issues are:
Proposal for Listen 3.x
Proof-of-concept PR here: #318
listen-server
andlisten-client
)Feedback
Highly appreciated here - even being picky about minor stuff (since that can suggest other important refactorings).
/cc - @thibaudgg , @rymai
The text was updated successfully, but these errors were encountered: