A flexible sharding framework for creating eventually-consistent distributed datastores