Skip to content

Releases: chromodb/chromodb

v0.9.4

09 Feb 04:05
Compare
Choose a tag to compare

ChromoDB v0.9.4

✅ More benchmark tests, this time for long keys and values
✅ Correction on placement of closing all active client connections when networked. Also added bench mark testing for large keys and values.
✅ Better graceful shutdown logic. We now don't wait for connections if networked.
✅ Update read me to contain keys space limitation. Keys cannot have spaces they must be like so key-name key_name

v0.9.3

09 Feb 03:35
Compare
Choose a tag to compare

ChromoDB v0.9.3

✅ More benchmark tests
✅ Better graceful shutdown logic if ChromoDB is networked. We keep a map of connections at hand so we can clean up properly also closing all connections so we don't wait.

v0.9.2

09 Feb 02:56
Compare
Choose a tag to compare

ChromoDB v0.9.2

✅ Clean up
✅ Benchmarks and consistency tests
✅ Read me corrections

v0.9.1

09 Feb 01:14
987e5d9
Compare
Choose a tag to compare

ChromoDB v0.9.1

✅ Correct conversion of name from prior patch in system.go
✅ Pass all datastructure and system tests.
✅ Update and test bundler

Screenshot from 2024-02-08 20-13-40
Screenshot from 2024-02-08 20-13-53
Screenshot from 2024-02-08 20-14-00

v0.9.0

08 Feb 23:48
008119e
Compare
Choose a tag to compare

ChromoDB v0.9.0

✅ Fractal wasn't a good name we renamed the main database structure to DataStructure.
✅ Clean up
✅ Read me updated

v0.8.0

24 Jan 22:09
Compare
Choose a tag to compare

ChromoDB v0.8.0

✅ DISK command, Delete() corrections, main() cleanup.

v0.7.0

23 Jan 23:17
Compare
Choose a tag to compare

ChromoDB v0.7.0

✅ Concurrency and transaction control

v0.6.0

23 Jan 22:47
Compare
Choose a tag to compare

ChromoDB v0.6.0

✅ Authentication implementation using BASIC/PLAIN auth like so:


./chromodb --shell=false --user=alex --pass=somepass

Now from client side
Base64 encode alex\0somepass > YWxleFwwc29tZXBhc3M=

If you enter it wrong:

YWxleFxcMHBvb3A=
Invalid authentication. Bye!

If correct

YWxleFwwcG9vcA==
mem
Current memory usage: 285192 bytes

v0.5.0

23 Jan 21:50
Compare
Choose a tag to compare

ChromoDB v0.5.0

Initial implementation of ChromoDB! 🚀

ChromoDB is a simple key-value store implemented using a Fractal Tree-like data structure. It provides basic operations like inserting, updating, retrieving, and deleting key-value pairs. The database is designed to efficiently handle read and write operations with low latency.

If using networked configuration the default port is 7676 on TCP OR TLS can be changed with --port flag.

Structure

The database implementation is organized into a many Go packages with the following main components:

  • FractalTree The central struct representing the database. It includes fields for data and index file handles, as well as the next available offset for storing new data records.

  • OpenFractalTree A function to open or create a new FractalTree instance. It takes the filenames for the data and index files and returns a FractalTree object.

  • Close A method to close the FractalTree database, ensuring proper cleanup and closing of file handles.

  • Put A method to insert or update a key-value pair in the database.

  • Get A method to retrieve the value associated with a given key.

  • Update A method to update the value associated with a given key.

  • Delete A method to delete a key-value pair from the database.

File Storage

The database stores its data in two separate files:

  • Data File: Contains the actual key-value pairs and their associated metadata.
  • Index File: Maintains an index of keys along with their corresponding offsets in the data file.

Key-Value Storage Format

The key-value pairs are stored in the data file using the following format:

  • Key Length: 4 bytes (uint32) - Length of the key in bytes.
  • Value Length: 4 bytes (uint32) - Length of the value in bytes.
  • Key: Variable-length byte array - The actual key data.
  • Value: Variable-length byte array - The actual value data.
  • Offset: 8 bytes (int64) - Offset of the next record in the data file.

Fractal Tree Data Structure

The Fractal Tree is used to efficiently organize and access key-value pairs. It allows for fast lookup, insertion, and deletion operations with a balanced structure, ensuring a predictable and optimal performance.

Query Parser

Additionally, a queryparser package is provided to interact with the database using simple queries. The QueryParser function accepts a query in the form of a byte slice and performs the corresponding database operation based on the query type (PUT, GET, DEL, MEM).