Suppose we have N machines with identical hardware in a datacenter (reliable, low latency network).
We want the following functions:
insert(key: [u8; 32], value: [u8; 1024]) {
// inserts (key, value) pair
// we don't care which machine
}
get(key: [u8; 32]) -> Option<MachineEntry> {
either returns None or
a MachineEntry, which states which machine
the object is on, which we can use to get the data
}
We don't need support for transactions.
We need insert
to be atomic.
Reading from MachineEntry
needs to be atomic (but we don't have to guarantee it is the same as the instant in time as when the get was called.
-
how complicated is it to build something like this in Rust ?
-
what crates are useful for this ?
Pre-emptive FAQ:
- do you need durability / store to disk ?
No.
- do you need transaction support ?
No.