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
430
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
350
On Programming
anaisbetts
3
400
MVVM Without XAML
anaisbetts
3
730
Other Decks in Technology
See All in Technology
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
170
Goでデータパイプラインを作ろう
sansantech
PRO
0
250
【Google Cloud Next Tokyo'26】Gemini Enterprise と Oracle AI Database で実現する、業務データ活用を実現する AI エージェント実装
shisyu_gaku
0
210
ブラウザ研修 2026
recruitengineers
PRO
3
500
組織にどうSREを根付かせるか?〜IVRyの場合〜
abnoumaru
0
320
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
1.3k
名古屋の市バスGTFS-JPデータ×スガキヤ 最寄りバス停検索をAmazon ElastiCache Serverless for Valkeyで最適化する
usanchuu
1
280
データ組織の転換期 一足飛びしない段階的戦略
leveragestech
PRO
0
150
JavaScript 研修 (2026)
recruitengineers
PRO
0
290
TypeScript入門 2026
recruitengineers
PRO
1
300
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
430
Unsuck your backbone
ammeep
672
58k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
480
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
KATA
mclloyd
PRO
35
15k
Fireside Chat
paigeccino
42
4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Designing Powerful Visuals for Engaging Learning
tmiket
1
470
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
920
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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!