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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ana Betts
December 04, 2013
Technology
590
4
Share
Awaiting for Rx
How to use Rx along with async/await, presented at NDC London
Ana Betts
December 04, 2013
More Decks by Ana Betts
See All by Ana Betts
Flutter in Practice
anaisbetts
2
150
Electron Pro-Tips
anaisbetts
0
210
Electron: The Boring Parts
anaisbetts
1
410
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
200
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
340
On Programming
anaisbetts
3
380
MVVM Without XAML
anaisbetts
3
710
Other Decks in Technology
See All in Technology
スクラムを支える内部品質の話
iij_pr
0
110
Babylon.js を使って試した色々な内容 / Various things I tried using Babylon.js / Babylon.js 勉強会 vol.5
you
PRO
0
140
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
170
JAWS DAYS 2026でAIの「もやっと」感が解消された話
smt7174
1
120
OPENLOGI Company Profile for engineer
hr01
1
61k
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
290
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
4
1.4k
AI時代のIssue駆動開発のススメ
moongift
PRO
0
330
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
150
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
170
SaaSの操作主体は人間からAIへ - 経理AIエージェントが目指す深い自動化
nishihira
0
130
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
400
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
140
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
88
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
110
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
160
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
850
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Speed Design
sergeychernyshev
33
1.6k
Skip the Path - Find Your Career Trail
mkilby
1
93
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!