Main Page: Difference between revisions
No edit summary  | 
				No edit summary Β   | 
				||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
=  | = MemCP β A Modern In-Memory Columnar Database =  | ||
MemCP is a   | '''MemCP is a high-performance, in-memory, column-oriented database designed for modern workloads.'''    | ||
It provides a lightweight, developer-friendly alternative to traditional relational databases such as MySQL, with a focus on speed, compression, and direct API integration.  | |||
----  | ----  | ||
===   | == Key Features ==  | ||
* '''High Performance''': NUMA-aware, parallelized query execution optimized for multicore CPUs, large caches, and NVMe SSDs. Handles both OLTP and OLAP workloads efficiently.Β    | |||
* '''Columnar Storage''': Data is stored by column for improved compression, reduced memory footprint, and faster analytical queries.Β    | |||
* '''In-Memory Operation''': Designed to keep data in memory, with configurable persistence backends for durability.Β    | |||
* '''Built-in APIs''': Exposes RESTful endpoints directly from the database, reducing middleware overhead.Β    | |||
* '''Compression''': Multiple strategies (bit-packing, dictionary encoding, sequence compression) reduce storage by up to 80% compared to MySQL/MariaDB.Β    | |||
* '''Simple Deployment''': Start with a single <code>docker run</code> or <code>pm2 start</code> command. Lightweight footprint (~10MB).Β    | |||
* '''Extensible''': Written in Go, with pluggable storage backends and custom frontend support (SQL, RDF, REST).    | |||
----  | |||
Β   | |||
== Why MemCP? ==  | |||
Β   | |||
Traditional relational databases were designed decades ago, optimized for spinning disks and single-core CPUs.Β    | |||
MemCP rethinks the core design for todayβs hardware and workloads:  | |||
Β   | |||
* Real-time dashboards and analyticsΒ    | |||
* Data-heavy SaaS platformsΒ    | |||
* Embedded systems with limited resourcesΒ    | |||
* High-throughput OLTP/OLAP hybridsΒ    | |||
----  | |||
== Quick Start ==  | |||
Clone and build MemCP from source:  | |||
<pre>  | |||
git clone https://github.com/launix-de/memcp  | |||
cd memcp  | |||
go get  | |||
make  | |||
pm2 start ./memcp ./data/  | |||
</pre>  | |||
Connect with MySQL tooling:  | |||
<pre>  | |||
mysql -u root -p -P 3307  | |||
Enter password: admin  | |||
</pre>  | |||
----  | ----  | ||
==  | == MemCP vs. MySQL ==  | ||
Β   | |||
{| class="wikitable"  | {| class="wikitable"  | ||
!Feature  | ! Feature  | ||
!MySQL  | ! MySQL  | ||
!MemCP  | ! MemCP  | ||
|-  | |-  | ||
|Storage Model  | | Storage Model  | ||
|Row-based  | | Row-based  | ||
|Column-based (compressed)  | | Column-based (compressed)  | ||
|-  | |-  | ||
|Performance  | | Performance  | ||
|Good  | | Good  | ||
|  | | NUMA-optimized, in-memory  | ||
|-  | |-  | ||
|In-Memory Capable  | | In-Memory Capable  | ||
|Limited  | | Limited  | ||
|Yes  | | Yes (default)  | ||
|-  | |-  | ||
|REST API Integration  | | REST API Integration  | ||
|External   | | External  | ||
|Built-in  | | Built-in  | ||
|-  | |-  | ||
|Installation Footprint  | | Installation Footprint  | ||
|~150MB+  | | ~150MB+  | ||
|~10MB  | | ~10MB  | ||
|-  | |-  | ||
|Open Source  | | Open Source  | ||
|β
  | | β
  | ||
|β
  | | β
  | ||
|}  | |}  | ||
----  | |||
== Architecture Overview ==  | |||
* '''Tables, Schemas, Columns''': Familiar SQL-style structures with a columnar physical layout.Β    | |||
* '''Transaction Model''': Supports both OLTP and OLAP semantics with delta + main storage.Β    | |||
* '''Persistence''': Configurable storage backends (filesystem, S3, Ceph).Β    | |||
* '''Frontends''': Multiple query interfaces:  | |||
Β  - SQL frontend (MySQL wire protocol + SQL over REST)Β    | |||
Β  - RDF/graph query engineΒ    | |||
Β  - Custom APIs via in-database web appsΒ    | |||
----  | ----  | ||
===   | == Documentation ==  | ||
* [[What is OLTP and OLAP]]Β    | |||
* [[History of the MemCP project]]Β    | |||
* [[Hardware Requirements]]Β    | |||
* [[Persistency and Performance Guarantees]]Β    | |||
* [[Comparison: MemCP vs. MySQL]]Β    | |||
* [[Install MemCP with Docker|Install with Docker]]Β    | |||
* [[Compile MemCP from Source|Build from Source]]Β    | |||
* [[Contributing]]Β    | |||
* [[SQL over REST]]Β    | |||
* [[In-Database WebApps|REST & Microservices]]Β    | |||
----  | |||
===Navigation===  | ===Navigation===  | ||
| Line 166: | Line 166: | ||
* [[S3 Buckets]]  | * [[S3 Buckets]]  | ||
* [[Ceph/Rados]]  | * [[Ceph/Rados]]  | ||
* [[Cluster Monitor]]  | |||
====Internals====  | ====Internals====  | ||
| Line 199: | Line 200: | ||
----  | |||
== Further Reading ==  | |||
* [https://github.org/launix-de/memcp MemCP on GitHub]Β    | |||
[https://github.org/launix-de/memcp MemCP on   | * [https://www.vldb.org/pvldb/vol13/p2649-boncz.pdf VLDB Research Paper]Β    | ||
* [https://cs.emis.de/LNI/Proceedings/Proceedings241/383.pdf LNI Proceedings Paper]Β    | |||
* [https://www.dcs.bbk.ac.uk/~dell/teaching/cc/paper/sigmod10/p135-malewicz.pdf Large Graph Algorithms]    | |||
Additional blog posts on design decisions, compression techniques, and performance optimization are available on the [https://launix.de/launix/ Launix blog].  | |||
Β   | |||
----  | |||
== Community ==  | |||
MemCP is an open-source project maintained by developers for developers.Β    | |||
Contributions are welcome β whether in the form of bug reports, feature requests, or pull requests.Β    | |||
See: [[Contributing]]  | |||
Latest revision as of 12:52, 22 September 2025
MemCP β A Modern In-Memory Columnar Database
MemCP is a high-performance, in-memory, column-oriented database designed for modern workloads. It provides a lightweight, developer-friendly alternative to traditional relational databases such as MySQL, with a focus on speed, compression, and direct API integration.
Key Features
- High Performance: NUMA-aware, parallelized query execution optimized for multicore CPUs, large caches, and NVMe SSDs. Handles both OLTP and OLAP workloads efficiently.
 - Columnar Storage: Data is stored by column for improved compression, reduced memory footprint, and faster analytical queries.
 - In-Memory Operation: Designed to keep data in memory, with configurable persistence backends for durability.
 - Built-in APIs: Exposes RESTful endpoints directly from the database, reducing middleware overhead.
 - Compression: Multiple strategies (bit-packing, dictionary encoding, sequence compression) reduce storage by up to 80% compared to MySQL/MariaDB.
 - Simple Deployment: Start with a single 
docker runorpm2 startcommand. Lightweight footprint (~10MB). - Extensible: Written in Go, with pluggable storage backends and custom frontend support (SQL, RDF, REST).
 
Why MemCP?
Traditional relational databases were designed decades ago, optimized for spinning disks and single-core CPUs. MemCP rethinks the core design for todayβs hardware and workloads:
- Real-time dashboards and analytics
 - Data-heavy SaaS platforms
 - Embedded systems with limited resources
 - High-throughput OLTP/OLAP hybrids
 
Quick Start
Clone and build MemCP from source:
git clone https://github.com/launix-de/memcp cd memcp go get make pm2 start ./memcp ./data/
Connect with MySQL tooling:
mysql -u root -p -P 3307 Enter password: admin
MemCP vs. MySQL
| Feature | MySQL | MemCP | 
|---|---|---|
| Storage Model | Row-based | Column-based (compressed) | 
| Performance | Good | NUMA-optimized, in-memory | 
| In-Memory Capable | Limited | Yes (default) | 
| REST API Integration | External | Built-in | 
| Installation Footprint | ~150MB+ | ~10MB | 
| Open Source | β | β | 
Architecture Overview
- Tables, Schemas, Columns: Familiar SQL-style structures with a columnar physical layout.
 - Transaction Model: Supports both OLTP and OLAP semantics with delta + main storage.
 - Persistence: Configurable storage backends (filesystem, S3, Ceph).
 - Frontends: Multiple query interfaces:
 
- SQL frontend (MySQL wire protocol + SQL over REST) - RDF/graph query engine - Custom APIs via in-database web apps
Documentation
- What is OLTP and OLAP
 - History of the MemCP project
 - Hardware Requirements
 - Persistency and Performance Guarantees
 - Comparison: MemCP vs. MySQL
 - Install with Docker
 - Build from Source
 - Contributing
 - SQL over REST
 - REST & Microservices
 
Introduction
- What is OLTP and OLAP
 - History of the MemCP project
 - Hardware Requirements
 - Persistency and Performance Guarantees
 - Current Status and Open Issues
 - Comparison: MemCP vs. MySQL
 
Getting Started
- With Docker
 - With Singularity
 - Build from Source
 - Contributing
 - Introduction to Scheme
 - Full SCM API documentation
 
Administration
- Deployment
 - Migration from MySQL and PostgreSQL
 - Settings
 - Process Hibernation
 - Performance Measurement
 - MemCP Console
 
Frontends
SQL Frontend
- Supported SQL
 - Advanced SQL Tutorial
 - SQL over REST
 - Supported Tooling
 - How SQL Operators are implemented on MemCP
 - Add custom SQL operators to MemCP
 
RDF Frontend
Custom Frontends
Persistency Backends (= Storage)
Internals
How things work in MemCP
- Databases, Tables and Columns
 - Shards, RecordIDs, Main Storage, Delta Storage
 - Columnar Storage
 - Transactions
 - Full SCM API documentation
 
SCM Documentation
- SCM Builtins
 - Arithmetic / Logic
 - Strings
 - Streams
 - Lists
 - Associative Lists / Dictionaries
 - Date
 - Vectors
 - Parsers
 - Sync
 - IO
 - Storage
 
Optimizations
- In-Memory Compression, Columnar Compression Techniques
 - Temporary Columns
 - Data Auto Sharding and Auto Indexing
 - Parallel Computing
 
Further Reading
Additional blog posts on design decisions, compression techniques, and performance optimization are available on the Launix blog.
Community
MemCP is an open-source project maintained by developers for developers. Contributions are welcome β whether in the form of bug reports, feature requests, or pull requests.
See: Contributing