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
Thinktecture Webinar: Web-API mit Turbo:Deep-d...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sebastian Gingter
February 16, 2022
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Thinktecture Webinar: Web-API mit Turbo: Deep-dive in async/await für Backend-APIs
Slides for my webinar.
Sebastian Gingter
February 16, 2022
More Decks by Sebastian Gingter
See All by Sebastian Gingter
Pragmatische AI Agents: Mit LLMs, Tools & Gedächtnis zum Ziel
phoenixhawk
0
120
DDC 2025: p"AI"r Programming statt Vibe-Coding
phoenixhawk
0
140
EKON 2025 - Agents
phoenixhawk
0
180
EKON 2025 AI Coding
phoenixhawk
0
170
BASTA! 2025: Agents in Action: LLM's, Tools and Reasoning
phoenixhawk
0
180
From Zero to Hero: How to put GPT LLMs & Friends into your Applications
phoenixhawk
0
260
DWX 2025 - Talk to your data
phoenixhawk
0
88
BASTA! Spring 2025 - Halluzinationen, Prompt Injections & Co.
phoenixhawk
0
270
SEACON 2024 - Talk to your Data
phoenixhawk
0
310
Other Decks in Programming
See All in Programming
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
560
Flow は今どうなっているか
mizdra
PRO
0
810
[DroidKaigi 26] How We Moved from Android Studio to Slack
thisaay
0
130
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
MySQLとPostgreSQLって何が違うの?
akagami
0
150
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
400
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
130
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.1k
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
110
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
280
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
420
Press start. Python's next generation.
willingc
PRO
3
290
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Believing is Seeing
oripsolob
1
200
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Why Our Code Smells
bkeepers
PRO
340
58k
Music & Morning Musume
bryan
47
7.3k
Scaling GitHub
holman
464
140k
Optimizing for Happiness
mojombo
378
71k
Bash Introduction
62gerente
615
220k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
400
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Transcript
None
2 Deep-dive in async/await bei Backend-APIs ▪ 🐻💬 ▪ ▪
▪ ▪ ▪ ▪ ▪ ▪ Twitter:
3 ▪ ▪ ▪ ▪ ▪ Deep-dive in async/await bei
Backend-APIs
4 ▪ ▪ ▪ ▪ ▪ ▪ Deep-dive in async/await
bei Backend-APIs
5 Deep-dive in async/await bei Backend-APIs Nein, aber effizienter!
6 Deep-dive in async/await bei Backend-APIs
7 ▪ ▪ ▪ ▪ ▪ ▪ ▪ Deep-dive in
async/await bei Backend-APIs
8 Deep-dive in async/await bei Backend-APIs Kern 1 Kern 2
Kern 3 Kern 4 P2 T1 P2 T2 P3 T1 P1 T2 P3 T2 OS Scheduler P1 T1
9 • • • ▪ ▪ ▪ ▪ ▪ Deep-dive
in async/await bei Backend-APIs * Zahlen für Windows, Quelle: “Windows Internals“, Solomin, Russinovich et al. Jeffrey Richter sagt hingegen: 30 ms in Windows, Linux hat andere Zeiten…
10 • • • • • • • • •
• Deep-dive in async/await bei Backend-APIs
11 Deep-dive in async/await bei Backend-APIs Kern 1 Kern 2
Kern 3 Kern 4 P2 T1 P2 T2 P3 T1 P1 T1 P3 T2 P1 T2 Kontext- Wechsel Kontext- & Prozess- Wechsel
12 • • • • • • • • •
Deep-dive in async/await bei Backend-APIs
13 Deep-dive in async/await bei Backend-APIs ALU & FPU Registers
0 Registers 1 CPU Core with Hyper-Threading Classic CPU Core
14 Deep-dive in async/await bei Backend-APIs Kern 1 Kern 2
Kern 3 Kern 4 P2 T1 P2 T2 MyProc T1 P1 T2 P1 T1 MyProc T2 MyProc T3 MyProc T4 MyProc T5 MyProc T7 MyProc T6
15 Deep-dive in async/await bei Backend-APIs • • • Quelle:
“Systems Performance: Enterprise and the Cloud“, 2013, Brendan Gregg, Pearson Verlag
16 Deep-dive in async/await bei Backend-APIs • • • •
• •
17 Deep-dive in async/await bei Backend-APIs
18 ▪ ▪ ▪ ▪ ▪ ▪ ⏳ ▪ ▪
▪ Deep-dive in async/await bei Backend-APIs ReadFile API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
19 ▪ ▪ ▪ ▪ ▪ ▪ ⏳ ▪ Deep-dive
in async/await bei Backend-APIs ReadFile API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
20 Deep-dive in async/await bei Backend-APIs
21 Deep-dive in async/await bei Backend-APIs • • IAsyncResult BeginSomething()
• EndSomething(result) • • DoSomethingAsync() • event SomethingCompleted • • Task[<T>] DoSomethingAsync() P
22 Deep-dive in async/await bei Backend-APIs
23 • • • • • • .ContinueWith() • Deep-dive
in async/await bei Backend-APIs
24 Deep-dive in async/await bei Backend-APIs Task Task-Liste Threadpool T1
Threadpool T2 Kern 1 Kern 3 Kern 2 Kern 4 Threadpool T3 Threadpool T4 Threadpool Management Jeder Pool-Thread arbeitet Tasks in einer Endlosschleife ab Completed Tasks
25 • • • • • 🤯 • • Deep-dive
in async/await bei Backend-APIs
26 Deep-dive in async/await bei Backend-APIs
27 • • async Task<> MyMethodAsync() • • • await
OtherMethodAsync() • • await • • • • Deep-dive in async/await bei Backend-APIs E
28 Deep-dive in async/await bei Backend-APIs
29 Deep-dive in async/await bei Backend-APIs P
30 • • task.GetAwaiter().GetResult() → ❌ • Thread.Sleep() → ❌
• await Task.Delay() → ✔ • Thread.SpinWait() • → ❌ • → ✔ Deep-dive in async/await bei Backend-APIs
31 • • var task1 = DoSomethingAsync(); var task2 =
DoSomethingElseAsync(); await Task.WhenAll(task1, task2); • • • Task.Factory.StartNew(…, TaskCreationOptions.LongRunning); • • • Deep-dive in async/await bei Backend-APIs
32 • • • • Deep-dive in async/await bei Backend-APIs
33 Deep-dive in async/await bei Backend-APIs
34 ▪ ▪ ▪ ▪ ▪ ▪ Deep-dive in async/await
bei Backend-APIs
35 ▪ ▪ ▪ ▪ ▪ 😉 Deep-dive in async/await
bei Backend-APIs P
None