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
Callbags
Search
Stephan Schneider
May 15, 2018
Programming
0
73
Callbags
Introduction to the "callbags" specification for lightweight observables & iterables.
Stephan Schneider
May 15, 2018
Tweet
Share
More Decks by Stephan Schneider
See All by Stephan Schneider
Dynamic Schema Generation for Changing Data Models
zcei
0
140
Observables - Streams on steroids
zcei
0
170
Other Decks in Programming
See All in Programming
AI & Enginnering
codelynx
0
110
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
900
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
Patterns of Patterns
denyspoltorak
0
1.4k
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
Architectural Extensions
denyspoltorak
0
280
AI巻き込み型コードレビューのススメ
nealle
1
150
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
100
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
A Modern Web Designer's Workflow
chriscoyier
698
190k
Designing for Performance
lara
610
70k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Music & Morning Musume
bryan
47
7.1k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
So, you think you're a good person
axbom
PRO
2
1.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The browser strikes back
jonoalderson
0
360
Transcript
Callbags BY STEPHAN SCHNEIDER
“Didn’t you mean ‘callbacks’” Literally everyone I told about this
talk
What are callbags? • a contract how callbacks work in
their context • similar to Node's error-first convention // error-first fs.readFile('/path/to/file', (err, data) => { ... }) // callbag source(0, (type, data) => { ... })
Generality Promise Observable Callbag Function Where does it stand?
Predictability Promise Observable Callbag Function Where does it stand?
The specification https://github.com/callbag/callbag
Sources - produces data Terms → Sinks - consumes data
→ Operators - takes a source, returns a source →
(type: number, payload?: any) => void
“End” - terminate the callbag “Start” - sent & received
once as part of the handshake Design Principles 0 2 Type 1 “Data” - deliver data to the callbag
• Call source with type === 0 • Callback is
greeted back with type === 0 • “Talkback” allows sending data to source Handshake
• type === 2 • Without second parameter: success •
Anything truthy as second parameter: error Termination
• type === 1 • Only after handshake • Only
before termination Data Delivery
“A standard for JS callbacks that enables lightweight observables and
iterables”
Let’s have a look at the code
• No central implementation • Anything that sticks to the
interface is considered a callback • There’s no official standard lib • Everyone is invited to become an operator maintainer Governance
Further reading • Spec: https://github.com/callbag/callbag • Comparison to RxJS: https://egghead.io/articles/comparing-callba
gs-to-rxjs-for-reactive-programming
Further reading • Wiki: https://github.com/callbag/callbag/wiki (contains a list of available
utility packages) • Toolkit of commonly used operators: https://github.com/staltz/callbag-basics