Share
Embed
Consistency in Zenoh, an edge data fabric
Presented at RainbowFS Workshop, Paris on 28th March 2022
Sreeja S Nair
April 08, 2022
Transcript
83 slides
-
Senior Technologis t ZettaScale Technolog y RainbowFS worksho p 28/03/2022
Sreeja S. Nair, PhD Achieving Eventual Consistency in Zenoh -
Mission Bring to every connected human and machine the unconstrained
freedom to communicate, compute and store — anywhere, at any scale, ef f i -
Eclipse Foundation, “From DevOps to EdgeOps: A Vision for Edge
Computing“, 2021 -
Compute Produce Distribute Store Pull Store Compute Consume Retrieve Eclipse
Foundation, “From DevOps to EdgeOps: A Vision for Edge Computing“, 2021 Push Push Push Push Compute Push Push Push Pull Pull Push -
“Some people want it to happen, some wish it would
happen, others make it happen.” – Michael Jordan 5 Uni s -
7 Extensions Filesystem Memory … Storage plugin SSE HTML5 Server
Sent Events V2X/R2X connectivity Administration & monitoring plugin plugin Pluggable backends -
8 Topologies Clique Mesh Router Router Router Router Peer Peer
Peer Peer Peer Peer Peer Peer Peer Client Client Client Client Brokered Routed Peer-to-pee d -
9 Resource : A named data, in other terms a
(key, value) Key expression : An expression identifying a set of key s Publisher : A spring of values for a key expression Subscriber : A sink of values for a key expression Queryable : A well of values for a key expression Abstractions /home/kitchen/sensor/temp, 21. 5 /home/bedroom/sensor/temp, 19 /home/kitchen/sensor/tem p /home/kitchen/** -
10 /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher Publisher
Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
10 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher
Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
10 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher
Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
11 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher
Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
11 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher
Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
12 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher
Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
12 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** Publisher
Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Zenoh in Action -
13 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** get
/louvre/*/temp Publisher Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Querier Zenoh in Action -
13 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** get
/louvre/*/temp Publisher Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Querier Zenoh in Action -
14 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** get
/louvre/*/temp Publisher Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Querier Zenoh in Action -
14 zZ /louvre/**/temp /louvre/1/temp /louvre/2/temp /louvre/1/temp /louvre/2/temp /louvre/2/** /louvre/1/** get
/louvre/*/temp Publisher Publisher Subscribe r Subscribe r Pul l Subscribe r Storage Storage Querier Zenoh in Action -
15 High throughput (4M msg/s — +40Gb/s) n Ubuntu 20.0
4 AMD Ryze n 32GB RA M 100Gbps ETH Pub Sub Host Host “One of the things I love about music is live performance.” - Yo-Yo Ma -
16 Replication in Zenoh Peer Peer Peer Router Router Router
Router Router Peer Peer Peer Peer Peer Peer Peer Router Client Client Client Client Client Client Client /louvre/** /louvre/** /louvre/** Publisher Publisher Publisher Publisher Publisher Storage Storage Storage Fault toleranc g -
17 Replicated storages Abstract View /louvre/** /louvre/** /louvre/** Publisher Publisher
Publisher Publisher Publisher Publisher Storage Storage Storage -
18 Replicated storages Abstract View /louvre/** /louvre/** /louvre/** Publisher Publisher
Publisher Publisher Publisher Publisher Storage Storage Storage /louvre/1/temp -
18 Replicated storages Abstract View /louvre/** /louvre/** /louvre/** Publisher Publisher
Publisher Publisher Publisher Publisher Storage Storage Storage /louvre/1/temp -
19 Why consistency? /louvre/** /louvre/** /louvre/** Storage Storage Storage (louvre/1/temp,
201:23) (louvre/1/temp, 201:23) (louvre/1/temp, 203:22) -
20 - Network might have partitions Diverging scenario Peer Peer
Peer Router Router Router Router Router Peer Peer Peer Peer Peer Peer Peer Router Client Client Client Client Client Client Client -
20 - Network might have partitions Diverging scenario Peer Peer
Peer Router Router Router Router Router Peer Peer Peer Peer Peer Peer Peer Router Client Client Client Client Client Client Client -
23 Replication now /louvre/** /louvre/** /louvre/** get /louvre/floor1/temp Storage Storage
Storage Querier (louvre/1/temp, 201:23) (louvre/1/temp, 201:23) (louvre/1/temp, 203:22) -
23 Replication now /louvre/** /louvre/** /louvre/** get /louvre/floor1/temp Storage Storage
Storage Querier (louvre/1/temp, 201:23) (louvre/1/temp, 201:23) (louvre/1/temp, 203:22) -
24 Result Consolidation /louvre/** /louvre/** /louvre/** get /louvre/floor1/temp 201:23 201:23
203:22 Storage Storage Storage Results from the storage are shown as timestamp: value Querier Consolidation modes : NONE, LAZY, FULL -
24 Result Consolidation /louvre/** /louvre/** /louvre/** get /louvre/floor1/temp 201:23 201:23
203:22 Storage Storage Storage Results from the storage are shown as timestamp: value Querier Consolidation modes : NONE, LAZY, FULL -
24 Result Consolidation /louvre/** /louvre/** /louvre/** get /louvre/floor1/temp 203:22 Storage
Storage Storage Results from the storage are shown as timestamp: value Querier Consolidation modes : NONE, LAZY, FULL -
27 •Multiple publishers and storages for the same dat l
All models are wrong, but some are useful - George E. P. Box -
29 Anti-Entropy work fl ow Replica A Replica B get
snapshot compute digest publish digest compare with local snapshot get missing info missing info update datastore At pre-de t -
30 Properties for snapshots snapshot_time < current_time − propagation_delay −
possible_skew possible_skew ≈ UHLC_MAX_DELTA_MS propagation_delay ≈ network_diameter intervalk = (ORIGIN + Δ × (k − 1), ORIGIN + Δ × k] snapshot_time = k * Δ -
30 Properties for snapshots snapshot_time < current_time − propagation_delay −
possible_skew possible_skew ≈ UHLC_MAX_DELTA_MS propagation_delay ≈ network_diameter intervalk = (ORIGIN + Δ × (k − 1), ORIGIN + Δ × k] Sample settings ; -
31 • Use CRC hashes fi cient Hashing algorithm Run
on Apple M1 processor with 8GB RAM -
34 Composition of era Era … Interval 1 Interval n
… Subinterval 1 Subinterval m … Timestamp 1 Timestamp t <Operation, Key, Value> -
34 Composition of era Sub 11 Sub 1n … Interval
1 TS 111 TS 1n1 … Interval m … … Era TS 11t TS 1nu … … Era … Interval 1 Interval n … Subinterval 1 Subinterval m … Timestamp 1 Timestamp t <Operation, Key, Value> -
35 Compressing the digest Sub 11 Sub 1n … Interval
1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era COLD WARM HOT Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era -
35 Compressing the digest Sub 11 Sub 1n … Interval
1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era COLD WARM HOT Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era -
35 Compressing the digest Sub 11 Sub 1n … Interval
1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era COLD WARM HOT Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era -
35 Compressing the digest Sub 11 Sub 1n … Interval
1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era COLD WARM HOT Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era Sub 11 Sub 1n … Interval 1 Snip 11 Snip 1n … Sub m1 Sub mn … Interval m Snip m1 Snip mn … … Era -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests … -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests … -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests Processed Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests Processed Digests -
Replica 36 Zenoh Replica Storage Digest publisher Digest subscriber Aligner
Align Queryable Timestamp Log Digests Processed Digests -
38 A replication algorithm that supports storing data anywhere in
the device to cloud continuu s -
43 Digest for a time-series data store Sub 11 Sub
1n … Interval 1 Snap 11 Snap 1n … Sub m1 Sub mn … Interval m Snap m1 Snap mn … … Hash COLD WARM HOT Compressing digest -
43 Digest for a time-series data store Sub 11 Sub
1n … Interval 1 Snap 11 Snap 1n … Sub m1 Sub mn … Interval m Snap m1 Snap mn … … Hash COLD WARM HOT Compressing digest -
43 Digest for a time-series data store Sub 11 Sub
1n … Interval 1 Snap 11 Snap 1n … Sub m1 Sub mn … Interval m Snap m1 Snap mn … … Hash COLD WARM HOT Compressing digest -
43 Digest for a time-series data store Sub 11 Sub
1n … Interval 1 Snap 11 Snap 1n … Sub m1 Sub mn … Interval m Snap m1 Snap mn … … Hash COLD WARM HOT Compressing digest Mega hash 1 Mega hash 2 Hash 1 Hash 2 Mega hash 3 Mega hash 4 Hash 3 Hash 4 -
43 Digest for a time-series data store Sub 11 Sub
1n … Interval 1 Snap 11 Snap 1n … Sub m1 Sub mn … Interval m Snap m1 Snap mn … … Hash COLD WARM HOT Compressing digest Mega hash 1 Mega hash 2 Hash 1 Hash 2 Mega hash 3 Mega hash 4 Hash 3 Hash 4 -
Key value COLD WARM HOT Hashing methodology Subinterval based Hash
Structure Shallow tree with 3 levels Storage Entire tree stored Transmission Top level only First two levels Entire tree Misalignment detection 1 - era conten t 2 - interval conten t 3- subinterval content 1- interval content 2- subinterval content 1- request subinterval content Time series COLD WARM HOT Hashing methodology Heirarchical + incremental Subinterval based Hash Structure Linked list Shallow tree with 3 levels Storage Entire list stored Entire tree stored Transmission Head only First two levels Entire tree Misalignment detection N- list entr y n+1- mega conten t n+2- interval conten t n+3- subinterval 1- interval content 2- subinterval content 1- request subinterval content 44 Comparing digest creation