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
360
MVVM Without XAML
anaisbetts
3
690
Other Decks in Technology
See All in Technology
下手な強制、ダメ!絶対! 「ガードレール」を「檻」にさせない"ガバナンス"の取り方とは?
tsukaman
2
460
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.8k
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
240
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
4
590
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
260
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
330
Android Audio: Beyond Winning On It
atsushieno
0
3.4k
共有と分離 - Compose Multiplatform "本番導入" の設計指針
error96num
2
1.2k
Codeful Serverless / 一人運用でもやり抜く力
_kensh
7
460
MagicPod導入から半年、オープンロジQAチームで実際にやったこと
tjoko
0
110
2025/09/16 仕様駆動開発とAI-DLCが導くAI駆動開発の新フェーズ
masahiro_okamura
0
140
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
670
Featured
See All Featured
Designing for humans not robots
tammielis
253
25k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
We Have a Design System, Now What?
morganepeng
53
7.8k
GitHub's CSS Performance
jonrohan
1032
460k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
What's in a price? How to price your products and services
michaelherold
246
12k
Building an army of robots
kneath
306
46k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
850
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Embracing the Ebb and Flow
colly
87
4.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
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!