sp132_82199
11/06/2025, 7:40 AMu8v, u8vv, or u8vvk.
Whenever the object is accessed, the authorization check is performed by taking the object's geohash,
truncating it to precisions 3, 4, and 5, and executing CheckBulkPermissions on these geohashes.
So for example, if the object's geohash is ubd7gj1yev, the check will be performed against [ubd7g, ubd7, ubd]. This effectively triples the number of checks.
Another approach is to skip different precisions and use only the most precise one (which is 5 in our case).
This way, larger geohashes will be broken down into smaller ones at runtime, and grants will be created for each of them.
The number of stored relations will increase dramatically - instead of creating a single grant for u8v, 1024 (32×32) will be created for its constituents (u8v**).
I want to keep the CheckPermission / CheckBulkPermissions latency to the minimum because they are going to be in the hot path for thousands of users accessing hundreds of objects.yetitwo
11/06/2025, 3:07 PMsp132_82199
11/06/2025, 3:22 PMcore/user:{userId}#view_objects@core/geohash:ubd7g
core/user:{userId}#view_objects@core/geohash:ubd7
core/user:{userId}#view_objects@core/geohash:ubd
If one of the checks is successful - access to the object with geohash ubd7gj1yev is authorized. If I understood you correctly, these checks will be batched on the datastore level and can be considered optimal?
> i'd also consider caching behavior - it sounds like there's more potential for cache hits if you're allowing the user to grant on the larger blocks.
Riiiight, because of the TinyLFU and the maximum number of items it can hold.yetitwo
11/07/2025, 12:21 PMsp132_82199
11/07/2025, 3:32 PM