SlideShare a Scribd company logo
1 of 124
Download to read offline
Concurrent Tries with Efficient Non-blocking Snapshots 
Aleksandar Prokopec 
Phil Bagwell 
Martin Odersky 
École Polytechnique Fédérale de Lausanne 
Nathan Bronson 
Stanford
Motivation 
val numbers = getNumbers() 
// compute square roots 
numbers foreach { entry => 
x = entry.root 
n = entry.number 
entry.root = 0.5 * (x + n / x) 
if (abs(entry.root - x) < eps) 
numbers.remove(entry) 
}
Hash Array Mapped Tries (HAMT)
Hash Array Mapped Tries (HAMT) 
0 = 0000002
Hash Array Mapped Tries (HAMT) 
0
Hash Array Mapped Tries (HAMT) 
0 
16 = 0100002
Hash Array Mapped Tries (HAMT) 
0 
16
Hash Array Mapped Tries (HAMT) 
0 
16 
4 = 0001002
Hash Array Mapped Tries (HAMT) 
16 
0 
4 = 0001002
Hash Array Mapped Tries (HAMT) 
16 
0 
4
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12 = 0011002
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12 = 0011002
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12
Hash Array Mapped Tries (HAMT) 
16 
33 
0 
4 
12
Hash Array Mapped Tries (HAMT) 
16 
33 
0 
4 
12 
48
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12 
48 
33 
37
Hash Array Mapped Tries (HAMT) 
16 
4 
12 
48 
33 
37 
0 
3
Hash Array Mapped Tries (HAMT) 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3 
48 
57
Immutable HAMT 
•used as immutable maps in functional languages 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3
Immutable HAMT 
•updates rewrite path from root to leaf 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3 
4 
12 
8 
9 
11 
insert(11)
Immutable HAMT 
•updates rewrite path from root to leaf 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3 
4 
12 
8 
9 
11 
insert(11) 
efficient updates - logk(n)
Node compression 
48 
57 
48 
57 
1 
0 
1 
0 
48 
57 
1 
0 
1 
0 
48 
57 
10 
BITPOP(((1 << ((hc >> lev) & 1F)) – 1) & BMP)
Node compression 
48 
57 
48 
57 
1 
0 
1 
0 
48 
57 
1 
0 
1 
0 
48 
57 
10 
48 
57
Ctrie 
Can mutable HAMT be modified to be 
thread-safe?
Ctrie insert 
4 
9 
12 
16 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012
Ctrie insert 
4 
9 
12 
16 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012 
16 
17 
1) allocate
Ctrie insert 
4 
9 
12 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012 
16 
17 
2) CAS
Ctrie insert 
4 
9 
12 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012 
16 
17
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
16 
17 
20 
25
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
16 
17 
20 
25 
1) allocate 
16 
17 
18
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
20 
25 
2) CAS 
16 
17 
18
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
20 
25 
2) CAS 
16 
17 
18 
Unless…
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
16 
17 
20 
25 
T1-1) allocate 
16 
17 
18 
Unless… 
28 = 0111002 
T1 
T2
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
T1-1) allocate 
16 
17 
18 
Unless… 
28 = 0111002 
T1 
T2 
20 
25 
28 
T2-1) allocate
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
T1-1) allocate 
16 
17 
18 
28 = 0111002 
T1 
T2 
20 
25 
28 
T2-2) CAS
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
T1-2) CAS 
16 
17 
18 
28 = 0111002 
T1 
T2 
20 
25 
28 
T2-2) CAS
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
16 
17 
18 
28 = 0111002 
T1 
T2 
20 
25 
28 
Lost insert!
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
20 
25 
Solution: I-nodes
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
20 
25 
18 = 0100102 
28 = 0111002 
T1 
T2
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
T1 
T2 
20 
25 
18 = 0100102 
28 = 0111002 
16 
17 
18 
20 
25 
28 
T2-1) allocate 
T1-1) allocate
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
T1 
T2 
20 
25 
16 
17 
18 
20 
25 
28 
T2-2) CAS 
T1-2) CAS
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
Idea: once added to the Ctrie, I-nodes remain present.
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
Remove operation supported as well - details in the paper.
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 1
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 2
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 3
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5 
actual size = 12
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5 
0 
1 
actual size = 12
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5 
0 
1 
CAS 
actual size = 11
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 5 
0 
1 
actual size = 11
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 11
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 11 
19
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 11 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 12 
16 
17 
18 
19 
CAS
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 6 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 6 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 7 
0 
1 
actual size = 9 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 8 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 9 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 10 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 11 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 12 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 13 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 13 
0 
1 
actual size = 12 
16 
17 
18 
19 
But the size 
was never 13!
Global state information 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•size 
•find 
•filter 
•iterator
Global state information 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•size 
•find 
•filter 
•iterator 
 snapshot
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive 
•not lock-free
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive 
•not lock-free 
•can insert or remove remain lock-free? 
0 
1 
2 
CAS
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive 
•not lock-free 
•can insert or remove remain lock-free? 
0 
1 
2 
CAS
Snapshot using logs 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•keep a linked list of previous values in each I-node
Snapshot using logs 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
0 
1 
2 
•keep a linked list of previous values in each I-node
Snapshot using logs 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•keep a linked list of previous values in each I-node 
•when is it safe to delete old entries? 
0 
1 
2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
root
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
root
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
root
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
#2 
root 
1) create new I-node at #2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
#2 
root 
2) set snapshot 
snapshot #1
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
#2 
root 
3) CAS root to new I-node 
snapshot #1
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
generation #2 - ok!
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
generation #1 
not ok, too old!
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
1) create updated node at #2 
snapshot #1 
2 
#2 
#2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
2) CAS to the updated node 
snapshot #1 
2 
#2 
#2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
#2 
#2 
#1 too old!
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
#2 
#2 
4 
9 
12 
#2 
1) create updated node at #2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
#2 
#2 
4 
9 
12 
#2 
2) CAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
finally, create a new leaf 
and CAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
another insert 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
another insert 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
But... this won't really work... why? 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
CAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
CAS 
How to fail this last CAS?
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
DCAS 
How to fail this last CAS? 
DCAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
How to fail this last CAS? 
DCAS - software based 
DCAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
How to fail this last CAS? 
DCAS - software based 
...creates intermediate objects 
DCAS
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
prev 
1) set prev field
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
prev 
2) CAS
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
prev 
3) read root generation
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
4) if root generation changed 
CAS prev to FailedNode(prev) 
FN
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
4) if root generation changed 
CAS prev to FailedNode(prev) 
FN
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
5) CAS to previous value 
FN
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
4) if root generation unchanged 
CAS prev to null
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
4) if root generation unchanged 
CAS prev to null
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
1) Replace all CAS with GCAS 
2) Replace all READ with GCAS_READ 
(which checks if prev field is null)
Snapshot-based iterator 
def iterator = 
if (isSnapshot) new Iterator(root) 
else snapshot().iterator()
Snapshot-based size 
def size = { 
val sz = 0 
val it = iterator 
while (it.hasNext) sz += 1 
sz 
}
Snapshot-based size 
def size = { 
val sz = 0 
val it = iterator 
while (it.hasNext) sz += 1 
sz 
} 
Above is O(n). 
But, by caching size in nodes - amortized O(logkn)! 
(see source code)
Snapshot-based atomic clear 
def clear() = { 
val or = READ(root) 
val nr = new INode(new Gen) 
if (!CAS(root, or, nr)) clear() 
} 
(roughly)
Evaluation - quad core i7
Evaluation – UltraSPARC T2
Evaluation – 4x 8-core i7
Evaluation – snapshot
Conclusion 
•snapshots are linearizable and lock-free 
•snapshots take constant time 
•snapshots are horizontally scalable 
•snapshots add a non-significant overhead to the algorithm if they aren't used 
•the approach may be applicable to tree-based lock-free data-structures in general (intuition)
Thank you!

More Related Content

What's hot

Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...Edureka!
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and SemanticsTatiana Al-Chueyr
 
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...Simplilearn
 
Apache Arrow and Pandas UDF on Apache Spark
Apache Arrow and Pandas UDF on Apache SparkApache Arrow and Pandas UDF on Apache Spark
Apache Arrow and Pandas UDF on Apache SparkTakuya UESHIN
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache SparkSamy Dindane
 
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...GeoSolutions
 
Getting The Best Performance With PySpark
Getting The Best Performance With PySparkGetting The Best Performance With PySpark
Getting The Best Performance With PySparkSpark Summit
 
Transformations and actions a visual guide training
Transformations and actions a visual guide trainingTransformations and actions a visual guide training
Transformations and actions a visual guide trainingSpark Summit
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...Databricks
 
What Is RDD In Spark? | Edureka
What Is RDD In Spark? | EdurekaWhat Is RDD In Spark? | Edureka
What Is RDD In Spark? | EdurekaEdureka!
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsAnton Kirillov
 
Mining Data Streams
Mining Data StreamsMining Data Streams
Mining Data StreamsSujaAldrin
 
FIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE
 
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...Spark Summit
 
Introduction to Apache Spark Developer Training
Introduction to Apache Spark Developer TrainingIntroduction to Apache Spark Developer Training
Introduction to Apache Spark Developer TrainingCloudera, Inc.
 
Introduction to apache spark
Introduction to apache spark Introduction to apache spark
Introduction to apache spark Aakashdata
 
Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introductionsudhakara st
 
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLabApache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
 

What's hot (20)

Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and Semantics
 
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
 
Spark graphx
Spark graphxSpark graphx
Spark graphx
 
Apache Arrow and Pandas UDF on Apache Spark
Apache Arrow and Pandas UDF on Apache SparkApache Arrow and Pandas UDF on Apache Spark
Apache Arrow and Pandas UDF on Apache Spark
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
 
Dive into PySpark
Dive into PySparkDive into PySpark
Dive into PySpark
 
Getting The Best Performance With PySpark
Getting The Best Performance With PySparkGetting The Best Performance With PySpark
Getting The Best Performance With PySpark
 
Transformations and actions a visual guide training
Transformations and actions a visual guide trainingTransformations and actions a visual guide training
Transformations and actions a visual guide training
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
 
What Is RDD In Spark? | Edureka
What Is RDD In Spark? | EdurekaWhat Is RDD In Spark? | Edureka
What Is RDD In Spark? | Edureka
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & Internals
 
Mining Data Streams
Mining Data StreamsMining Data Streams
Mining Data Streams
 
FIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data Models
 
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
From DataFrames to Tungsten: A Peek into Spark's Future-(Reynold Xin, Databri...
 
Introduction to Apache Spark Developer Training
Introduction to Apache Spark Developer TrainingIntroduction to Apache Spark Developer Training
Introduction to Apache Spark Developer Training
 
Introduction to apache spark
Introduction to apache spark Introduction to apache spark
Introduction to apache spark
 
Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introduction
 
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLabApache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
 

Similar to Ctrie Data Structure

Ethereum 9¾ @ Devcon5
Ethereum 9¾ @ Devcon5Ethereum 9¾ @ Devcon5
Ethereum 9¾ @ Devcon5Wanseob Lim
 
Next Generation Sequencing file Formats ( 2017 )
Next Generation Sequencing file Formats ( 2017 )Next Generation Sequencing file Formats ( 2017 )
Next Generation Sequencing file Formats ( 2017 )Pierre Lindenbaum
 
Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?Bogdan Storozhuk
 
Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques Alexander Litvinenko
 
Complete Factoring Rules.ppt
Complete Factoring Rules.pptComplete Factoring Rules.ppt
Complete Factoring Rules.pptJasmin679773
 
Complete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.pptComplete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.pptElmabethDelaCruz2
 
Single elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptxSingle elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptxssuser1580e5
 
Applied Econometrics assignment3
Applied Econometrics assignment3Applied Econometrics assignment3
Applied Econometrics assignment3Chenguang Li
 
Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Alexander Litvinenko
 
Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...Alexander Litvinenko
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort AlgorithmGail Carmichael
 
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算Xue Xin Tsai
 
Cassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalkCassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalkAndriy Rymar
 
Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...Alexander Litvinenko
 

Similar to Ctrie Data Structure (20)

LEC 8-DS ALGO(heaps).pdf
LEC 8-DS  ALGO(heaps).pdfLEC 8-DS  ALGO(heaps).pdf
LEC 8-DS ALGO(heaps).pdf
 
FINAL PROJECT
FINAL PROJECTFINAL PROJECT
FINAL PROJECT
 
Ethereum 9¾ @ Devcon5
Ethereum 9¾ @ Devcon5Ethereum 9¾ @ Devcon5
Ethereum 9¾ @ Devcon5
 
Next Generation Sequencing file Formats ( 2017 )
Next Generation Sequencing file Formats ( 2017 )Next Generation Sequencing file Formats ( 2017 )
Next Generation Sequencing file Formats ( 2017 )
 
Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?
 
Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques
 
Complete Factoring Rules.ppt
Complete Factoring Rules.pptComplete Factoring Rules.ppt
Complete Factoring Rules.ppt
 
Complete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.pptComplete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.ppt
 
Single elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptxSingle elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptx
 
Applied Econometrics assignment3
Applied Econometrics assignment3Applied Econometrics assignment3
Applied Econometrics assignment3
 
Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...
 
Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...
 
SPSF03 - Numerical Integrations
SPSF03 - Numerical IntegrationsSPSF03 - Numerical Integrations
SPSF03 - Numerical Integrations
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort Algorithm
 
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
Swifter Taipei 聊聊 Swift 遊樂場、變數常數、數字與運算
 
PORTIQUE VERIF
PORTIQUE VERIFPORTIQUE VERIF
PORTIQUE VERIF
 
Cassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalkCassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalk
 
Sua chua may lanh cua daikin
Sua chua may lanh cua daikinSua chua may lanh cua daikin
Sua chua may lanh cua daikin
 
Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...
 
Bahco tools
Bahco toolsBahco tools
Bahco tools
 

More from Aleksandar Prokopec

More from Aleksandar Prokopec (8)

Work-stealing Tree Data Structure
Work-stealing Tree Data StructureWork-stealing Tree Data Structure
Work-stealing Tree Data Structure
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
ScalaBlitz
ScalaBlitzScalaBlitz
ScalaBlitz
 
Scala Parallel Collections
Scala Parallel CollectionsScala Parallel Collections
Scala Parallel Collections
 
ScalaMeter 2014
ScalaMeter 2014ScalaMeter 2014
ScalaMeter 2014
 
ScalaMeter 2012
ScalaMeter 2012ScalaMeter 2012
ScalaMeter 2012
 
Reactive Collections
Reactive CollectionsReactive Collections
Reactive Collections
 
ScalaDays 2014 - Reactive Scala 3D Game Engine
ScalaDays 2014 - Reactive Scala 3D Game Engine ScalaDays 2014 - Reactive Scala 3D Game Engine
ScalaDays 2014 - Reactive Scala 3D Game Engine
 

Recently uploaded

Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 

Recently uploaded (20)

Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 

Ctrie Data Structure

  • 1. Concurrent Tries with Efficient Non-blocking Snapshots Aleksandar Prokopec Phil Bagwell Martin Odersky École Polytechnique Fédérale de Lausanne Nathan Bronson Stanford
  • 2. Motivation val numbers = getNumbers() // compute square roots numbers foreach { entry => x = entry.root n = entry.number entry.root = 0.5 * (x + n / x) if (abs(entry.root - x) < eps) numbers.remove(entry) }
  • 3. Hash Array Mapped Tries (HAMT)
  • 4. Hash Array Mapped Tries (HAMT) 0 = 0000002
  • 5. Hash Array Mapped Tries (HAMT) 0
  • 6. Hash Array Mapped Tries (HAMT) 0 16 = 0100002
  • 7. Hash Array Mapped Tries (HAMT) 0 16
  • 8. Hash Array Mapped Tries (HAMT) 0 16 4 = 0001002
  • 9. Hash Array Mapped Tries (HAMT) 16 0 4 = 0001002
  • 10. Hash Array Mapped Tries (HAMT) 16 0 4
  • 11. Hash Array Mapped Tries (HAMT) 16 0 4 12 = 0011002
  • 12. Hash Array Mapped Tries (HAMT) 16 0 4 12 = 0011002
  • 13. Hash Array Mapped Tries (HAMT) 16 0 4 12
  • 14. Hash Array Mapped Tries (HAMT) 16 33 0 4 12
  • 15. Hash Array Mapped Tries (HAMT) 16 33 0 4 12 48
  • 16. Hash Array Mapped Tries (HAMT) 16 0 4 12 48 33 37
  • 17. Hash Array Mapped Tries (HAMT) 16 4 12 48 33 37 0 3
  • 18. Hash Array Mapped Tries (HAMT) 4 12 16 20 25 33 37 0 1 8 9 3 48 57
  • 19. Immutable HAMT •used as immutable maps in functional languages 4 12 16 20 25 33 37 0 1 8 9 3
  • 20. Immutable HAMT •updates rewrite path from root to leaf 4 12 16 20 25 33 37 0 1 8 9 3 4 12 8 9 11 insert(11)
  • 21. Immutable HAMT •updates rewrite path from root to leaf 4 12 16 20 25 33 37 0 1 8 9 3 4 12 8 9 11 insert(11) efficient updates - logk(n)
  • 22. Node compression 48 57 48 57 1 0 1 0 48 57 1 0 1 0 48 57 10 BITPOP(((1 << ((hc >> lev) & 1F)) – 1) & BMP)
  • 23. Node compression 48 57 48 57 1 0 1 0 48 57 1 0 1 0 48 57 10 48 57
  • 24. Ctrie Can mutable HAMT be modified to be thread-safe?
  • 25. Ctrie insert 4 9 12 16 20 25 33 37 0 1 3 48 57 17 = 0100012
  • 26. Ctrie insert 4 9 12 16 20 25 33 37 0 1 3 48 57 17 = 0100012 16 17 1) allocate
  • 27. Ctrie insert 4 9 12 20 25 33 37 0 1 3 48 57 17 = 0100012 16 17 2) CAS
  • 28. Ctrie insert 4 9 12 20 25 33 37 0 1 3 48 57 17 = 0100012 16 17
  • 29. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 16 17 20 25
  • 30. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 16 17 20 25 1) allocate 16 17 18
  • 31. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 20 25 2) CAS 16 17 18
  • 32. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 20 25 2) CAS 16 17 18 Unless…
  • 33. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 16 17 20 25 T1-1) allocate 16 17 18 Unless… 28 = 0111002 T1 T2
  • 34. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 T1-1) allocate 16 17 18 Unless… 28 = 0111002 T1 T2 20 25 28 T2-1) allocate
  • 35. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 T1-1) allocate 16 17 18 28 = 0111002 T1 T2 20 25 28 T2-2) CAS
  • 36. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 T1-2) CAS 16 17 18 28 = 0111002 T1 T2 20 25 28 T2-2) CAS
  • 37. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 16 17 18 28 = 0111002 T1 T2 20 25 28 Lost insert!
  • 38. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 20 25 Solution: I-nodes
  • 39. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 20 25 18 = 0100102 28 = 0111002 T1 T2
  • 40. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 T1 T2 20 25 18 = 0100102 28 = 0111002 16 17 18 20 25 28 T2-1) allocate T1-1) allocate
  • 41. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 T1 T2 20 25 16 17 18 20 25 28 T2-2) CAS T1-2) CAS
  • 42. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 18 20 25 28
  • 43. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 18 20 25 28 Idea: once added to the Ctrie, I-nodes remain present.
  • 44. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 18 20 25 28 Remove operation supported as well - details in the paper.
  • 45. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28
  • 46. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 47. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 48. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 49. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 50. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 1
  • 51. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 2
  • 52. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 3
  • 53. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5
  • 54. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5 actual size = 12
  • 55. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5 0 1 actual size = 12
  • 56. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5 0 1 CAS actual size = 11
  • 57. Ctrie size 4 9 12 16 17 18 20 25 28 size = 5 0 1 actual size = 11
  • 58. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 11
  • 59. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 11 19
  • 60. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 11 16 17 18 19
  • 61. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 12 16 17 18 19 CAS
  • 62. Ctrie size 4 9 12 20 25 28 size = 6 0 1 actual size = 12 16 17 18 19
  • 63. Ctrie size 4 9 12 20 25 28 size = 6 0 1 actual size = 12 16 17 18 19
  • 64. Ctrie size 4 9 12 20 25 28 size = 7 0 1 actual size = 9 16 17 18 19
  • 65. Ctrie size 4 9 12 20 25 28 size = 8 0 1 actual size = 12 16 17 18 19
  • 66. Ctrie size 4 9 12 20 25 28 size = 9 0 1 actual size = 12 16 17 18 19
  • 67. Ctrie size 4 9 12 20 25 28 size = 10 0 1 actual size = 12 16 17 18 19
  • 68. Ctrie size 4 9 12 20 25 28 size = 11 0 1 actual size = 12 16 17 18 19
  • 69. Ctrie size 4 9 12 20 25 28 size = 12 0 1 actual size = 12 16 17 18 19
  • 70. Ctrie size 4 9 12 20 25 28 size = 13 0 1 actual size = 12 16 17 18 19
  • 71. Ctrie size 4 9 12 20 25 28 size = 13 0 1 actual size = 12 16 17 18 19 But the size was never 13!
  • 72. Global state information 4 9 12 20 25 28 0 1 16 17 18 19 •size •find •filter •iterator
  • 73. Global state information 4 9 12 20 25 28 0 1 16 17 18 19 •size •find •filter •iterator  snapshot
  • 74. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19
  • 75. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive
  • 76. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive •not lock-free
  • 77. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive •not lock-free •can insert or remove remain lock-free? 0 1 2 CAS
  • 78. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive •not lock-free •can insert or remove remain lock-free? 0 1 2 CAS
  • 79. Snapshot using logs 4 9 12 20 25 28 0 1 16 17 18 19 •keep a linked list of previous values in each I-node
  • 80. Snapshot using logs 4 9 12 20 25 28 0 1 16 17 18 19 0 1 2 •keep a linked list of previous values in each I-node
  • 81. Snapshot using logs 4 9 12 20 25 28 0 1 16 17 18 19 •keep a linked list of previous values in each I-node •when is it safe to delete old entries? 0 1 2
  • 82. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 root
  • 83. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 root
  • 84. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! root
  • 85. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! #2 root 1) create new I-node at #2
  • 86. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! #2 root 2) set snapshot snapshot #1
  • 87. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! #2 root 3) CAS root to new I-node snapshot #1
  • 88. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2
  • 89. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 generation #2 - ok!
  • 90. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 generation #1 not ok, too old!
  • 91. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root 1) create updated node at #2 snapshot #1 2 #2 #2
  • 92. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root 2) CAS to the updated node snapshot #1 2 #2 #2
  • 93. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 #2 #2 #1 too old!
  • 94. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 #2 #2 4 9 12 #2 1) create updated node at #2
  • 95. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 #2 #2 4 9 12 #2 2) CAS
  • 96. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 finally, create a new leaf and CAS
  • 97. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 another insert #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3
  • 98. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 another insert #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3
  • 99. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 But... this won't really work... why? #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3
  • 100. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18
  • 101. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 CAS
  • 102. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 CAS How to fail this last CAS?
  • 103. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 DCAS How to fail this last CAS? DCAS
  • 104. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 How to fail this last CAS? DCAS - software based DCAS
  • 105. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 How to fail this last CAS? DCAS - software based ...creates intermediate objects DCAS
  • 106. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 T2: remove 19 16 17 18 prev 1) set prev field
  • 107. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 T2: remove 19 16 17 18 prev 2) CAS
  • 108. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 T2: remove 19 16 17 18 prev 3) read root generation
  • 109. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 4) if root generation changed CAS prev to FailedNode(prev) FN
  • 110. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 4) if root generation changed CAS prev to FailedNode(prev) FN
  • 111. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 5) CAS to previous value FN
  • 112. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 4) if root generation unchanged CAS prev to null
  • 113. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 4) if root generation unchanged CAS prev to null
  • 114. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 1) Replace all CAS with GCAS 2) Replace all READ with GCAS_READ (which checks if prev field is null)
  • 115. Snapshot-based iterator def iterator = if (isSnapshot) new Iterator(root) else snapshot().iterator()
  • 116. Snapshot-based size def size = { val sz = 0 val it = iterator while (it.hasNext) sz += 1 sz }
  • 117. Snapshot-based size def size = { val sz = 0 val it = iterator while (it.hasNext) sz += 1 sz } Above is O(n). But, by caching size in nodes - amortized O(logkn)! (see source code)
  • 118. Snapshot-based atomic clear def clear() = { val or = READ(root) val nr = new INode(new Gen) if (!CAS(root, or, nr)) clear() } (roughly)
  • 119. Evaluation - quad core i7
  • 121. Evaluation – 4x 8-core i7
  • 123. Conclusion •snapshots are linearizable and lock-free •snapshots take constant time •snapshots are horizontally scalable •snapshots add a non-significant overhead to the algorithm if they aren't used •the approach may be applicable to tree-based lock-free data-structures in general (intuition)