Skip to content

Instantly share code, notes, and snippets.

@waylonflinn
Last active September 18, 2015 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waylonflinn/662acb605063dc3ec749 to your computer and use it in GitHub Desktop.
Save waylonflinn/662acb605063dc3ec749 to your computer and use it in GitHub Desktop.
why node?

Why node.js?

Assumptions:

  • three things matter: developer productivity, production performance, infrastructure cost

    • developer productivity: prototyping, productionifying, maintenance
    • production performance: latency, concurrency
    • infrastructure cost: hardware baseline, hardware scaling, operations (dev-ops) overhead
  • same code on client and server (developer productivity)

    • no context switch
    • you can write a custom module for the server and run it on the client
      • this becomes even more important in a service oriented architecture
        • input validation
        • dynamic server-side rendering (initial page load)
    • you can use every fucking module on npm on the client with almost no effort
    • if you use a real database (CouchDB, MongoDB, RethinkDB), you can write your database queries in javascript, producing a zero context switch environment
  • native json

    • oh yeah, the native web data structure is also just javascript (did I mention context switch reduction?)
  • faster than almost everything else (except Go, and maybe Java) (production performance)

  • it's cheaper (cost)

    • you don't need a bajillion expensive servers to scale it
  • AWS lambda could revolutionize the way we do dev-ops (cost, developer productivity, production performance)

    • you don't like to do it, and neither do I
    • less infrastructure set up, maintenance and scaling cost
  • the developer community is smart like a mother-fucking whip

    • no offense to the people who program PHP, but the guy who created node was a mathematician, it shows in the community. I'm an asshole, but I'm right
  • there are more modules on npm than on any other package management platform in existence: http://www.modulecounts.com/

    • like a lot more (almost 2x)
    • and it's growing faster than anything else

References

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