Expand description
Iron Rose is a rust implementation of Invertable Bloom Filters as found in What’s the Difference? Efficient Set Reconciliation without Prior Context
Expected use case looks something like this.
use iron_rose::{Side, StrataEstimator, IBF};
use uuid::Uuid;
let mut estimator = StrataEstimator::default();
let mut remote_estimator = StrataEstimator::default();
for x in ids_from_database.iter() {
estimator.encode(**x);
}
// Retreive Remote Estimator in some way
let ibf_size = estimator
.estimate_differences(&remote_estimator)
.expect("estimators should be same shape");
let mut local = IBF::new(ibf_size);
for x in ids_from_database.iter() {
local.encode(**x);
}
// Retreive remote IBF
let diff = (local - remote).expect("Local and remote should be the same shape");
let differences = diff
.decode()
.expect("Successfully decoded because IBFs were large enough");Structs§
- IBF
- Core Invertable Bloom Filter Data Structure. This allows us to store and differentially retreive a set of u128s, provided that the two IBFs have enough information in them. This is a raw building block, and is useful for passing around IDs.
- Strata
Estimator - Strata Estimator for determining the size of IBF needed to successfuly decode the differences in two sets.
Enums§
- Side
- Which side of the IBF is this from