oliveiragahenrique

oliveiragahenrique

Klife Protocol

link: GitHub - oliveigah/klife_protocol: Elixir implementation of the kafka protocol · GitHub

I’m thrilled to share that I’ve just completed the initial version of the docs for Klife Protocol. While it’s still early days, I believe the available features could be useful for someone building something with Kafka, so I wanted to share it here with the community.

Klife Protocol already supports all messages and versions currently available with solid performance for most use cases.

My hope is to release a version of Klife Protocol on Hex soon, and I’d love to hear any feedback or suggestions that the community may have. Thanks for your interest. :smile:

What is the library about?

Klife Protocol is a library that simplifies the serialization work required for communication with Kafka brokers. It’s important to note that Klife Protocol is not a full Kafka client and is not intended to be used directly in application code. Instead, it’s meant to be used as a component inside a full Kafka client.

Motivation of the library

The motivation behind Klife Protocol was to gain a deeper understanding of Kafka and its inner workings. About a year ago, I decided to explore Kafka and the best way to do that was to build my own client.

However, as development progressed and complexity emerged, I decided to implement the protocol first, as it would provide a better understanding under the hood.

Implementing the protocol also allowed me to use some features, such as tagged fields and compact serialization, which as far as I can tell are not available in other Kafka serialization libraries for the BEAM. This implementation of the protocol will evolve over time, and I plan to use it in a future Kafka client called Klife.

Additionally, the separation of the client and protocol provides benefits to other clients that may want to use this implementation of the Kafka protocol independently.

Motivation of this post

I’m posting this here in order to gather any feedback of anyone that may be intereseted in this problem (that is not only about kafka).

Throughout the development process, various challenges have arisen, and I have done my best to overcome them. However, I am aware that there is always room for improvement, and I believe that feedback from the community can greatly assist in this regard. Some areas I would like to highlight:

  • Binary manipulation performance
  • API ergonomy and design
  • Documentation
  • Open source in general

I am open to feedback on any aspect of the project, and I mentioned those areas because they have been the most challenging for me recently, and that’s why they are fresh in my mind.

Closing thoughts

Thank you for taking the time to read through this. I hope that this library can be of use to the community in some way. I am eager to hear any feedback you may have. :purple_heart:

First 4 of 4 Posts Switch mode

jakeprem

jakeprem

Very cool! It’s been several years since I worked with Kafka but I recall running into some difficulties with the Elixir libraries available at the time.

oliveiragahenrique

oliveiragahenrique OP

Thanks Jake!

If you don’t mind (and remember :sweat_smile:) to share what were those difficulties. So I can keep them in mind while working on the client, and see if I can address them in some way.

oliveiragahenrique

oliveiragahenrique OP

Package first release klife_protocol | Hex

Including some revamp on the docs and bug fixes!

oliveiragahenrique

oliveiragahenrique OP

The first part of the client that is built using this library is out! More details here:

— All posts loaded —

Where Next? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

Other Trending Topics Top

juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New

We're in Beta

About us Mission Statement