Python vs. Node vs. PyPy benchmarks
blog.kgriffs.com
blog.kgriffs.com
http://blog.kgriffs.com/2012/12/18/uwsgi-vs-gunicorn-vs-node...
http://nichol.as/benchmark-of-python-web-servers
Even more perplexed, why wasn't the payload and the WSGI apps sources published?
If not, what browser are you using? It would be nice to know if Flot is not compatible with something.
I also tried Konqueror Version 4.8.4 (KDE's browser) and it didn't even display the graphs (not in the blog post or on flotcharts.org).
And for the record, I don't care one way or the other which is "faster," just make a damned test where one isn't given such a clear leg up.
On physical hardware the race is pretty close (except node, python-gevent, but cluster node did very well).
http://eric.themoritzfamily.com/websocket-demo-results-v2.ht...
1. The evented servers are bound to one CPU, Erlang will use all CPUs
2. any bit of blocking code will stall the other code, even it just for a moment.
It is a little unfair to compare the two approaches.EDIT:
Also it would seem benchmarking Erlang and forcing it to run on a single core just like node.js is deliberately handicapping it. One of the strengths of Erlang is exactly the ability to take advantage of multiple cores.
Facebook was built on PHP and MySQL, both of which are awful pieces of crap.
Twitter went down like every week for a year. It was written on RoR by people who didn't really know RoR.
Meanwhile, a bunch of better engineers using better technology got their clocks cleaned while the winners eventually had so much money they could afford to hire an army of engineers to rewrite everything.
If you know Javascript really well, use Node (although I feel sorry for you). If you know Python really well, use Python (yay). If you don't know anything, well, pick something. If you are choosing a programming language because of how many QPS you can get on some trivial task, you are an idiot.
You know the graph I would like to see? A scatterplot of how good various startup founders and early team were on engineering vs finding a market fit, with the dots labeled with how rich they are now.
The point is that pypy can crunch almost as fast as Node.js, so while Node.js may set the standard, Python is not bad choice either from performance perspective.
[1] http://blog.kgriffs.com/2012/12/18/uwsgi-vs-gunicorn-vs-node... (link originally posted by jdub in this discussion)
Isn't there software for colorblind people to correct that? (Something that changes the palette of colors displayed...)
__import__('BaseHTTPServer').BaseHTTPRequestHandler.address_string = lambda x:x.client_address[0]EDIT: Downvote me, I don't care.
Or is this a way to say that you feel more satisfied with your work in Python than with your work in node?
- If the majority of our industry can make the switch to JavaScript, they'll ruin it in terms of average code quality.
- Even good, idiomatic JavaScript code sucks for reasons inherent in the language.
- I wish people wrote just good enough Python or Erlang or Haskell or whatever code instead of excellent PHP/JavaScript.
So yes, I treat PHP and JavaScript backend jobs equally.
[Edit: grammar.]
Care to elaborate?
- No proper packaging/namespacing
- Completely idiosyncratic results when operating with mixed data types (10 + 'p' = '10p', 7/0 = 'infinity' and all that)
- Variables default to a pseudo-global scope
- Prototype based 'inheritance', while cool, is just cumbersome and inelegant compared to languages that have proper object oriented language constructs
- Take all those and a syntax that was partially taken from Java, and you end up with verbose code jumble that is way more difficult to read than equivalent Python/Ruby (even C#)
http://nodejs.org/api/modules.html
- Completely idiosyncratic results when operating with mixed data types (10 + 'p' = '10p', 7/0 = 'infinity' and all that)
I wouldn't call it idiosyncratic but just use Underscore and you are fine.
- Variables default to a pseudo-global scope
just use 'var' when declaring them
- Prototype based 'inheritance', while cool, is just cumbersome and inelegant compared to languages that have proper object oriented language constructs
Any OO is cumbersome and should be used only when it makes sense. If you don't like prototype based inheritance you can still use traditional OO with extra libs.
- Take all those and a syntax that was partially taken from Java, and you end up with verbose code jumble that is way more difficult to read than equivalent Python/Ruby (even C#)
Sorry to disagree again but there are many people preferring bracket based languages over those omitting them. You can quickly identify blocks and navigate through the source. And JS isn't verbose like Java.
JS has its quirks like any other languages but these are just very few and you get tons of amenities in return.
As you say, libraries work around a lot of these problems, but most of these workarounds are hacks. 'require.js', for example. And you shouldn't need to use underscore to get sane typing. About OO... It's debatable, I think languages like CoffeeScript and TypeScript have done a good job of abstracting the weirdness, but that's the thing: they are languages that compile to Javascript.
Anyway, I like Javascript, don't get me wrong, it's just that I don't think it's a great choice for big codebases. I know I get a lot of hate every time I say this, but to me Node.js is an excellent example of using the right tool for the wrong job. Had the energy been put behind developing the same concept as a library to a language with a decent standard library, so much work would've been saved 'catching up'.
No other language offers C-class speed, that rich ecosystem (which is fully async) paired with such an easy approachability plus the best and most modern package manager around. Speed is not everything but users won't tolerate unresponsive web services based on sluggish language implementations and cumbersome frameworks anymore, it's not 2005.
Why do you think did Airbnb, LinkedIn and many more choose Node in production for high traffic apps?
Don't get me wrong, Python, Erlang, Haskell are great languages, I love them all but since V8/CrankshaftJIT/Node, JS is playing in a different league with an amazing cost-benefit ratio and I am confused by people ignoring this (however, I see rather Go and Clojure as real contenders to JS since they offer modern language concepts too paired with speed and real concurrency but they are again compiled and deploying JVM based stuff (Clojure) is no fun at all).
In what world is typing "lein uberjar" and moving the resulting file to your webserver considered hard?
http://stackoverflow.com/questions/12867263/why-wasnt-pypy-i...