Skip to main content

A log-structured, partitioned NoSQL database engine with full-text search, numeric indexes, and dual TCP/HTTP protocols.

Project description

MkDB

MkDB is a Custom Log-Structured Merge & Partitioned Redundant Storage Engine built entirely in Python. It provides a robust, highly-available NoSQL/Document database experience with secondary indexing, full-text search, and dual-protocol network access.

Architecture Highlights

  • Rolling Log Storage Engine: Append-only storage format guaranteeing high write availability with safe background compaction.
  • RAM Cache & Debounced Write Queue: In-memory caching and debounced batching for extreme performance under high write load.
  • Query Engine & Secondary Indexes: Fully featured query evaluation including numeric range checks and tokenized full-text inverted indexes.
  • Data Integrity: Multi-disk mirroring and Reed-Solomon parity encoding for proactive self-healing and failover.
  • Dual Protocols: Accessible via high-speed, persistent TCP WebSockets or standard stateless REST HTTP endpoints.
  • Web Administration UI: Includes an embedded web control panel out-of-the-box (/control endpoint).

Project Structure

  • src/db/: The core database engine (storage primitives, RAM caching, query evaluator, auto-compaction and parity management).
  • src/server/: The networking boundary. Houses the TCP Socket and HTTP REST servers, as well as the web-based Control Panel.
  • src/config/: Configuration schemas for tailoring memory limits, storage thresholds, and cluster layout.
  • sdk/: The official MkDBClient for programmatic interaction from Python code.

Getting Started

Prerequisites

  • Python 3.10+
  • The database storage format is built into MkDB natively, but you'll need the following for advanced data integrity features (Reed-Solomon logic):
    pip install reedsolo
    

Starting the Server

MkDB operates as a CLI tool. Launch the engine by pointing it to your desired database directory (which must contain a config.json file configuring your stores and network bindings):

python mkdb.py /path/to/your/db

Once running, the database will host both TCP socket and HTTP interfaces as specified in your config.json. The web control panel is accessible via your browser (check server output for the bound port, normally http://localhost:<port>).

Using the Python SDK

The MkDBClient connects seamlessly to your database and abstracts the dual-protocol system:

from sdk.mkdb_client import MkDBClient

client = MkDBClient()
client.connect(host="127.0.0.1", port=8080)

# Writing a document (computes delta updates intelligently)
client.set(
    store="products",
    record_id="prod_001",
    data={"name": "Steel Bolt", "price": 9.99, "category": "fasteners"}
)

# Reading a document
record = client.get("products", "prod_001")

# Querying with filters
results = client.query("products", filter={
    "price": {"<=": 10.00},
    "category": ["fasteners"]
})

See the docs/ folder for comprehensive guides on the Query Syntax and SDK Reference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymkdb-0.1.2.tar.gz (110.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymkdb-0.1.2-py3-none-any.whl (130.3 kB view details)

Uploaded Python 3

File details

Details for the file pymkdb-0.1.2.tar.gz.

File metadata

  • Download URL: pymkdb-0.1.2.tar.gz
  • Upload date:
  • Size: 110.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.7

File hashes

Hashes for pymkdb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b578be68fc51adccdb7af610e222eccb7ec76e3f60f8b8b0885caf6f7974bfd1
MD5 561d3f5c412ded888343ab0af7a19948
BLAKE2b-256 f53da0d04d27897c4e1a047f369f090c819d215a9ed5a4dfc099dc1833da37b5

See more details on using hashes here.

File details

Details for the file pymkdb-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pymkdb-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 130.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.7

File hashes

Hashes for pymkdb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 266eb2c0568d2877a7fa67843ddd98955c64b8ecb6b3bd9968fa24db9e5efff2
MD5 3350128dd51e980569882bcab175cf92
BLAKE2b-256 5219431201456ce88e50da063ba11c3977d7fc795ceabf83f5e2f732c0c3a385

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page