Semantic Resolution
• Your app knows the domain - use business
rules to resolve
• Amazon Dynamo’s shopping cart
Slide 14
Slide 14 text
Semantic Resolution
• Your app knows the domain - use business
rules to resolve
• Amazon Dynamo’s shopping cart
BAD
Slide 15
Slide 15 text
Semantic Resolution
• Your app knows the domain - use business
rules to resolve
• Amazon Dynamo’s shopping cart
BAD
“Ad hoc approaches
have proven brittle
and error-prone”
Slide 16
Slide 16 text
Goals
✔Meaningful values
✔Automatic resolution
✔Transparent to user
Slide 17
Slide 17 text
WARNING
This is a lot of math.
Side effects may include dry mouth, itchy
rash, and a desire to go back for a PhD.
Slide 18
Slide 18 text
Monotonic Functions
• Change in strictly a
single direction
• Consecutive values
may be equal
• Monotonic: Linear,
Exponential
• Non-monotonic:
Quadratic, Sinusoidal
Slide 19
Slide 19 text
Monotonic Functions
• Change in strictly a
single direction
• Consecutive values
may be equal
• Monotonic: Linear,
Exponential
• Non-monotonic:
Quadratic, Sinusoidal
Slide 20
Slide 20 text
Monotonic Logic
•Existing facts are never refuted
•New facts can be added
•“Knowledge only grows”
Slide 21
Slide 21 text
Monotonic Logic
•Existing facts are never refuted
•New facts can be added
•“Knowledge only grows”
“monotonicity of entailment”
Bounded Join Semi-Lattice
⊥ ∈ S (minimal element)
ʪS, ⊔, ⊥ʫ
S is a set
Slide 26
Slide 26 text
Bounded Join Semi-Lattice
ʪS, ⊔, ⊥ʫ
⊔ is a least-upper bound function
∀x, y ∈ S, ∃z ∈ S: x ⊔ y = z
Slide 27
Slide 27 text
Bounded Join Semi-Lattice
∀x, y ∈ S: x ≤S y 㱻 x ⊔ y = y “partial order”
ʪS, ⊔, ⊥ʫ
⊔ is a least-upper bound function
∀x, y ∈ S, ∃z ∈ S: x ⊔ y = z
Slide 28
Slide 28 text
Bounded Join Semi-Lattice
∀x, y ∈ S: x ≤S y 㱻 x ⊔ y = y “partial order”
∀x ∈ S: x ⊔ ⊥ = x “identity”
ʪS, ⊔, ⊥ʫ
⊔ is a least-upper bound function
∀x, y ∈ S, ∃z ∈ S: x ⊔ y = z
Slide 29
Slide 29 text
“Set” Lattice
S = all finite sets
⊔ = set-union
⊥ = {}
Slide 30
Slide 30 text
“Set” Lattice
{a} {b} {c} {d} {e}
{a,b}
{b,c} {c,d} {d,e}
{a,b,c} {c,d,e}
{b,c,d,e}
{a,b,c,d}
{b,c,d}
{a,b,c,d,e}
Time
S = all finite sets
⊔ = set-union
⊥ = {}
Slide 31
Slide 31 text
Vector Clock
Slide 32
Slide 32 text
• Vector clock is a lattice...
Vector Clock
Slide 33
Slide 33 text
• Vector clock is a lattice...
Vector Clock
S = all vectors of (Actor, Count) pairs
⊔ = All Actors, each with their max Count
⊥ = [] (empty vector)
Slide 34
Slide 34 text
• Vector clock is a lattice...
• ...but the associated Riak value is non-
monotonic,
Vector Clock
S = all vectors of (Actor, Count) pairs
⊔ = All Actors, each with their max Count
⊥ = [] (empty vector)
Slide 35
Slide 35 text
• Vector clock is a lattice...
• ...but the associated Riak value is non-
monotonic,
• ...and the vclock is not meaningful to the client.
Vector Clock
S = all vectors of (Actor, Count) pairs
⊔ = All Actors, each with their max Count
⊥ = [] (empty vector)