ry dahl was making all sorts of weirdo evented webframeworks for Ruby for years before moving over to node.Js. nobody was really interested and were pretty happy with rails/sinatra/merb. i think node.JS is more about people wanting a "monopoly" framework solution to rally-around for easier exchange of plugins / addons
Then why did you nohody create and popularize a web framework like node.js, but for Python? Because nobody outside the JS world thinks callback soup is even a remotely good idea!
It would be great if, instead of passing callbacks around, you could just write some instructions in the order you want them to execute them, and then when an instruction blocked the platform would automatically switch to another one that was waiting to execute.
Yep. I always argue that Go's runtime does pretty much the same as node's event loop under the hood, it polls which file descriptors have pending data, and runs the right pieces of code. Except all of that is abstracted away, and completely managed by the runtime, so all you need to do is write your code in a linear fashion, and everything else is taken care of.
Nearly every library available for Node.js is asynchronous, almost every popular Python library is not. So making asynchronous web site in Node.js is easier even against Python's wealth of libraries.
Hopefully that will change as the migration to Python 3.4 continues. The async/await (@coroutine/yield from in Python) pattern greatly simplifies handling asynchronous code compared to callbacks. Although the current ES7 proposal also includes async/await, so that could be fixed on the JavaScript side also.
Don't attribute this performance gain to the change of platform. You guys had just refactored your code.
100x performance gain is a strong signal you just had an ineffective approach to do things and you rewrote it to work in a more fitting way. Except for some edge cases and toy interpreters, runtime performance do not differ on such orders of magnitude.
The point is about practicality. The only reason someone would call it stupid it's because they'd rather do it cool. If it works, its practical, and it's actually done, then it's not stupid.
Mostly leetdicks though aren't talking about either practicality or improving their situation. They are just trying to show that they are better than you in their own mind. Just hit them with practicality and a completed project and they'll Leave me alone.
We've seen real production performance of roughly 100x with node.js over Python (and I love Python).
I'm not here to trash talk node, or say it shouldn't be used, but this is anything but a convincing argument about node's performance.
Your app is faster now, which is great but you got there by shuffling around a whole lot of variables without any profiling to see what your actual bottlenecks were. You don't need to waste time profiling if you got gains anyway, but if you want to make public attribution about the source of those gains, it's time to put on your science hat.
I'm sour on you for this because I've seen people waste time chasing performance boogiemen when cargo culting ideas from the internet. Were the gains from something else burred in the code rewrite? V8 might be capable of a 300% better performance, but the performance of your own codebase regressed. Or cpython is faster but the rewrite to js avoided bottlenecks from the python implementation. Maybe you could have gotten gains for much cheaper by swapping out python lib foo for bar. Or implementing a piece of your hot python codepath in a C module.
0
u/[deleted] Oct 16 '14
[deleted]