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
「AIでできますか?」から「Agentを作ってみました」へ ~「理論上わかる」と「やってみる」の隔たりを埋める方法
applism118
5
4.2k
SwiftDataを覗き見る
akidon0000
0
310
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
330
ドキュメントからはじめる未来のソフトウェア
pkshadeck
4
1.6k
Vivre en Bitcoin : le tutoriel que votre banquier ne veut pas que vous voyiez
rlifchitz
0
370
AIとともに歩む情報セキュリティ / Information Security with AI
kanny
4
2.3k
【Oracle Cloud ウェビナー】ランサムウェアが突く「侵入の隙」とバックアップの「死角」 ~ 過去の教訓に学ぶ — 侵入前提の防御とデータ保護 ~
oracle4engineer
PRO
2
230
DEVCON 14 Report at AAMSX RU65: V9968, MSX0tab5, MSXDIY etc
mcd500
0
230
ドメイン駆動セキュリティへの道しるべ
pandayumi
0
180
習慣とAIと環境 — 技術探求を続ける3つの鍵
azukiazusa1
3
790
Oracle Cloud Infrastructure:2026年1月度サービス・アップデート
oracle4engineer
PRO
0
150
Zephyr RTOS の発表をOpen Source Summit Japan 2025で行った件
iotengineer22
0
270
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Navigating Weather and Climate Data
rabernat
0
76
Technical Leadership for Architectural Decision Making
baasie
1
220
Joys of Absence: A Defence of Solitary Play
codingconduct
1
280
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
900
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.9k
How GitHub (no longer) Works
holman
316
140k
Music & Morning Musume
bryan
47
7k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
740
Getting science done with accelerated Python computing platforms
jacobtomlinson
1
100
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
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!