Could any one recommend a robust TCP server (like Node.js for JavaScript) for Ruby? I understand that there is a TCPServer class available for Ruby but I need something that is more robust because I don’t want to have to write code to deal with multiple clients and multi-threads etc. Is there any library/framework for Ruby TCP server that is sort of like Node.js?
Could any one recommend a robust TCP server (like Node.js for JavaScript) for Ruby?
Share
It sounds like you’re wanting EventMachine or Celluloid. EM is event-driven concurrency, which operates very similarly to node.js. Celluloid is more traditional multithreading.
If you’re using MRI, I’d recommend looking at EM first, due to limitations in MRI Ruby’s concurrency model. If you’re on JRuby, then Celluloid may be the right solution.