Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Pioneering Real-Time
Search
Andrew Godwin
October 03, 2019
Programming
0
470
Pioneering Real-Time
My keynote from PyCon Balkan 2019
Andrew Godwin
October 03, 2019
Tweet
Share
More Decks by Andrew Godwin
See All by Andrew Godwin
Reconciling Everything
andrewgodwin
1
350
Django Through The Years
andrewgodwin
0
260
Writing Maintainable Software At Scale
andrewgodwin
0
470
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
380
Async, Python, and the Future
andrewgodwin
2
700
How To Break Django: With Async
andrewgodwin
1
760
Taking Django's ORM Async
andrewgodwin
0
760
The Long Road To Asynchrony
andrewgodwin
0
710
The Scientist & The Engineer
andrewgodwin
1
800
Other Decks in Programming
See All in Programming
dotfiles 式年遷宮 令和最新版
masawada
1
790
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.2k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
130
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
100
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.3k
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
730
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
260
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
120
開発に寄りそう自動テストの実現
goyoki
2
1.2k
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
510
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
130
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
370
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
66
BBQ
matthewcrist
89
9.9k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
The SEO identity crisis: Don't let AI make you average
varn
0
32
How GitHub (no longer) Works
holman
316
140k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
170
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
390
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
25
Information Architects: The Missing Link in Design Systems
soysaucechin
0
700
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