[>] Rewrite it in... Rust?
When it's already written in Rust, what do you do when you have the urge to rewrite everything again?
Making KRaft more maintainable has been something on my ToDo list for way too long now. This update is therefore a bit of a major one as it is a huge step for the project itself. From a certain point of view, this is a "refreshed" and cleaner version of the previous KRaft.
Features and Changes
KRaft has been rewritten, which you can probably guess from the title and introduction. The previous version of KRaft was intended to have microservices so I could easily bolt on functionality in the future, and give me some extra flexibility. This extra flexibility never materialised, which is possibly the consequence of me not being that experienced with designing microservices. Adding on features quickly became a bit of a chore, and utility functions to abstract away the mess became longer than the core KRaft logic.
The first version of KRaft split logic into a cluster manager, authentication, and resource manager service. Of course, more complex features arrived later down the line, with workspaces being a recent addition, and the split services made it harder to integrate them.
Now, I have completely merged all those three "microservices" into kraft-core, which has much tidier code, better organisation of files, and a much "cleaner" development approach. Despite combining these three services, kraft-core is still incredibly lightweight at 30MB RAM usage on average. Additionally, by removing the original resource-manager Python service, which itself consumed 300MB, KRaft is now lighter than ever!
Future Work
I am quite enjoying the shorter updates! That's basically it for this one, and I am so relieved to have the rewrite out of the way, and I can focus on adding more features in the future.