lunardb

LunarDB Docs

Lunar DB | Home

A cache, memory, key-value store multimodel database.

What is it?

LunarDB is a Key-Value, Cache, Memory based database that loads keys and values in a file when saved by command, you can load this keys and values by the command "LOAD" then filename.

Why did I build this?

For years, developers have sought the ideal cache-based memory database. The journey began with Memcached, an early solution for in-memory caching designed to optimize application performance.

As time progressed, Redis emerged, offering not only in-memory caching but also persistence to disk. Redis quickly became popular due to its millisecond-level speed, making it a go-to database for applications needing fast response times.

However, recent changes to Redis's licensing model have sparked concerns in the developer community, especially around its limitations for commercial use. This shift has frustrated many, impacting both developers' workflows and the overall developer experience.

LunarDB addresses these challenges. I built LunarDB to provide a free, open-source, and user-friendly alternative that developers can rely on without licensing restrictions. LunarDB combines the speed and efficiency of a cache-based memory database with a commitment to being developer-friendly and adaptable to future needs.

In the future, LunarDB will also introduce a website and GUI manager for users across Windows, macOS, and Linux, making it accessible and easy to manage on any platform.

Examples:

Run the lunar.exe command by simply typing ./lunar in your terminal and you should see texts like this:

Welcome to Lunar! A Redis-like cache database!
___           ___  ___      ________       ________      ________
|\  \         |\  \|\  \    |\   ___  \    |\   __  \    |\   __  \
\ \  \        \ \  \\\  \   \ \  \\ \  \   \ \  \|\  \   \ \  \|\  \
 \ \  \        \ \  \\\  \   \ \  \\ \  \   \ \   __  \   \ \   _  _\
  \ \  \____    \ \  \\\  \   \ \  \\ \  \   \ \  \ \  \   \ \  \\  \|
   \ \_______\   \ \_______\   \ \__\\ \__\   \ \__\ \__\   \ \__\\ _\
    \|_______|    \|_______|    \|__| \|__|    \|__|\|__|    \|__|\|__|
Available commands:
SET key value [ttl] - Set a key-value pair with optional TTL in seconds
GET key - Get the value for a key
DEL key - Delete a key-value pair
MSET key1 value1 key2 value2 ... - Set multiple key-value pairs
MGET key1 key2 ... - Get multiple values
KEYS - List all keys
SWITCH - Switches to SCHEMAFULL, SCHEMALESS or SQL (Do not attempt to command this as it's broken)
CLEAR - Clear all key-value pairs
SIZE - Get the number of key-value pairs
CLEANUP - Remove expired entries
SAVE filename - Save the cache to a file
LOAD filename - Load the cache from a file
LPUSH key value - Push an element to the head of the list
LPOP key - Remove and return an element from the head of the list
RPUSH key value - Push an element to the tail of the list
RPOP key - Remove and return an element from the tail of the list
LRANGE key start stop - Get a range of elements from the list
LLEN key - Get the length of the list
QUIT - Exit the program
>

SET && GET Examples (including MSET & MGET):

> SET hello world!
OK
> GET hello world!
world!
> MSET hi bro whats good
OK
> MGET hi whats
bro
good
>

Features

LunarDB has current and upcoming features:

  1. Multi-model database support
  2. API support
  3. SDK supported
  4. Plug-in support
  5. Vscode Extension
  6. GUI manager
  7. SQL support
  8. GraphQL support
  9. Secure hashing
  10. Auth security

AGAIN: Most of this are in development and will be announced in the feature for upcoming release!

SDKs?

Yes! Well... That is still in development😅😅✌🏼

LICENSE

LunarDB is under the LICENSE of MIT.

On this page