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
Composing Reactive Software
Search
michaelavila
July 28, 2017
Programming
84
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Composing Reactive Software
michaelavila
July 28, 2017
More Decks by michaelavila
See All by michaelavila
Navigating in VIM
michaelavila
0
92
Other Decks in Programming
See All in Programming
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
180
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
340
どこまでゆるくて許されるのか
tk3fftk
0
350
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
230
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
250
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
0
400
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
Performance Engineering for Everyone
elenatanasoiu
0
260
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
3.5k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
490
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.7k
Featured
See All Featured
Side Projects
sachag
455
43k
The SEO Collaboration Effect
kristinabergwall1
1
500
30 Presentation Tips
portentint
PRO
1
340
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
YesSQL, Process and Tooling at Scale
rocio
174
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Speed Design
sergeychernyshev
33
1.9k
BBQ
matthewcrist
89
10k
My Coaching Mixtape
mlcsv
0
170
Transcript
carbonfive.com Composing Reactive Software Michael Avila •
[email protected]
Agenda • Insufficient overview • Important, but poorly explained idea
• Vague and unjustified conclusion • Questions
Agenda (revised) • Reactive Programming • Signal Graph • Conclusion
• Questions
Reactive Programming
“... programming with asynchronous data streams ...”
interface Observable<T> { subscribe( onNext: (T) => void, onError: (Error)
=> void, onCompleted: () => void, ): Subscription; map( (T) => V): Observable<V>; flatMap((T) => Observable<V>): Observable<V>; scan( (V, T) => V, V): Observable<V>; filter( (T) => boolean): Observable<T>; withLatestFrom(Observable<V>, ...): Observable<[T, V, ...]>; combineLatest( Observable<V>, ...): Observable<[T, V, ...]>; … any many more! }
Operators buffer bufferCount bufferTime bufferToggle bufferWhen combineAll combineLatest concat concatAll
concatMap concatMapTo count debounce debounceTime defaultIfEmpty delay delayWhen dematerialize distinctUntilChanged do every expand filter first groupBy ignoreElements last let map mapTo merge mergeMap partition pluck publish race repeat retry retryWhen sample scan share single skip skipUntil skipWhile startWith switchMap window windowCount windowTime windowToggle windowWhen withLatestFrom zip … and probably more
const email$ = Observable.fromEvent(...<input/>...); const password$ = Observable.fromEvent(...<input/>...); const login$
= Observable.fromEvent(...<button/>...); const activeUser = login$ .withLatestFrom(email$, password$) .flatMap(([_, email, password]) => { return Observable.ajax.post('/auth/', { email, password }) .map(({ response }) => response); }); activeUser.subscribe(...<div>...);
None
None
None
Signal Graph
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Additional Notes ➔ Asynchronous ➔ Lazy* ➔ Composable
None
Good?
None
¯\_(ツ)_/¯
Good! I think.
carbonfive.com Thanks!