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
Awaiting for Rx
Search
Ana Betts
December 04, 2013
Technology
4
580
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
200
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
370
MVVM Without XAML
anaisbetts
3
690
Other Decks in Technology
See All in Technology
ソースを読む時の思考プロセスの例-MkDocs
sat
PRO
1
340
RemoteFunctionを使ったコロケーション
mkazutaka
1
160
20251027_findyさん_音声エージェントLT
almondo_event
2
510
設計に疎いエンジニアでも始めやすいアーキテクチャドキュメント
phaya72
9
5.8k
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
4
3.8k
GCASアップデート(202508-202510)
techniczna
0
130
様々なファイルシステム
sat
PRO
0
270
激動の時代を爆速リチーミングで乗り越えろ
sansantech
PRO
1
190
20251102 WordCamp Kansai 2025
chiilog
0
130
SRE × マネジメントレイヤーが挑戦した組織・会社のオブザーバビリティ改革 ― ビジネス価値と信頼性を両立するリアルな挑戦
coconala_engineer
0
310
AIがコードを書いてくれるなら、新米エンジニアは何をする? / komekaigi2025
nkzn
21
14k
DSPy入門
tomehirata
6
710
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Music & Morning Musume
bryan
46
6.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Gamification - CAS2011
davidbonilla
81
5.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Context Engineering - Making Every Token Count
addyosmani
8
320
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!