Skip to content

xeondb/Xeondb

Repository files navigation

Xeondb Logo

       

What is Xeondb?

Xeondb is a real-time big data database that is designed to be fast, efficient, and easy to use. It is built on top of a custom storage engine that is optimized for high performance and low latency.

Install & Update (Linux)

curl -fsSL https://xeondb.com/install | sudo bash

Update

curl -fsSL https://xeondb.com/update | sudo bash

Build Prerequisites

Xeondb is fussy about the build environment. It requires a C++15 compliant compiler and CMake 3.20 or higher. A pre-configured Docker image is available for those who want to avoid the hassle of setting up the build environment. You also have the option to build the project natively on your machine, but be prepared for some potential configuration challenges.

Building Xeondb

Building Xeondb is straightforward with CMake + Ninja. The provided Docker image is also available for a hassle-free build process.

Using Ninja

cmake -S . -B build -G Ninja  # Configure project for Ninja
ninja -C build                # Build the project

# Common targets
ninja -C build test           # Run test suite
ninja -C build lint           # Run clang-tidy
ninja -C build formatCheck    # Check formatting
ninja -C build format         # Apply formatting
ninja -C build run            # Run the server (config/settings.yml)

# Cleaning
ninja -C build clean          # Remove build outputs only
ninja -C build wipeData       # Wipe database file contents (/var/lib/... and ./var/lib/...)
ninja -C build purge          # wipeData + delete build contents

# Optional: Full build (build + lint + tests)
ninja -C build build

Using Docker

docker build -t xeondb . # Builds the Docker image for Xeondb
docker run --name xeondb # Runs the Xeondb server in a Docker container

Configuration

Xeondb can be configured using a configuration file. The configuration file allows you to specify various settings such as the server port, data directory, and logging options. Environment variables can also be used to override specific configuration settings without modifying the configuration file.

# XeonDB server configuration

# Network configuration
# - host: IP address to bind to (0.0.0.0 = all interfaces)
# - port: TCP port to listen on
network:
  host: 0.0.0.0
  port: 9876

# Storage configuration
# - Directory where all keyspaces/tables/WAL live
storage:
  dataDir: /var/lib/xeondb/data

# Limits / safety valves
# - maxLineBytes: maximum bytes per request line (SQL + newline)
# - maxConnections: max concurrent TCP connections
limits:
  maxLineBytes: 1048576
  maxConnections: 1024
  # Optional quota enforcement (auth-enabled deployments only)
  # - quotaEnforcementEnabled: when true, enforce per keyspace quota rows in SYSTEM.KEYSPACE_QUOTAS and reject writes that exceed the quota with "quota_exceeded".
  # - quotaBytesUsedCacheTtlMs: Limit the size that a keyspace can be.
  quotaEnforcementEnabled: false
  quotaBytesUsedCacheTtlMs: 2000

# Write-ahead log (WAL)
# - walFsync: "always" or "periodic" (periodic is faster, slightly less durable)
# - walFsyncIntervalMs: periodic fsync interval
# - walFsyncBytes: optional size hint for fsync batching
wal:
  walFsync: periodic
  walFsyncIntervalMs: 50
  walFsyncBytes: 1048576

# In-memory write buffer
# - Max bytes in memtable before flush is needed
memtable:
  memtableMaxBytes: 33554432

# SSTable configuration
# - Index entry frequency (smaller = faster reads, larger = smaller files)
sstable:
  sstableIndexStride: 16

# Optional authentication.
# - If both username and password are set, clients must authenticate first.
# - If either is missing/empty, auth is disabled.
# - Client must send: AUTH "<username>" "<password>";
auth:
  # username: admin
  # password: change-me

Testing

Xeondb tests are pytest and are available via CTest (Ninja/CMake).

With Ninja/CMake:

ninja -C build test

Documentation

Docs can be found here. The documentation includes a quick start guide, deployment instructions, and detailed information about the database's features and configuration options.

Keyspace Quotas

XeonDB can enforce per-keyspace storage quotas by switching the server into a "read-only when over quota" mode.

Config (limits: section):

limits:
  quotaEnforcementEnabled: true
  quotaBytesUsedCacheTtlMs: 2000

Quota rows live in SYSTEM.KEYSPACE_QUOTAS (requires auth enabled). If a keyspace has no quota row (or quota_bytes <= 0), it is treated as unlimited.

Set a quota (example: 500MB):

INSERT INTO SYSTEM.KEYSPACE_QUOTAS (keyspace,quota_bytes,updated_at)
VALUES ("myks", 524288000, 0);

Update a quota (example: 1GB):

UPDATE SYSTEM.KEYSPACE_QUOTAS
SET quota_bytes=1073741824
WHERE keyspace="myks";

Remove a quota (unlimited):

DELETE FROM SYSTEM.KEYSPACE_QUOTAS
WHERE keyspace="myks";

When a keyspace is over quota, XeonDB rejects writes that increase storage (INSERT, UPDATE, CREATE TABLE, etc.) with quota_exceeded, but still allows reads and recovery operations (TRUNCATE, DROP).

Contributing

If you want to report a bug, suggest a feature, or contribute to the development of Xeondb, please feel free to open an issue or submit a pull request on our GitHub repository. We welcome contributions from the community and are always looking for ways to improve Xeondb.

References

About

Xeondb is a real-time big data database that is designed to be fast, efficient, and easy to use. It is built on top of a custom storage engine that is optimized for high performance and low latency.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors