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
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
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
380
Navigation APIと見るSvelteKitのWeb標準志向
yamanoku
2
120
AI時代のIssue駆動開発のススメ
moongift
PRO
0
270
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
260
Phase04_ターミナル基礎
overflowinc
0
2.6k
CREがSLOを握ると 何が変わるのか
nekomaho
0
130
Kiro Meetup #7 Kiro アップデート (2025/12/15〜2026/3/20)
katzueno
2
250
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
110
Embeddings : Symfony AI en pratique
lyrixx
0
350
【Oracle Cloud ウェビナー】データ主権はクラウドで守れるのか?NTTデータ様のOracle Alloyで実現するソブリン対応クラウドの最適解
oracle4engineer
PRO
3
100
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
140
Phase03_ドキュメント管理
overflowinc
0
2.8k
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
850
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
88
New Earth Scene 8
popppiees
1
1.8k
sira's awesome portfolio website redesign presentation
elsirapls
0
200
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
490
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
The Invisible Side of Design
smashingmag
302
51k
For a Future-Friendly Web
brad_frost
183
10k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
210
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!