- Strong consistency on the likes of Spanner / Cockroach DB. For this version,
we'll skip even eventual consistency. But, note that it is the long term plan
to make this a proper database, supporting strongly consistent writes.
-[MultiRaft by Cockroachdb](http://www.cockroachlabs.com/blog/scaling-raft/) would
be better aligned to support all the shards handled by one server. But it's also
more complex, and will have to wait for later versions.
- No automatic shard movement from one server to another.
- No distributed Posting Lists. One complete PL = one shard.
## Terminology
Term | Definition | Link
:---: | --- | ---
Entity | Item being described | [link](https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model)
Attribute | A conceptual id (not necessary UUID) from a finite set of properties | [link](https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model)
Value | value of the attribute |
ValueId | If value is an id of another entity, `ValueId` is used to store that |
Posting List | A map with key = (Entity, Attribute) and value = (list of Values). This is how underlying data gets stored. |
Shard | Most granular data chunk that would be served by one server. In MVP, one shard = one complete posting list. |
Server | Machine connected to network, with local RAM and disk. Each server can serve multiple shards. |
Raft | Each shard would have multipe copies in different servers to distribute query load and improve availability. RAFT is the consensus algorithm used to determine leader among all copies of a shard. | [link](https://github.com/coreos/etcd/tree/master/raft)
Replica | Replica is defined as a non-leading copy of the shard after RAFT election, with the leading copy is defined as shard. |