Skip to main content

Query Evaluator

Execution of queries retains the same role responsibility, where the receiver is the clique(s) (cluster(s)) responsible for the hypergraph, and the sender is the keyholder. The sender being blind to decisions of the receiver, makes the query being processed indistinguishable from gossip requests for additional data blocks, which will happen by virtue of the parent BlossomSub protocol. Again, the algorithms are produced from the source literature:

Load Node (Qpi(S, O)):
  1. V ← ∅, E ← ∅
  2. Execute query on hi
  3. vi ← S ∧ wj ← O, V ← {vi, wj}, E ← (vi, wj), QAGi ← (V, E)
  4. Return QAGi
Load Neighbor Node (Qpi, Qpi+1(S, O)):
  1. V ← ∅, E ← ∅
  2. If (Qpi.S == Qpi+1.S) ∧ (Qpi.O == Qpi+1.S), then if ∃Qpi+1.O ∈ V then V ← V ∪ Qpi.S ∧ Qpi.O ∈ pi+1.O, E ← (V ∈ Qpi, V ∈ Qpi+1) else V ← V ∪ Qpi+1.O, E ← (V ∈ Qpi, V ∈ Qpi+1).
  3. Else, if (Qpi.S == Qpi+1.O)∧(Qpi.O == Qpi+1.O) then if ∃Qpi+1.S ∈ V then V ← V ∪Qpi.S∧Qpi.O ∈ Qpi+1.S, E ← (V ∈ Qpi, V ∈ Qpi+1), else V ← V ∪ Qpi+1.S, E ← (V ∈ Qpi, V ∈ Qpi+1). In either case, QAG ← QAGi ∪ (V, E)
  4. Return QAGi
Process Query:
  1. Given a set of predicates QG, Qp and I(G).
  2. ∀Qpi|1 ≤ i ≤ n − 1, if i == 1 then execute LoadNode with Qpi(S, O), else execute LoadNeighborNode with Qpi, Qpi+1(S, O).
  3. Return QAGi