Show HN: AllyDB – An in-memory database similar to Redis, built using Elixir (github.com)
I am currently working on AllyDB, which is basically my own Redis, which I am writing in Elixir.
Currently, the database is nowhere close to being ready, as you can see in the roadmap, but I am doing my best to add stuff as fast as possible.
Currently the implementation is very simple, with an in memory table, an append log persistence system, as well as an interval persistence system as a backup.
The database could definitely be optimized further, especially when it comes to persistence, which I am planning to do in the future.
I'm also planning to use Rust NIFs for specific tasks for the performance gains over Elixir and BEAM.
Writes and deletes are currently asynchronous, but I will add blocking versions of them soon.
I am trying to make the system as fault tolerant as possible, and currently everything except the TCP connections are fault tolerant.
I'm also working on a TypeScript client for the project, so yeah, that kind of sums it up.
Feel free to check the project and the roadmap out, and let me know what I could improve or give feature or optimization ideas!
Thanks, and have a nice one!
12 comments
[ 3.4 ms ] story [ 43.4 ms ] threadI am just handling the harder parts such as persistence by myself, to let the user only worry about writing features instead of reinventing the wheel.
- What are the reasons you picked Elixir?
- What are you motivations for this project?
- How does the append log persistence work?
- Do you plan on adding clustering support?
- How do you plan to make it fault tolerant?
Here is the link to the roadmap if anyone is interested - https://github.com/Allyedge/allydb#roadmap
- Just learning more about databases while building a Redis alternative.
- It appends operations, the same ones you write to the TCP client and when loading them, just runs those one by one. I will still add some optimizations for e.g. repetitive commands.
- I haven't thought much about it yet, feel free to start a discussion in the GitHub repository to further talk about that.
- Probably not crash the server but return more useful errors and use Elixir's OTP features.
Glad to hear that you liked the project!
Thank you for answering my questions, I wish you the best with the project
[0] - https://github.com/avinassh/go-caskdb
Your project looks very interesting as well.
My testing gave me really fast writes and deletes (since those are asynchronous), and reads were around 60 nanoseconds per read.
But it depends on the data type and I am planning to add more optimizations, especially with Rust NIFs anyways, so I will wait a bit before actually talking about the pure performance of the DB.
The name is like AlloyDB, yeah, but I use that "prefix" in most my projects so, not much I can do there, haha. :)
LFP