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
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
180
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
400
MVVM Without XAML
anaisbetts
3
730
Other Decks in Technology
See All in Technology
アカウントが増えてからでは遅い? ~ マルチアカウント統制の勘所 ~
kenichinakamura
0
230
Amazon EVS で VCF 9.0 / 9.1 のサポート開始まとめ
mtoyoda
0
290
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
190
cccccc
moznion
0
1.9k
大量データに対しても、生成AIを用いてリーズナブルにデータ加工をしたい!Databricksのai_queryについて調べてみた
kamoshika
1
120
穢れた技術選定について
watany
4
420
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
3
220
美しいコードを書くためにF#を学んでみた話
yud0uhu
1
410
完全自律ロボットを作りたくて、先に開発を自律させた話(ROS Japan UG #63 LT)
rryz09
0
510
LLM/Agent評価:トップ営業の発言を「正解」にする 〜暗黙的正解による評価を営業資産に変える〜
takkuhiro
1
210
ZOZOTOWNの進化と信頼性を両立する負荷試験
zozotech
PRO
2
160
貴方はどのエンジニアリングを磨くのか
hatyibei
0
130
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
450
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Utilizing Notion as your number one productivity tool
mfonobong
4
380
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
800
The Pragmatic Product Professional
lauravandoore
37
7.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
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!