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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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時代の認知負荷との向き合い方
optfit
0
150
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
250
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
組織で育むオブザーバビリティ
ryota_hnk
0
170
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Designing for humans not robots
tammielis
254
26k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
The SEO Collaboration Effect
kristinabergwall1
0
350
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Thoughts on Productivity
jonyablonski
74
5k
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