Crate unbase [] [src]

unbase is a causal, coordination-free distributed data-persistence and application framework. It is fundamentally reactive, fault tolerant, and decentralized. It could be thought of as a peer-to-peer database with a causal consistency model, stored procedures and triggers, content-filtered pubsub built in. When Unbase is ready for production use, it should be usable as an application framework, distributing busines logic all around the network as needed.

The unbase design entails no server/client distinctions, no masters, no quorums, no DHT, and maximum consistency with human causal expectation. We reject the notion that consistency requires serializability. Orchestration of physical reality doesn't entail centralized arbiters, and neither should our systems.

Unbase is presently pre-alpha, and should not yet be used for anything serious. See unba.sefor details.

  • Network Represents an unbase system

  • Slab Storage for constituent elements of the unbase data model: Memos, MemoRefs, and SlabRefs.

  • Context Enforces the consistency model, allows for queries to be executed

  • Subject Conceptually similar to an Object, or an RDBMS record. Rather than storing state, state is projected as needed to satisfy user queries.

let net     = unbase::Network::create_new_system(); // use new, except for the very first time
let slab    = unbase::Slab::new(&net);
let context = slab.create_context();

let record  = unbase::SubjectHandle::new_kv(&context, "beast","Tiger").unwrap();
let record2 = context.fetch_kv("beast","Tiger").expect("it worked").expect("it was found");
record.set_value("sound","Rawwr");

assert_eq!(record2.get_value("sound").unwrap(), "Rawwr");

Re-exports

pub use network::Network;
pub use subjecthandle::SubjectHandle;
pub use slab::Slab;

Modules

context
error
index
memorefhead
network
slab
subjecthandle
util

Structs

SubjectId