Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SkillSwap node.js
Search
Seth Vargo
September 08, 2012
Technology
220
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SkillSwap node.js
These are the slides from my tech talk given at skill swap at CMU for SkillSwap Weekend.
Seth Vargo
September 08, 2012
More Decks by Seth Vargo
See All by Seth Vargo
Taming the Modern Data Center
sethvargo
11
930
The Ecological Impact of Compute
sethvargo
6
340
Using Terraform with AWS
sethvargo
2
800
Scheduling Applications at Scale
sethvargo
6
560
Easy Ruby Development and Deployment with Otto
sethvargo
0
290
Building the World's Largest Websites
sethvargo
5
590
Consul as a Monitoring Service
sethvargo
22
4.2k
Introduction to Vault
sethvargo
10
3k
Vagrant 101 for Designers and Frontend Engineers
sethvargo
1
560
Other Decks in Technology
See All in Technology
Minecraft JavaのMODをSwiftで作る
1mash0
0
160
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
120
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.3k
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
820
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
580
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
8
950
アクセスキーこわい やめかたと漏らさない工夫
sassssan68
1
270
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
2
2.1k
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
0
2.6k
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
3
3k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
530
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
From π to Pie charts
rasagy
1
370
Thoughts on Productivity
jonyablonski
76
5.4k
Writing Fast Ruby
sferik
630
63k
Building Applications with DynamoDB
mza
96
7.2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
380
Producing Creativity
orderedlist
PRO
348
41k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Are puppies a ranking factor?
jonoalderson
2
3.9k
Transcript
node.js
node
t f g sethvargo
fuck shit dammit ass
what’s node?
event-driven non-blocking server-side
event-driven non-blocking server-side javascript
node’s goal is to provide an easy way to build
scalable network programs
node’s goal is to provide an easy way to build
scalable programs
make shit
make shit ^ better
make shit ^ better ™
Google V8 Engine
Google V8 Engine Makes Javascript really fucking fast ^
this is node
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type':
'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');
complete webserver
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type':
'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/'); 1 2 3 4 5 6 7 8 ... in just 8 lines
that was node
why node?
new technology
new technology
existing technology
existing technology repurposed
existing technology repurposed patterns
fucking package it has a manager
node package manager
npm
an amazing community
14,350 packages
write less do more
asychronous I/O
“Get the fuck off of my CPU”
var data = file.read('scotty-labs.txt'); complexFileOperation(data); Old I/O
var data = file.read('scotty-labs.txt'); // Tie up the CPU while
I read that file complexFileOperation(data); Old I/O
I want to write the most inefficient program for your
CPU
I want to write the most inefficient program for your
CPU - no one, ever “ ”
Yet you do it every fucking day!
is I/O blocking Ruby Python Java SQL PHP
is I/O blocking Ruby Python Java SQL PHP by default
node is asynchronous
node has asynchronous I/O
var data = file.read('scotty-labs.txt', function(data) { complexFileOperation(data); }); // let
the CPU keep working in the meantime otherFunction(); New I/O
event-driven behavior
after I do this, I need to do that
after I do this, I need to do that
after this, do that
if x, then y
when I’m done shopping, I need to pay the bill
the Ruby way while(!poor) do (@amount ||= 0) += shop
end pay(@amount)
that makes 0 sense
the node way shop(function(amount) { pay(amount); });
fundamentally different way of thinking
fundamentally different type of programming
fundamentally different
and that’s okay
sometimes it really fucking sucks
there’s only one thread
Yay! No threading!
Shit! No threading!
var data = file.read('scotty-labs.txt', function(data) { complexFileOperation(data); }); // let
the CPU keep working in the meantime while(true) { ... } what does this do?
var data = file.read('scotty-labs.txt', function(data) { complexFileOperation(data); }); // let
the CPU keep working in the meantime while(true) { ... } what does this do?
var data = file.read('scotty-labs.txt', function(data) { // never fires });
// blocks the entire thread while(true) { ... } what does this do?
var data = file.read('scotty-labs.txt', function(data) { // never fires });
// blocks the entire thread while(true) { ... } nothing...
“my algorithms are tightly CPU-bound “
“my algorithms are tightly CPU-bound “ don’t use node
let’s code
catman
annoying 5 year old
tcp chat