4 ms·
Genuine question: what advantage does Node give you over EventMachine?
by rahoulb 13y ago
Genuine question: what advantage does Node give you over EventMachine?
- camus 13y agoIn node all IO is async by design. So it is likely any lib you'll use will be async too.
- sturadnidge 13y agoThe creator of Node was something of a Rubyist, i believe the main reason was around the stdlib / ecosystem not being event oriented, making it difficult to build non-blocking applications. EventMachine may well have strategies to defeat this, I just don't know. This video gives some good insight into what led to his decision to start fresh rather than try and change things in Ruby http://m.youtube.com/watch?v=SAc0vQCC6UQ http://m.youtube.com/watch?v=SAc0vQCC6UQ So that's probably the biggest thing about Node - everything in the core is built with event orientation in mind, so you know you're not going to hit something that will block and kill you, and that minset is pervasive in userland too.
- tomphoolery 13y agoWow, what a journey!
- otterley 13y agoAmong other things, ludicrous speed, and a reasonably decent debugger.
- omarforgotpwd 13y agoThe virtual machine node uses, V8, is very fast. It was written by Google for Chrome and is much faster and lighter than the ruby interpreter.
- tomphoolery 13y agoOne thing I enjoy about NodeJS is their standard library is asynchronous until you want it to be. Most of the NodeJS libs in NPM are also designed in this way. With EventMachine, you have to be careful what you're using because some of those RubyGems will probably include blocking IO. When you're doing that kind of programming, I think it's better to use a language or ecosystem designed specifically for that purpose rather than use a library such as Twisted or EventMachine which is inside another language that may or may not support what you're doing. This has no basis in theory or anything, just my own experience. Makes things easier for me, that's all.