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
400
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
370
MVVM Without XAML
anaisbetts
3
690
Other Decks in Technology
See All in Technology
dbtとAIエージェントを組み合わせて見えたデータ調査の新しい形
10xinc
7
1.5k
生成AI時代のPythonセキュリティとガバナンス
abenben
0
150
Raycast AI APIを使ってちょっと便利なAI拡張機能を作ってみた
kawamataryo
0
210
GCASアップデート(202508-202510)
techniczna
0
100
ストレージエンジニアの仕事と、近年の計算機について / 第58回 情報科学若手の会
pfn
PRO
4
910
Kotlinで型安全にバイテンポラルデータを扱いたい! ReladomoラッパーをAIと実装してみた話
itohiro73
2
100
ゼロコード計装導入後のカスタム計装でさらに可観測性を高めよう
sansantech
PRO
1
560
東京大学「Agile-X」のFPGA AIデザインハッカソンを制したソニーのAI最適化
sony
0
170
AIを使ってテストを楽にする
kworkdev
PRO
0
300
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
4
3.8k
データとAIで明らかになる、私たちの課題 ~Snowflake MCP,Salesforce MCPに触れて~ / Data and AI Insights
kaonavi
0
170
RemoteFunctionを使ったコロケーション
mkazutaka
1
150
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The Pragmatic Product Professional
lauravandoore
36
7k
Docker and Python
trallard
46
3.6k
Automating Front-end Workflow
addyosmani
1371
200k
Visualization
eitanlees
150
16k
Context Engineering - Making Every Token Count
addyosmani
8
320
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Typedesign – Prime Four
hannesfritz
42
2.8k
KATA
mclloyd
PRO
32
15k
4 Signs Your Business is Dying
shpigford
186
22k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
670
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!