⚡📦 CAR Pool & More 🚙💨 A Pragmatic Improvement to Sync Performance
github.com/fission-suite/spec/car-pool
Slide 2
Slide 3
The limitation of local knowledge is the fundamental fact about the setting in which we work, and it is a very powerful limitation – Nancy Lynch, A Hundred Impossibility Proofs for Distributed Computing
Slide 4
Slide 5
Some peers are “more peer” than others (especially in an operator context)
Slide 6
BROOKLYN ZELENKA
JUSTIN JOHNSON
@expede CTO @ Fission
@justincjohnson IPFS Engineer @ Fission
Won’t have time to cover everything in depth. Come talk to us after, or read the spec ;)
Slide 7
Caveat
Trusted, Point-to-Point IPLD Transfer
Slide 8
The Problem Pain In Practice ❤🩹
Slide 9
The Problem
Why?
Slide 10
The Problem
Why? We 💕 IPLD
Fission has deeply nested, cross-linked data that Cannot fit into browser storage Benefits from deduplication Has multiple writers Using mature, universally supported transports would be awesome “Light clients” Speed of light concerns
Slide 11
The Problem
Food. Water. Shelter.
Slide 12
The Problem
Food. Water. Shelter.
Slide 13
The Problem
Flakiness in Browsers & CLI & GitHub Actions
Slide 14
The Problem
Flakiness in Browsers & CLI & GitHub Actions
🖥
Slide 15
The Problem
Are You There? 🤳
Slide 16
The Problem
Are You There? 🤳 Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks don’t make sense for our use case
ffi
(We’d love to share an operator node architecture wish list with any maintainers, though)
Slide 17
The Problem
Are You There? 🤳 Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks don’t make sense for our use case (We’d love to share an operator node architecture wish list with any maintainers, though)
ffi
Up/down over a HTTP Gateway is just LARPing decentralization 🌶
Slide 18
The Problem
Are You There? 🤳 Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks don’t make sense for our use case (We’d love to share an operator node architecture wish list with any maintainers, though) Up/down over a HTTP Gateway is just LARPing decentralization 🌶
ffi
Native push doesn’t make sense
Slide 19
The Problem
Are You There? 🤳 Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks don’t make sense for our use case (We’d love to share an operator node architecture wish list with any maintainers, though) Up/down over a HTTP Gateway is just LARPing decentralization 🌶 Native push doesn’t make sense
ffi
🖥
Slide 20
The Problem
Are You There? 🤳 Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks don’t make sense for our use case (We’d love to share an operator node architecture wish list with any maintainers, though) Up/down over a HTTP Gateway is just LARPing decentralization 🌶 Native push doesn’t make sense
ffi
🖥
💾
Slide 21
The Problem
Bitswap Redux
Slide 22
The Problem
Bitswap Redux
Slide 23
The Problem
Bitswap Redux 🎁?
Slide 24
The Problem
Bitswap Redux 🎁? 🎁!
Slide 25
The Problem
Bitswap Redux 🎁? 👀
🎁!
Slide 26
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲?
Slide 27
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
Slide 28
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
Slide 29
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
💾 🎟 🖼?
Slide 30
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
💾 🎟 🖼? 🎟!
Slide 31
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
💾 🎟 🖼? 🎟!
👀
Slide 32
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
💾 🎟 🖼? 🎟!
👀
🧸?
Slide 33
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
💾 🎟 🖼? 🎟!
👀
🧸? 🧸!
Slide 34
The Problem
Bitswap Redux 🎁? 👀
🎁! 🔑🌲? 🔑🌲!
👀
💾 🎟 🖼? 🎟!
👀
🧸? 🧸!
Slide 35
The Problem
Bitswap Redux
🗜
🎁? 👀
🎁!
🔑🌲? 🔑🌲!
👀
💾 🎟 🖼? 🎟!
👀
🧸? 🧸!
Slide 36
The Problem
Breadth vs Depth
Slide 37
The Problem
Breadth vs Depth
Slide 38
The Problem
Breadth vs Depth ✅
Slide 39
The Problem
Breadth vs Depth ✅
Slide 40
The Problem
Breadth vs Depth ✅
❌
Slide 41
The Problem
Breadth vs Depth
❌
✅
☝
Slide 42
Prior Art
On the Shoulders of Giants
Slide 43
Prior Art
IPFS Ecosystem
Slide 44
Prior Art
IPFS Ecosystem
Qri’s DSync GraphSync, Selectors (orthogonal) WNFS(v1) Hashed History Table Merkle Bloom
Slide 45
The Problem
Papers 📜
Slide 46
The Problem
Papers 📜 To Push or Pull: On Reducing Communication and Synchronization in Graph Computations What’s The Di erence? E cient Set Reconciliation Without Prior Context Synchronizing Namespaces with Invertible Bloom Filters The Hash History Approach for Reconciling Mutual Inconsistency HEX BLOOM: An E cient Method for Authenticity and Integrity Verification in Privacy-preserving Computing
ffi
ffi
ff
The Distributed Bloom Filter
Slide 47
CAR Mirror One-to-One
Slide 48
CAR Mirror
Strategy
Slide 49
CAR Mirror
Strategy
Reduce graph scope Send index with request Use heuristics to find deduplication
Slide 50
CAR Mirror
Slide 51
CAR Mirror
Balancing Factors
Slide 52
CAR Mirror
Balancing Factors
Latency
Accuracy/Deduplication
Slide 53
CAR Mirror
Balancing Factors
Latency
Accuracy/Deduplication
Slide 54
CAR Mirror
Balancing Factors
Latency
Accuracy/Deduplication
Slide 55
CAR Mirror
Balancing Factors
Latency
Equilibrium TL;DR We can a ord to be messy
ff
Accuracy/Deduplication
Slide 56
CAR Mirror
First Reduce Scope
Slide 57
CAR Mirror
First Reduce Scope AOT Mutable pointers (IPNS, DNSLink, ENS, di ed CID, etc)
ff
Previous CAR Mirror sessions
Slide 58
CAR Mirror
First Reduce Scope AOT Mutable pointers (IPNS, DNSLink, ENS, di ed CID, etc) Previous CAR Mirror sessions Adaptive Optimization
ff
Previous CAR Mirror rounds
Slide 59
CAR Mirror
First Reduce Scope AOT Mutable pointers (IPNS, DNSLink, ENS, di ed CID, etc) Previous CAR Mirror sessions Adaptive Optimization Previous CAR Mirror rounds No Overlap or Cold Start If the set is small, use random nodes
ff
“Worst case” looks very similar to Bitswap
Slide 60
CAR Mirror
Back of the Napkin
Slide 61
CAR Mirror
Back of the Napkin
500k nodes
Slide 62
CAR Mirror
Back of the Napkin
500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each
Slide 63
CAR Mirror
Back of the Napkin
500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB
Slide 64
CAR Mirror
Back of the Napkin
500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB Gzipped ~ 11.5MB
Slide 65
CAR Mirror
Back of the Napkin
500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB Gzipped ~ 11.5MB
Slide 66
CAR Mirror
Back of the Napkin
500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB Gzipped ~ 11.5MB 🤔 ? r e t t e b o d e w Can
Slide 67
CAR Mirror
Bloom Filter Primer
Slide 68
CAR Mirror
Context and Heuristics
Slide 69
CAR Mirror
Context and Heuristics
500k nodes @ FPP 1/1M = 1.71MB
Slide 70
CAR Mirror
Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB
Slide 71
CAR Mirror
Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB
93% savings! 👍