Skip to content

Instantly share code, notes, and snippets.

@paul
Created May 10, 2012 20:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paul/2655669 to your computer and use it in GitHub Desktop.
Save paul/2655669 to your computer and use it in GitHub Desktop.
Transcript of http://www.youtube.com/watch?v=bzkRVzciAZg, from http://pastie.org/pastes/3583544 but formatted to be readable.

Transcript of http://www.youtube.com/watch?v=bzkRVzciAZg

p1: And in conclusion we have found apache to be an excellent server for our web applications. Any questions?

p2: Yes, I have a question. Why didn't you use node.js? node.js is an event driven, non-blocking IO server that can be used to build high-performance web applications

p1: That is an excellent queiston. We evaluated several alternative webservers and concluded, that while options like node.js are very interesting, Apache meets our needs and has a solid track record.

p2: But it doesn't have performance. Everybody knows that apache applications are slow because they use blocking IO and have context switches.

p1: Thats a commonly held belief that threaded web servers are somehow less performant or as scalable then event based servers. In fact, if you measure carefully, you will find that both models have similar performance characterstics.

p2: Threads don't scale. Simple as that.

p1: That may have been true 10 years ago. Its not true today.

p2: node.js will run circles around apache because apache was built before asynch was discovered.

p1: This is where I typically stab myself repeatidly in the ears with a fork until I stop hearing you. I've looked at node. It uses a single threaded loop that dispatches events to handlers. Its a proven model that solves some concurrency problems but at the cost of code complexity.

p2: It gives techies like me the control to wring every last cpu cycle out of our servers.

p1: It must feel empowering to be totaly responsible for the perfoance of your application. To be always on the lookout for blocking operations that should be split into little pieces each perfectly tailored for concurrent thruput. All the complexities of assembler with all the speed of javascript.

p2: I'm a total speed junkie

p1: Do you know what this reminds me of?

p2: The invention of the transistor.

p1: It reminds me of the invention of threads. Threading librarys do exactly what your doing manually. They break up pieces of code to be executed intermintainly, switching from instructions that are waiting on IO to instructions that are ready to run, but your sequential code stays intact. You may recall sequential code. Its the code that you can read.

p2: But its slow as a dog

p1: Your asynch program is like something from a 19th century gothic horror story. Drunk with your own sense of power, you reassemble pieces of code that were once coherrent, stitching them together with event loops and callback functions, untill your monster, grotesque and menancing, is ready to be brought to life in a javascript VM. You throw the switch and the hideous creature awakes, rises, and lurches foreward. you're simultainously elated and terrified that something so unnatural code work at all. When you relize what you've unleashed, the pure immorality of it, your creation reaches out with its bloody, mangled arms, and strangles you

p2: But its fast as hell

p1: If your willing to suffer complex code for perfomance, why not write an engineX module and see?

p2: node.js is the most bad-ass rock-star tech to come out since ruby-on-rails

p1: As much as I want to be an optomist and look foreward to human progress, people like you make stop me dead in my tracks. Your a fanatic in the church of technology fashion. I could present you with fact after fact after fact of why your thinking of asynchronus programming is completely wrong.But why bother when you equate technology to rock bands, and fancy yourself a software hipster by wearing your node.js t-shirt and celebrate horrible code. Maybe your cool. Hell, maybe you have groupies. But when it comes to knowing what the fuck you're talking about, you have the facilities of a parrot who says "non-blocking" over and over again.

p2: Non-blocking is the secret in the asynch sauce. With it, you go fast. Without it, you go slow.

p1: Do you know when humans discovered that the world was round?

p2: 1492. Columbus sailed the ocean blue.

p1: It was 240 BC by a greek mathmatitecean named Eratosthenes. He conducted a simple expirament using the length of shadows and the distance between cities to not only prove the earth is round, but to also calculate its circumfrance.

p2: Sounds low-tech.

p1: It was utterly brilliant. But somehow, for one and a half mellinia, it was common knowledge that the earth was flat. Hundereds and hundereds and hundereds of years in daft ignorance. How in mother-fucking hell does this happen?

p1: It was you. You who makes claims about thread performance without measuring. You who claim hacking your code with a machate, turning it inside out into a twisted, unrecognizable mess will somehow make it go faster. You, who spend your time alternating between problems that are already solved and problems that don't actually exist. You are the reason science was set back 1,000 years. The reason we have not cured cancer. The reason we have not solved world hunger

p1: Its because of you mother fucker that we are not all using lisp.

p2: I'm sorry, what was that last part again?

p1: Never mind.

p2: Did you just say lisp?

p1: You misheard me.

p2: I could've sworn you just said lisp.

p1: If there are no other questions, this concludes my presentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment