PumpkinDB: Immutable Ordered Key-Value Database Engine with Rust

PumpkinDB is an immutable ordered key-value database engine, featuring:

  • ACID transactions
  • Persistent storage
  • An embedded programming language (PumpkinScript)
  • Binary keys and values (allows any encoding to be used: JSON, XML, Protobuf, Cap'n Proto, etc.)
  • Standalone and embedded scenarios

Why immutable?

Simply put, the data replaced is data deleted and is therefore, an unsafe way to manage data. Bugs,
misunderstanding, changing scope and requirements and other factors might influence what data (and
especially past data) means and how can it be used.

By guaranteeing the immutability of key's value once it is set, PumpkinDB forces its users
to think of their data through a temporal perspective.

This approach is highly beneficial for implementing event sourcing and similar types of architectures.

What is PumpkinDB?

PumpkinDB is essentially a database programming environment, largely inspired by core ideas behind MUMPS. Instead of M,
it has a Forth-inspired stack-based language, PumpkinScript. Instead of hierarchical keys, it has a flat key namespace and doesn't allow overriding values once they are set.  Core motivation for immutability was that with the cost of storage declining, erasing data is effectively a strategical mistake.

While not intended for general purpose programming, its main objective is to facilitate building specialized application-specific and generic databases with a particular focus on immutability and processing data as close to storage as possible, incurring as little communication penalty as possible.

Applications communicate with PumpkinDB by sending small PumpkinScript programs
over a network interface (or API when using PumpkinDB as an embedded solution).

PumpkinDB offers a wide array of primitives for concurrency, storage, journalling, indexing and other common building blocks.

Why is it a database engine?

The core ideas behind PumpkinDB stem from the so called
lazy event sourcing
approach which is based on storing and indexing events while delaying domain
binding for as long as possible. That said, the intention of this database is to
be a building block for different kinds of architectures, be it
classic event sourcing (using it as an event store), lazy event sourcing (using
indices) or anything else. It's also possible to implement different approaches within
a single database for different parts of the domain.

Instead of devising custom protocols for talking to PumpkinDB, the protocol of
communication has become a pipeline to a script executor. This offers us enormous extension
and flexibility capabilities.

While an external application can talk to PumpkinDB over a network connection, PumpkinDB's
engine itself is embeddable and can be used directly. Currenly, it is available for Rust
applications only, but this may one day extend to all languages that can interface with C.

License

MPL-2.0 License.

Resources





Friday is an Open-source Virtual Assistant

Virtual assistant technology defines as an application program that uses semantic and deep learning. It can also call an AI assistant or digital assistant. It helps users or enterprises to assist people or automate tasks. Any virtual assist.......Read more...

15 Open-source Physics Simulation Engine

What is a physics simulation engine?A physics simulation engine is a custom software engine that grants developers add visual effetcs, simulate and tweak objects and enviroments accroding to the law of physics in 2D, 3D or both. With physi.......Read more...

CMS: Is a Self-hosted Open-source Contest Management System

CMS, or Contest Management System, is a distributed system for running and (to some extent) organizing a programming contest. CMS has been designed to be general and to handle many types of contests, tasks, scoring, etc. Nonetheless, CMS ha.......Read more...

18 Open-source Flat-file Wiki Engines

A flat-file system is a solution that save records, and data in a plain files, instead of depending on an external database to store its content. Unlike database dependent systems, which requires you to setup, configure, prepare, and manag.......Read more...

Ace: an Open-source Code Editor for the Web

What is Ace?Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. I.......Read more...