From 61ce4e7b21c855f99322a56e389be76b6d65c7ba Mon Sep 17 00:00:00 2001 From: biondizzle Date: Sun, 15 Feb 2026 11:57:59 -0500 Subject: [PATCH] rmake sure people know this is meant to be production capable --- ARCHITECTURE.md | 20 ++++++++++---------- QUICKSTART.md | 21 ++++----------------- README.md | 10 +++------- TODO.md | 7 ++++++- 4 files changed, 23 insertions(+), 35 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 1f80254..f775b33 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -20,7 +20,7 @@ JormunDB is a DynamoDB-compatible database server that speaks the DynamoDB wire 1. **Zero allocation ceremony** - No explicit `defer free()` or error handling for every allocation 2. **Binary storage** - Efficient TLV encoding instead of JSON -3. **API compatibility** - Drop-in replacement for DynamoDB Local +3. **API compatibility** - Drop-in replacement for DynamoDB 4. **Performance** - RocksDB-backed with efficient key encoding ## Why Odin? @@ -32,13 +32,13 @@ The original implementation in Zig suffered from explicit allocator threading: fn handleRequest(allocator: std.mem.Allocator, request: []const u8) !Response { const parsed = try parseJson(allocator, request); defer parsed.deinit(allocator); - + const item = try storage.getItem(allocator, parsed.table_name, parsed.key); defer if (item) |i| freeItem(allocator, i); - + const response = try serializeResponse(allocator, item); defer allocator.free(response); - + return response; // Wait, we deferred the free! } ``` @@ -52,7 +52,7 @@ handle_request :: proc(request: []byte) -> Response { parsed := parse_json(request) item := storage_get_item(parsed.table_name, parsed.key) response := serialize_response(item) - + return response // Everything freed when arena is destroyed } @@ -72,15 +72,15 @@ handle_connection :: proc(conn: net.TCP_Socket) { arena: mem.Arena mem.arena_init(&arena, make([]byte, mem.Megabyte * 4)) defer mem.arena_destroy(&arena) - + // Set context allocator context.allocator = mem.arena_allocator(&arena) - + // All downstream code uses context.allocator request := parse_http_request(conn) // uses arena response := handle_request(request) // uses arena send_response(conn, response) // uses arena - + // Arena is freed here - everything cleaned up automatically } ``` @@ -162,7 +162,7 @@ Encoded as: [0x01] // type tag (String) [0x07] // value length (7) user123 // value bytes - + [0x03] // name length (3) age // name bytes [0x02] // type tag (Number) @@ -382,7 +382,7 @@ when ODIN_DEBUG { track: mem.Tracking_Allocator mem.tracking_allocator_init(&track, context.allocator) context.allocator = mem.tracking_allocator(&track) - + defer { for _, leak in track.allocation_map { fmt.printfln("Leaked %d bytes at %p", leak.size, leak.location) diff --git a/QUICKSTART.md b/QUICKSTART.md index 05fc433..a15bc50 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -170,10 +170,10 @@ sudo apt install awscli aws --version ``` -### Configure AWS CLI (for local use) +### Configure AWS CLI ```bash -# Set dummy credentials (required but not checked by JormunDB) +# Set dummy credentials (required but not checked by JormunDB yet) aws configure # AWS Access Key ID: dummy # AWS Secret Access Key: dummy @@ -407,13 +407,10 @@ brew upgrade odin # macOS - Read [ARCHITECTURE.md](ARCHITECTURE.md) for internals - Check [TODO.md](TODO.md) for implementation status - Browse source code in `dynamodb/`, `rocksdb/`, etc. -- Contribute! See [CONTRIBUTING.md](CONTRIBUTING.md) ## Getting Help -- **Issues**: https://github.com/yourusername/jormundb/issues -- **Discussions**: https://github.com/yourusername/jormundb/discussions -- **Odin Discord**: https://discord.gg/sVBPHEv +There is absolutely no support at this time ## Benchmarking @@ -431,11 +428,7 @@ ab -n 10000 -c 100 -p item.json -T application/json \ ## Production Deployment -JormunDB is designed for **local development only**. For production, use: - -- AWS DynamoDB (managed service) -- DynamoDB Accelerator (DAX) -- ScyllaDB (DynamoDB-compatible) +JormunDB is not ready for production use just yet. But there will be easy package installs, as well as a container and a helm chart ## Uninstalling @@ -449,9 +442,3 @@ make uninstall # Remove data directory rm -rf ./data ``` - ---- - -**Happy coding! 🚀** - -For questions or issues, please open a GitHub issue or join our Discord. diff --git a/README.md b/README.md index 758b3b6..1d41bf5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A high-performance, DynamoDB-compatible database server written in Odin, backed ## What is JormunDB? -JormunDB (formerly ZynamoDB) is a local DynamoDB replacement that speaks the DynamoDB wire protocol. Point your AWS SDK or CLI at it and use it as a drop-in development database. +JormunDB (formerly ZynamoDB) is a Self-Hosted DynamoDB replacement that speaks the DynamoDB wire protocol. Point your AWS SDK or CLI at it and use it as a drop-in replacement. **Why Odin?** The original Zig implementation suffered from explicit allocator threading—every function taking an `allocator` parameter, every allocation needing `errdefer` cleanup. Odin's implicit context allocator system eliminates this ceremony: one `context.allocator = arena_allocator` at the request handler entry and everything downstream just works. @@ -292,13 +292,9 @@ Ensure you're using the correct DynamoDB JSON format: } ``` -## License - -MIT License - see LICENSE file for details. - ## Credits -- Inspired by DynamoDB Local +- Inspired by DynamoDB - Built with [Odin](https://odin-lang.org/) - Powered by [RocksDB](https://rocksdb.org/) - Originally implemented as ZynamoDB in Zig @@ -314,4 +310,4 @@ Contributions welcome! Please: --- -**Why "Jormun"?** Jörmungandr, the World Serpent from Norse mythology—a fitting name for something that wraps around your data. Also, it sounds cool. +**Why "Jormun"?** Jörmungandr, the World Serpent from Norse mythology—a fitting name for something built in a language called Odin. Also, it sounds cool. diff --git a/TODO.md b/TODO.md index 2c2e423..1d342e1 100644 --- a/TODO.md +++ b/TODO.md @@ -69,7 +69,12 @@ This tracks the rewrite from Zig to Odin and remaining features. - ADD operations - DELETE operations -### Replication Support (Priority 4) +### Credential Support (Priority 4) + + - [ ] **Support a way to configure AWS compatible credentials.** + - This is very important because remember when mongo didn't come with a root password by default and everyone who had the port open to the world got their DB ransomed? Yeah, we don't want that to happen + +### Replication Support (Priority 5) - [ ] **Build C++ Shim in order to use RocksDB's WAL replication helpers** - [ ] **Add configurator to set instance as a master or slave node and point to proper Target and Destination IPs**