Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
This is Node.js
Alexander Beletsky
July 09, 2014
Programming
10
330
This is Node.js
The talk I gave on UA Dev Club, 8-Jul-2014
Alexander Beletsky
July 09, 2014
Tweet
Share
More Decks by Alexander Beletsky
See All by Alexander Beletsky
alexbeletsky
1
270
alexbeletsky
0
69
alexbeletsky
4
800
alexbeletsky
3
110
alexbeletsky
8
2k
alexbeletsky
9
4.9k
alexbeletsky
1
2.5k
alexbeletsky
2
210
alexbeletsky
1
520
Other Decks in Programming
See All in Programming
dnskimo
7
1.4k
tarappo
4
440
kidokidofire
1
110
bamboooo
1
130
bosshawk
1
270
daipresents
10
3.6k
minecr
0
120
yosuke_furukawa
PRO
1
350
daipresents
0
340
takuyaa
4
490
shiba6v
0
200
fei0203018
0
170
Featured
See All Featured
jeffersonlam
330
15k
cherdarchuk
73
270k
eileencodes
114
25k
keathley
20
770
colly
66
3k
mthomps
38
2.3k
dougneiner
119
8k
marcelosomers
221
15k
caitiem20
311
17k
sachag
267
17k
afnizarnur
177
14k
brettharned
93
3.1k
Transcript
This is Node.js
ceo@likeastore.com http://beletsky.net http://twitter.com/alexbeletsky
"I was concerned about the ability to program advanced push
features into the website like I had seen in Gmail" Ryan Dahl the creator of Node.js
V8 Google's open source JavaScript engine. V8 can run standalone,
or can be embedded into any C++ application.
LibUV High performance evented I/O Originally based on LibEV switch
to LibUV with support of Windows
JavaScript Dynamic, prototype-based language Highly popular due to browser programming
http://jsconf.eu/2009/speakers.html
Why JavaScript? functions as first-class citizen
Why JavaScript? function as first-class citizen //closures..
JavaScript designed for event-oriented systems There was a natural fit
V8 + LibEV + JavaScript
“Node.js is a platform for easily building scalable network applications.
Node.js uses an event-driven (single threaded), non-blocking I/O model that makes it lightweight and efficient…” http://nodejs.org
Non Blocking I/O The concept of accessing I/O without blocking
of application
https://www.flickr.com/photos/papyrist/ Line to ATM is blocking I/O
Mac’s Drive is non-blocking I/O
None
execution started from first line.. Output:
async operation started… Output:
but execution goes on.. > ping Output:
after ~ms file is read… > ping > pong Output:
Event Driven Application flow is driven by events
http://misclassblog.com/interactive-web-development/node-js/
Single Threaded Single-thread programming concepts is more easy to understand.
Applications running in single thread are lightweight and efficient
“Node.js is designed for building efficient networking applications”
Core components: ! • HTTP / HTTPS • TCP /
UDP / Sockets • DNS • File System • Crypto / Arch • Events • Streams
Efficiency & Scalability Build-in server, high concurrency, horizontal scalability, clustering
NPM Node Package Manager - the richest collection of high
quality open source modules
None
Thanks, @alexbeletsky