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
600
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
190
Electron Pro-Tips
anaisbetts
0
220
Electron: The Boring Parts
anaisbetts
1
440
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
220
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
360
On Programming
anaisbetts
3
400
MVVM Without XAML
anaisbetts
3
730
Other Decks in Technology
See All in Technology
三人寄ればチューリング完全
puhitaku
6
3.2k
Microsoft MVP プログラムを紹介するから目指す人増えてくれ
tsubakimoto_s
0
110
Digitization部 紹介資料
sansan33
PRO
2
7.7k
AI駆動開発をチームに根付かせる - 「1行も書かない」チームがHarnessを育てた1年 -
kenichirokimura
2
330
会計事務所と顧問先の契約関係をOIDC・OAuthで表現する
terara
0
350
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
Kiro Crew で始める マルチエージェント開発
miu_crescent
PRO
0
180
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
1
620
AI for Science時代を切り開く、政府の次世代HPC戦略の展望
gpuunite_official
0
260
MCPを待つな、パスキーを拡げよう(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
270
GopherCon @シアトル に行ってきました
logica0419
0
290
AI時代のデータ基盤を考える問い
pacocat
0
680
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
The Cost Of JavaScript in 2023
addyosmani
55
10k
The World Runs on Bad Software
bkeepers
PRO
72
12k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
The SEO Collaboration Effect
kristinabergwall1
1
530
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
A Soul's Torment
seathinner
6
3.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
220
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!