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
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
710
Other Decks in Technology
See All in Technology
ドキュメントからはじめる未来のソフトウェア
pkshadeck
4
1.7k
新規事業における「一部だけどコア」な AI精度改善の優先順位づけ
zerebom
0
310
SwiftDataを覗き見る
akidon0000
0
310
OCI技術資料 : OS管理ハブ 概要
ocise
2
4.3k
M5Stack Chain DualKey を UIFlow 2.0 + USB接続で試す / ビジュアルプログラミングIoTLT vol.22
you
PRO
2
120
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
72k
日本語テキストと音楽の対照学習の技術とその応用
lycorptech_jp
PRO
1
240
【Oracle Cloud ウェビナー】ランサムウェアが突く「侵入の隙」とバックアップの「死角」 ~ 過去の教訓に学ぶ — 侵入前提の防御とデータ保護 ~
oracle4engineer
PRO
2
230
SMTP完全に理解した ✉️
yamatai1212
0
110
[Iceberg Meetup #4] ゼロからはじめる: Apache Icebergとはなにか? / Apache Iceberg for Beginners
databricksjapan
0
490
プロダクトエンジニアこそ必要なPMスキル 〜デリバリー力を最大化し、価値を届け続けるために〜
layerx
PRO
0
140
Lambda Durable FunctionsでStep Functionsの代わりはできるのかを試してみた
smt7174
2
140
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.9k
Deep Space Network (abreviated)
tonyrice
0
36
New Earth Scene 8
popppiees
1
1.4k
Paper Plane (Part 1)
katiecoart
PRO
0
3.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Navigating Team Friction
lara
192
16k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
100
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
116
100k
Navigating Weather and Climate Data
rabernat
0
77
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Become a Pro
speakerdeck
PRO
31
5.8k
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!