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
130
Electron Pro-Tips
anaisbetts
0
190
Electron: The Boring Parts
anaisbetts
1
390
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
180
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
320
On Programming
anaisbetts
3
350
MVVM Without XAML
anaisbetts
3
680
Other Decks in Technology
See All in Technology
AndroidXR 開発ツールごとの できることできないこと
donabe3
0
130
Culture Deck
optfit
0
430
エンジニアが加速させるプロダクトディスカバリー 〜最速で価値ある機能を見つける方法〜 / product discovery accelerated by engineers
rince
4
380
自動テストの世界に、この5年間で起きたこと
autifyhq
10
8.6k
OpenID Connect for Identity Assurance の概要と翻訳版のご紹介 / 20250219-BizDay17-OIDC4IDA-Intro
oidfj
0
280
デスクトップだけじゃないUbuntu
mtyshibata
0
150
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
3
1k
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
140
トラシューアニマルになろう ~開発者だからこそできる、安定したサービス作りの秘訣~
jacopen
2
2k
プロセス改善による品質向上事例
tomasagi
2
2.6k
RECRUIT TECH CONFERENCE 2025 プレイベント【高橋】
recruitengineers
PRO
0
160
Larkご案内資料
customercloud
PRO
0
650
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
50
11k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Automating Front-end Workflow
addyosmani
1368
200k
Done Done
chrislema
182
16k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Documentation Writing (for coders)
carmenintech
67
4.6k
Making Projects Easy
brettharned
116
6k
Speed Design
sergeychernyshev
27
790
Typedesign – Prime Four
hannesfritz
40
2.5k
Building Your Own Lightsaber
phodgson
104
6.2k
Faster Mobile Websites
deanohume
306
31k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
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!