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
Pioneering Real-Time
Search
Andrew Godwin
October 03, 2019
Programming
520
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pioneering Real-Time
My keynote from PyCon Balkan 2019
Andrew Godwin
October 03, 2019
More Decks by Andrew Godwin
See All by Andrew Godwin
Reconciling Everything
andrewgodwin
1
390
Django Through The Years
andrewgodwin
0
320
Writing Maintainable Software At Scale
andrewgodwin
0
520
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
420
Async, Python, and the Future
andrewgodwin
2
740
How To Break Django: With Async
andrewgodwin
1
820
Taking Django's ORM Async
andrewgodwin
0
840
The Long Road To Asynchrony
andrewgodwin
0
770
The Scientist & The Engineer
andrewgodwin
1
850
Other Decks in Programming
See All in Programming
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
220
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
400
A2UI という光を覗いてみる
satohjohn
1
150
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
130
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
8
3.8k
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
360
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
Lessons from Spec-Driven Development
simas
PRO
0
220
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
190
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
2
300
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
41
2.6k
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
Paper Plane (Part 1)
katiecoart
PRO
0
9.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Everyday Curiosity
cassininazir
0
230
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
610
Transcript
PIONEERING REAL-TIME ANDREW GODWIN // @andrewgodwin
Hi, I’m Andrew Godwin
async def view(request): data = await api_call(pk=5) return render(request, "a.html",
…)
"The Real-Time Web"
AJAX 1999 Comet 2006 WebSockets 2011
"Real-Time"
“A system in which input data is processed within milliseconds
so that it is available virtually immediately
None
None
CPU cores run one thing at a time (yes, computers
are basically a giant lie)
Program 2 Program 3 Program 1
Scheduling The art of running multiple things at once
Program 2 Program 3 Program 1 300 cycles 300 cycles
300 cycles
Program 2 Program 3 Program 1 300 cycles Restore Save
Restore Save Restore Save 30 cycles 30 cycles 300 cycles 30 cycles 30 cycles 300 cycles 30 cycles 30 cycles
Context switching is expensive The more you have, the worse
it gets
Python's threading has this problem! The more you have, the
worse it gets
Active Threads Idle Threads Runtime 1 0 1.3 seconds 1
1 2.3 seconds 1 5 5.4 seconds 1 30 39 seconds 1 100 15 minutes
"Boxcar" scheduling has… issues Don't ever write avionics software like
this! Thanks.
None
None
72kb Woven core memory
0.085 Mhz processor
“ Don Eyles ...when the guidance system was first being
conceived, the onboard software was almost an afterthought
None
None
Priority-based Executive Please do write avionics software like this.
Job Priorities Higher numbers beat lower Limited job "RAM" Only
7 running at once Interrupts from hardware Descent radar, keyboard, etc.
Predictable Software They knew exactly what ran and what it
took
...Unpredictable Hardware It's never easy, especially in space.
None
Two differently phased 800Mhz clocks This is really bad, trust
me.
False detections stole computer time The radar system had to
update the guidance computer
Descent Phase: 85% load Capsule orientation and thrust calculations Hardware
Bug: 13% Caused by the descent radar Display Routine: 5% Astronauts trying to see how far to go
103%
None
SERVICER never gets to run But the system keeps trying
to schedule it
Alarm 1202 The computer self-restarts, but keeps crashing
Buzz Aldrin works it out Turns off the display routine
to bring the load under 100%
Apollo 11 was almost a failure ...but good software design
prevented it
Apollo 9 First flight test of Lunar Module Apollo 10
Second test and partial descent of Lunar Module Apollo 11 First Moon landing
“ Eugene A. Cernan, recounting Apollo 10 Don't give those
guys an opportunity to land, 'cause they might!
Building for Failure Software is only as good as its
worst outing
“ Don Eyles During simulations we sometimes pushed the [restart]
button randomly
We often only design for the good cases After all,
that's what we're expecting to happen
Hardware is always unpredictable Disks, networks, even keyboards and mice
Can your software survive a crash? Or does it need
a clean shutdown to work?
How will you handle the unexpected? Weird input. Slow network
connections. Emoji.
“ Don Eyles When Hal Laning designed the Executive and
Waitlist system, he made it up from whole cloth with no examples to guide him. The design [...] still represents the state of the art.
All software has consequences We may not all be designing
spacecraft, but we affect lives.
doneyles.com/LM/Tales.html Tales from the Lunar Module Guidance Computer, 2004
Thanks. Andrew Godwin @andrewgodwin // aeracode.org