jonnify·bcs /bcs/elixir-core/relations

B2 · module 5 of 6 · Relations Are Systems

Relations Are Systems.

A relation is its own owning process: EchoData.Bcs.EdgeStore keys an edge by the tuple {subject, object} rather than a list on either endpoint, gates both ends against their namespaces, and owns a forward and a reverse index maintained together.

Three dives: the relation as its own system, both ends gated at every door, and the dual private indexes that answer traversal both ways without a scan.

An EdgeStore owning a forward and reverse ordered_set keyed by the subject-object tuple. Select a part.
subjectobject EchoData.Bcs.EdgeStoreone owner, one kind of edge fwdkey {subject, object}traverse from subjectrevkey {object, subject}traverse from object the tablesexported to nobody
readout · Select a part. EdgeStore is one owner for one kind of edge; the edge is a row keyed {subject, object}; it owns a forward and a reverse index, exported to nobody.
§1

The three dives

each a leaf, the teaching
§2

The module, in one law

echo_data · bcs/edge_store.ex, edges.ex

B2.5 reads a relation as a system. EchoData.Bcs.EdgeStore is one owning process for one kind of edge, keyed by the tuple of names {subject, object} rather than a list embedded in either endpoint; both ends are gated against their namespaces before any write; and the store owns two :private ordered sets — a forward index for traversal from the subject and a reverse index for traversal from the object — maintained together by the single owner. Three dives: the relation as its own system, both ends gated at every door, and the dual private indexes that answer traversal both ways without a scan. Grounded in EchoData.Bcs.EdgeStore — with the same composite-key-is-the-index idea in EchoData.Edges — and pointed at the membership and ownership graphs a Codemojex room keeps.

§4

The doors

the sibling courses
§4

References

sources · related

Sources

Related