Jacob Schmidt 44f6b40e79
Some checks failed
Build / build (push) Failing after 1m1s
feat: Implement LLEN command to get list length
This commit introduces the LLEN command, which allows users to retrieve the length of a list stored in the database.

- Added `HandleLLengthCommand` function to `ListOperations.cs` to handle the LLEN command logic. This function retrieves the list associated with the given key and returns its length. If the key does not exist, it returns 0.
- Updated `Firefly.cs` to include the LLEN command in the command processing logic, mapping the "LLEN" command to the `HandleLLengthCommand` function.
2025-04-13 16:49:05 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00
2025-04-10 21:50:41 -05:00

Firefly Database

Firefly is a high-performance, Redis-compatible key-value store optimized for gaming applications. Built with native AOT compilation support for maximum performance.

Features

  • Redis-Compatible: Uses Redis Serialization Protocol (RESP) for compatibility with Redis clients
  • Concurrent Data Structures: Uses parallel data structures for high throughput and low latency
  • Sharded Architecture: Distributes data across multiple shards to reduce contention
  • Password Authentication: Optional password protection for secure deployments
  • Native AOT Support: Fully compatible with .NET Native AOT for maximum performance
  • Automatic Backups: Configurable backup system with rotation
  • Multi-Datatype Support: Strings, Lists and Hash Maps support

Quick Start

# Start server with default settings
firefly

# Start with password authentication
firefly --password yourSecretPassword

# Start with custom port
firefly --port 6380

Authentication

When starting Firefly with password protection, clients must authenticate:

AUTH yourSecretPassword

For more details on how to use authentication with different clients, see the USAGE.md file.

Building from Source

Prerequisites

  • .NET 9.0 SDK or later

Build Commands

# Standard build
dotnet build

# Release build
dotnet build -c Release

# Native AOT build (Windows x64)
dotnet publish -c Release -r win-x64 --self-contained -p:PublishAot=true

# Native AOT build (Linux x64)
dotnet publish -c Release -r linux-x64 --self-contained -p:PublishAot=true

Performance Benchmarks

The benchmark mode (--benchmark) runs a series of concurrent operations to test throughput:

firefly --benchmark

Typical results on modern hardware:

  • ~500,000 operations per second for simple key-value operations
  • ~250,000 operations per second for list operations
  • ~150,000 operations per second for hash map operations

License

MIT

See Also

Description
No description provided
Readme 54 MiB
2025-04-10 22:08:01 -05:00
Languages
C# 97.9%
Shell 1.1%
PowerShell 1%