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
590
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
160
Electron Pro-Tips
anaisbetts
0
210
Electron: The Boring Parts
anaisbetts
1
420
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
200
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
340
On Programming
anaisbetts
3
390
MVVM Without XAML
anaisbetts
3
720
Other Decks in Technology
See All in Technology
2026年、知っておくべき最新 サーバレスTips10選/serverless-10-tips
slsops
13
5.2k
Choose your own adventure in agentic design patterns
glaforge
0
130
Master Dataグループ紹介資料
sansan33
PRO
1
4.6k
自立を加速させる神器 - EMOasis #11
stanby_inc
0
130
昔はシンプルだった_AmazonS3
kawaji_scratch
0
330
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
270
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
370
AI時代のガードレールとしてのAPIガバナンス
nagix
0
250
みんなの「データ活用」を支えるストレージ担当から持ち込むAWS活用/コミュニティー設計TIPS 10選~「作れる」より、「続けられる」設計へ~
yoshiki0705
0
240
扱える不確実性を増やしていく - スタートアップEMが考える「任せ方」
kadoppe
0
290
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
120
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
Optimizing for Happiness
mojombo
378
71k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Building Applications with DynamoDB
mza
96
7k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
800
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
320
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Become a Pro
speakerdeck
PRO
31
5.9k
RailsConf 2023
tenderlove
30
1.4k
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!