class
Movie::Cluster::StableHashPartitioner
Overview
Allocation-independent FNV-1a partitioning. Crystal's runtime String#hash is deliberately avoided because actor-system processes must agree on the shard for an entity key.
Defined in:
movie/cluster/sharding/strategies.crConstant Summary
-
OFFSET_BASIS =
14695981039346656037_u64 -
PRIME =
1099511628211_u64
Instance Method Summary
Instance methods inherited from class Movie::Cluster::EntityPartitioner
configuration_key : String
configuration_key,
shard_for(entity_type : String, entity_id : String, shard_count : Int32) : Int32
shard_for
Instance Method Detail
def shard_for(entity_type : String, entity_id : String, shard_count : Int32) : Int32
#