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
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
390
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
360
MVVM Without XAML
anaisbetts
3
690
Other Decks in Technology
See All in Technology
AIのAIによるAIのための出力評価と改善
chocoyama
2
540
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
620
標準技術と独自システムで作る「つらくない」SaaS アカウント管理 / Effortless SaaS Account Management with Standard Technologies & Custom Systems
yuyatakeyama
3
1.2k
Postman AI エージェントビルダー最新情報
nagix
0
110
ひとり情シスなCTOがLLMと始めるオペレーション最適化 / CTO's LLM-Powered Ops
yamitzky
0
420
低レイヤを知りたいPHPerのためのCコンパイラ作成入門 完全版 / Building a C Compiler for PHPers Who Want to Dive into Low-Level Programming - Expanded
tomzoh
4
3.1k
Fabric + Databricks 2025.6 の最新情報ピックアップ
ryomaru0825
1
130
PHP開発者のためのSOLID原則再入門 #phpcon / PHP Conference Japan 2025
shogogg
4
700
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
220
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
3
460
TechLION vol.41~MySQLユーザ会のほうから来ました / techlion41_mysql
sakaik
0
180
Model Mondays S2E02: Model Context Protocol
nitya
0
220
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
71
4.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Facilitating Awesome Meetings
lara
54
6.4k
The Language of Interfaces
destraynor
158
25k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Done Done
chrislema
184
16k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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!