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
600
4
Share
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
170
Electron Pro-Tips
anaisbetts
0
220
Electron: The Boring Parts
anaisbetts
1
430
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
210
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
390
MVVM Without XAML
anaisbetts
3
720
Other Decks in Technology
See All in Technology
権限管理設計を完全に理解した
rsugi
2
250
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
570
Claude code Orchestra
ozakiomumkj
3
780
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
140
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
160
開発を止めない CI/CD ~CI Visibilityによる継続的最適化~
pensuke628
0
220
TypeScript Compiler APIとPHP-Parserを活用し、TypeScriptとPHPで型を共有する
shuta13
0
270
AI時代の私の技術インプットとアウトプット術
tonkotsuboy_com
15
8k
JEP 522 Deep Dive - G1 GC同期コスト削減によるスループット向上を徹底検証&解説
tabatad
1
480
プラットフォームエンジニア ワークショップ/ platform-workshop
databricksjapan
0
140
Ruby::Boxでできること、Refinementsでできること
joker1007
2
110
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
760
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
540
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
130
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
The Language of Interfaces
destraynor
162
26k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Side Projects
sachag
455
43k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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!