oliveiragahenrique

oliveiragahenrique

Klife Protocol - Kafka protocol library using message definitions

Klife Protocol

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

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 Post!

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.

Where Next?

Popular in Libraries Top

marcuslankenau
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to pa...
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
arkgil
Hi all! I’m happy to announce that Telemetry v0.3.0 is out! This release marks the conversion from Elixir to Erlang so that all the libr...
New
dbern
I’m excited to announce that TaxJar has developed and open-sourced DateTimeParser. We developed it because we found a need to parse user ...
New
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. [demo] The distributed characteristics of Elixir and the low memory foo...
New
Eiji
ExApi is a library that I’m developing now and hope release soon This library will allow to: list all apis list all api implementation...
New
mattludwigs
Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a me...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New

Sub Categories:

We're in Beta

About us Mission Statement