Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How does JavaScript work?
Search
Ulugbek Miniyarov
May 25, 2017
Programming
71
0
Share
How does JavaScript work?
What is Javascript: a single-threaded non-blocking asynchronous concurrent language?
Ulugbek Miniyarov
May 25, 2017
More Decks by Ulugbek Miniyarov
See All by Ulugbek Miniyarov
DDD and CQRS Quick Overview
miniyarov
0
83
Software Architecture Patterns
miniyarov
1
43
Secure Software Development
miniyarov
0
43
Introduction to Docker
miniyarov
0
42
Advanced Blockchain Topics
miniyarov
0
60
Blockchain: from 0 to 1
miniyarov
0
96
Continuous Code Quality Inspection
miniyarov
0
51
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
46
PHP7 New Features
miniyarov
1
56
Other Decks in Programming
See All in Programming
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
AI Agent と正しく分析するための環境作り
yoshyum
3
630
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
240
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
11
2.9k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
210
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
440
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
120
Swiftのレキシカルスコープ管理
kntkymt
0
200
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.3k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
390
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
300
Featured
See All Featured
HDC tutorial
michielstock
2
680
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
230
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
840
Writing Fast Ruby
sferik
630
63k
My Coaching Mixtape
mlcsv
0
140
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Transcript
How does JavaScript work? Ulugbek Miniyarov Software Architect @ENUYGUN Heavily
inspired by Philip Roberts’ JSConf EU 2014 Talk
V8 Engine (Chrome’s JS Runtime) ChakraCore (Egde’s JS Runtime) Nitro
(Safari’s JS Runtime) SpiderMonkey (Firefox’s JS Runtime) JavaScript Engines:
JavaScript? A single-threaded non-blocking asynchronous concurrent language
JavaScript has a Call Stack, an Event Loop, a Callback
Queue, and some other apis (Ajax, Timing ...) Are they inside JavaScript Engines? - Only Call Stack with Heap
None
Asynchronous feature is not included in JavaScript Engine. Browsers /
NodeJS handles asynchronous part: - XHR Request - Timing (setTimeout, setInterval) - Events (onClick, onFocus i.e.)
None
The Call Stack one thread == one call stack ==
one thing at a time
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Blocking And how non-blocking i/o gives asynchronicity
None
None
None
None
None
None
None
None
Demo: Blocking Script in Browser at: https://jsfiddle.net/9c9ztkvz/
Solution? Asynchronous Callback
None
None
None
None
None
None
None
Concurrency & Event Loop One thing at a time, except
not really.
None
None
None
None
None
None
None
None
None
None
None
None
None
Ready for a Quiz?
None
None
Demo Time!
Thanks