Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Awaiting for Rx
Search
Ana Betts
December 04, 2013
Technology
4
590
Awaiting for Rx
How to use Rx along with async/await, presented at NDC London
Ana Betts
December 04, 2013
Tweet
Share
More Decks by Ana Betts
See All by Ana Betts
Flutter in Practice
anaisbetts
2
140
Electron Pro-Tips
anaisbetts
0
210
Electron: The Boring Parts
anaisbetts
1
400
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
190
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
330
On Programming
anaisbetts
3
380
MVVM Without XAML
anaisbetts
3
700
Other Decks in Technology
See All in Technology
オープンソースKeycloakのMCP認可サーバの仕様の対応状況 / 20251219 OpenID BizDay #18 LT Keycloak
oidfj
0
140
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
420
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.7k
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
110
re:Invent2025 3つの Frontier Agents を紹介 / introducing-3-frontier-agents
tomoki10
0
400
AI との良い付き合い方を僕らは誰も知らない
asei
0
230
20251222_サンフランシスコサバイバル術
ponponmikankan
2
140
TED_modeki_共創ラボ_20251203.pdf
iotcomjpadmin
0
140
【開発を止めるな】機能追加と並行して進めるアーキテクチャ改善/Keep Shipping: Architecture Improvements Without Pausing Dev
bitkey
PRO
1
120
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1.7k
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
130
ExpoのインダストリーブースでみたAWSが見せる製造業の未来
hamadakoji
0
190
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building Applications with DynamoDB
mza
96
6.8k
4 Signs Your Business is Dying
shpigford
186
22k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
29
A better future with KSS
kneath
240
18k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
0
160
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
250
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
71
Game over? The fight for quality and originality in the time of robots
wayneb77
1
66
Designing for Performance
lara
610
69k
Transcript
Awaiting for Rx: ! A Play in Five Acts
/paulcbetts
Why Rx?
None
code is communication between people ! (that incidentally, also runs
on a computer)
await doesn’t help you get away from state
tasks don’t help you with events
Rx in 5 minutes
IObservable is a better event
None
events are lists
observable as timeline OnNext OnNext OnNext OnCompleted ‘A’ ‘B’ ‘C’
OnError!
tasks are just events that happen once
task as observable ‘A’ Task.Run(() => /*…*/)
None
+ Task<T>
you
can
await
IObservable
None
None
the catch
you must guarantee that the IObservable terminates
None
The two ways to make things awaitable: Take and Aggregate
None
someTask.ToObservable(); <=> someObservable.ToTask();
None
None
async-friendly Rx operators SelectMany Create Defer Switch IScheduler.Schedule StartAsync Using
Concat Merge
await often introduces unnecessary ordering constraints
None
None
this is MapReduce (or in C# lingo, SelectAggregate™)
None
always use Rx for UI events
always use Rx for UI events
ಠ_ಠ
always use Rx for UI events
None
None
describing an entire process in one place is the goal
None
describing an entire process in one place is the goal
Rx is particularly good at describing pipelines of data
declarative, functional code is easier to test
imperative await methods get the job done
None
None
None
use extensions to provide Task-friendly apis
None
None
– the average developer “hwæt.”
None
None
None
Rx makes testing eas(ier)
None
None
test ordering, not concurrency
None
None
Thanks!