DefraDB is a Peer-to-Peer Edge Database. It's the core data storage system for the Source Network Ecosystem, built with IPLD, LibP2P, CRDTs, and Semantic open web properties.
Currently, only Primary Indexes are implemented, which is a simple relation between dockey/field => state_data. Effectively this is an index on the dockey field of a document. This is a minimal requirement for making the DB work, however we need to let devs also manually define "Secondary Indexes".
Secondary Indexes allow devs to index on alternative fields, even a combination of multiple fields. Which can lead to effecient querys for certain filter/order/etc arguments. The idea is if a developer knows ahead of time the likely kind of queries/lookups their respective application needs, then they can optimize the DB structure for those specific queries.
Currently, only
Primary Indexes
are implemented, which is a simple relation betweendockey/field => state_data
. Effectively this is an index on thedockey
field of a document. This is a minimal requirement for making the DB work, however we need to let devs also manually define "Secondary Indexes".Secondary Indexes allow devs to index on alternative fields, even a combination of multiple fields. Which can lead to effecient querys for certain filter/order/etc arguments. The idea is if a developer knows ahead of time the likely kind of queries/lookups their respective application needs, then they can optimize the DB structure for those specific queries.
Starting a spec doc as there are a number of goals/compromises/designs that need to be considered: https://hackmd.io/rLHMu-KvRFC0OoE8xkwYlA