Expand description
Leopard Indexing for optimized reachability queries
Implements the Leopard indexing strategy from Google Zanzibar to achieve O(1) authorization checks for pre-computed relationship paths.
§How it works
Instead of traversing the relationship graph at query time, Leopard pre-computes and materializes transitive closures for frequently accessed relationships.
Example: If owner inherits viewer, and alice is an owner of doc1,
the index stores both:
(alice, owner, doc1)- direct relationship(alice, viewer, doc1)- computed/inherited relationship
§Performance
- Reads: O(1) lookup in materialized index
- Writes: O(n) where n is the depth of inheritance chain
- Space: O(tuples × avg_inheritance_depth)
Structs§
- Leopard
Config - Configuration for Leopard indexing
- Leopard
Index - Leopard reachability index
- Leopard
Stats - Statistics for Leopard index
- Reachability
Entry - A materialized reachability entry