Skip to content

Instantly share code, notes, and snippets.

@laurenhavertz
Created August 13, 2013 17:58
Show Gist options
  • Save laurenhavertz/6223854 to your computer and use it in GitHub Desktop.
Save laurenhavertz/6223854 to your computer and use it in GitHub Desktop.
JS RESOUCRCES
  • event driven computing:

  • multi-threaded process: create a new process for each incoming request (OLD WAY)

  • node.js: server side architechture (one single application)

    • should never wait for anything on the server side
    • process goes out from the database and blocks (waiting for request, TRADITIONALLY) - works now because hardware is so fast and so cheap/working for the wrong reasons
    • leveraging event driven computing from client
    • uses callbacks so knows then the server is done /returned by the name of callback ("success")
  • node.js has event loop: throw event into loop, get qued up, and when they are done, event loop knows that to do with the result(provided callback already)

  • A socket address is the combination of an IP address and a port number, much like one end of a telephone connection is the combination of a phone number and a particular extension. Based on this address, internet sockets deliver incoming data packets to the appropriate application process or thread.

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