Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
380
MVVM Without XAML
anaisbetts
3
700
Other Decks in Technology
See All in Technology
「図面」から「法則」へ 〜メタ視点で読み解く現代のソフトウェアアーキテクチャ〜
scova0731
0
240
AWSを使う上で最低限知っておきたいセキュリティ研修を社内で実施した話 ~みんなでやるセキュリティ~
maimyyym
2
1.5k
re:Invent 2025 ~何をする者であり、どこへいくのか~
tetutetu214
0
220
ExpoのインダストリーブースでみたAWSが見せる製造業の未来
hamadakoji
0
110
Lookerで実現するセキュアな外部データ提供
zozotech
PRO
0
140
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
520
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
790
20251209_WAKECareer_生成AIを活用した設計・開発プロセス
syobochim
7
1.6k
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
690
re:Invent2025 3つの Frontier Agents を紹介 / introducing-3-frontier-agents
tomoki10
0
150
Power of Kiro : あなたの㌔はパワステ搭載ですか?
r3_yamauchi
PRO
0
160
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
460
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Scaling GitHub
holman
464
140k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Fireside Chat
paigeccino
41
3.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Visualization
eitanlees
150
16k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
KATA
mclloyd
PRO
33
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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!