DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

ActorDB


ActorDB is a distributed relational SQL database, which is strongly consistent, massively concurrent, and horizontally scalable. It supports no single point of failure and uses no global read or write locks. To achieve the features provided, ActorDB uses Raft distributed consensus algorithm on top of an existing stable SQL database engine. ActorDB splits the dataset into small independent chunks, which is inspired by the "Actor Model". The database is designed for microservices, saas solutions, and (mobile) app backends.[04][03][05]

Source Code
https://github.com/biokoda/actordb[02]
Country of Origin
SI
Start Year
2014 [20]
Project Types
Commercial, Open Source
Written in
Erlang
Supported Languages
Erlang
Embeds / Uses
LMDB, SQLite
Compatible With
MySQL
Operating Systems
Linux, macOS, Windows

Database Entry

ActorDB


ActorDB is a distributed relational SQL database, which is strongly consistent, massively concurrent, and horizontally scalable. It supports no single point of failure and uses no global read or write locks. To achieve the features provided, ActorDB uses Raft distributed consensus algorithm on top of an existing stable SQL database engine. ActorDB splits the dataset into small independent chunks, which is inspired by the "Actor Model". The database is designed for microservices, saas solutions, and (mobile) app backends.[04][03][05]

History[06][07][08]


Started with the project Emit Cloud, which is a file synchronization application like Dropbox, the developers at Biokoda found problems in achieving no single point of failure and horizontal scalability. To solve the problem, developers at Biokoda extended SQLite's WAL format to implement Raft. In the later versions, LMDB is used as the storage engine for ActorDB. ActorDB was first launched in 2014.

Checkpoints[09]


Using LMDB as the storage engine, ActorDB stores pages in an append-only style. It replaces SQLite's WAL implementation, and checkpoints are replaced with cleanups that free up space.

Compression[09][10]


Pages are compressed in ActorDB using LZ4, which is a general-purpose algorithm.

Concurrency Control[11][12]


Although ActorDB is concurrent on the database level, it is not on each actor. The storage engine LMDB employs MVCC.

Data Model[03][02]


ActorDB is a distributed relational database. But it also has the scalability of a Key-Value(KV) store by introducing a KV data type, which is a SQL table that is partitioned across all servers.

Foreign Keys[13][14]


Foreign keys are enabled by default in ActorDB.

Indexes[15]


ActorDB uses SQLite as the query engine, which uses B-Tree for its default indexing data structure.

Isolation Levels[16]


Every actor is an SQLite database, where all transactions are serializable.

Joins[15]


Each actor runs SQLite as the query engine, which uses Nested Loop Join.

Logging[09]


ActorDB uses Raft protocol to replicate actors. The protocol is extended on SQLite WAL module and requires a write log to operate.

Query Execution[15]


ActorDB uses SQLite as its query engine, which uses Volcano-style query processing.

Query Interface[17][02]


ActorDB doesn't need any special drivers, as developers can use MySQL driver of the language of choice. ActorDB is connectable over the MySQL protocol. It is also connectable to the thrift interface, which supports more popular languages.

Storage Architecture[16][18]


ActorDB uses LMDB as its storage engine. Each actor is stored within an LMDB file. LMDB uses mmap to achieve in memory storage.

Storage Model[18]


As the storage engine being used, LMDB uses a memory-map to store the database with copy-on-write semantics, hence no specific storage model.

Storage Organization


System Architecture[19]


ActorDB has clusters that have 1, 3, or 5 nodes, each of which contains about 4 shards. The nodes act as independent actors who share no common memory or storage.

Views[17]


Citations

20 sources
  1. ActorDB | Distributed SQL database with linear scalability actordb.com
  2. GitHub - biokoda/actordb: ActorDB distributed SQL database · GitHub github.com
  3. ActorDB | Documentation - About actordb.com
  4. actorDB and sqlite FTS features · Issue #24 · biokoda/actordb github.com
  5. Actor model - Wikipedia wikipedia.org
  6. ‎App Store apple.com Dead — Check Archive
  7. ActorDB - How and why we run SQLite on top of LMDB biokoda.com
  8. Why we built ActorDB biokoda.com
  9. ActorDB | Documentation - How it works actordb.com
  10. CMU SCS 15-721 (Spring 2017) :: Database Compression cmu.edu
  11. Lightning Memory-Mapped Database - Wikipedia wikipedia.org
  12. ActorDB | Documentation - How it works actordb.com
  13. ActorDB | Documentation - Key/Value store actordb.com
  14. https://gitter.im/actordb/actordb gitter.im Dead — Check Archive
  15. https://dbdb.io/db/sqlite dbdb.io
  16. ActorDB | Documentation - Examples actordb.com
  17. ActorDB | Documentation - Examples actordb.com
  18. https://dbdb.io/db/lmdb dbdb.io
  19. ActorDB | Documentation - Examples actordb.com
  20. first public release github.com
Revision #10 Last Updated: