Datalog meets CRDTs

Konrad Kühne

Created: 2018-01-17 Wed 20:08

About us

christian.png Christian Weilbach, Master Student in AI

konrad.jpg Konrad Kühne, Software Architect

Motivation

  • replikativ: replication system based on CRDTs written in Clojure
  • mature building blocks: persistence, communication, cryptography
  • goal: opensource, x-runtime, functional, distributed database with query engine and CRDTs

Datahike

  • combination of datalog and hitchhiker tree
  • operational local prototype
  • collaboration with datsys project
  • central tripple-element storage

Datalog

  • declarative logic programming language
  • similar to SQL

Hitchhiker Tree

  • query performance of B+ tree
  • write performance of append-only log
  • convenience of functional, persistent datastructure
  • unfortunately no scientific research

Future Building Blocks

  • persistent storage (konserve)
  • transactions (hitchhiker tree)
  • tree replication (index-sync)
  • CRDTs (replikativ)
  • datalog query engine (datascript)

Test Environment

  • databases: datahike, datomic, datascript
  • in-memory only
  • 100K entries
  • 5 queries with increasing complexity
  • on local machine

Test Results

Average execution time for basic datalog queries

perf.png

Roadmap and further Ideas

  • distribution by tree synchronisation
  • CRDT mapping to indices
  • datalog CRDT integration
  • query caching strategies
  • datalog on blockchain (in etherum smart contracts)