Software

Inside Kafka: Enhancing Data Reliability Through Transactional Offsets with Karafka 1

Inside Kafka: Enhancing Data Reliability Through Transactional Offsets with Karafka

Karafka is a Ruby and Rails framework that simplifies the development of Apache Kafka-based applications. Among its varied features, the Filtering API provides enhanced control over the data flow. The crux of this article is about managing offsets – unique identifiers for messages within Kafka’s partitions. Often, there’s a need to manage offsets alongside database …

Inside Kafka: Enhancing Data Reliability Through Transactional Offsets with Karafka Read More »

Karafka framework 2.1 announcement 5

Karafka framework 2.1 announcement

I’m happy to announce that Karafka 2.1 has just been released. For those who wonder what Karafka is, Karafka is a Ruby and Rails multi-threaded efficient Kafka processing framework. The Karafka 2.1 release builds upon the foundation set by its predecessor, 2.0, making it a seamless continuation rather than a major rewrite. This means that …

Karafka framework 2.1 announcement Read More »

Delaying Kafka Messages Processing with Karafka: A Deep Dive into Delayed Topics 9

Delaying Kafka Messages Processing with Karafka: A Deep Dive into Delayed Topics

Kafka is a popular distributed streaming platform that is commonly used for building real-time data pipelines and streaming applications. One of the core features of Kafka is its ability to handle high-volume, real-time data streams and reliably process and distribute them to multiple consumers. However, in some cases, it may be necessary to postpone the …

Delaying Kafka Messages Processing with Karafka: A Deep Dive into Delayed Topics Read More »

Kafka topics as code – declarative Kafka topics management in Ruby 15

Kafka topics as code – declarative Kafka topics management in Ruby

Kafka topics are a fundamental concept in Apache Kafka. Topics are logical names or labels representing a stream of messages that Kafka clients can produce and consume. What makes them interesting is the variety of settings that can be applied to them. These settings, amongst others include: Partition count: The number of partitions that a …

Kafka topics as code – declarative Kafka topics management in Ruby Read More »

Karafka Web UI – Your Ruby and Rails out-of-the-box Kafka UI 17

Karafka Web UI – Your Ruby and Rails out-of-the-box Kafka UI

I’m thrilled to announce the new and shiny addition to the Karafka ecosystem: Karafka Web. For those who wonder what Karafka is, Karafka is a Ruby and Rails multi-threaded efficient Kafka processing framework. Karafka has always been a convenient framework, and I’ve abstracted or hidden many complexities related to working with Apache Kafka. However, the …

Karafka Web UI – Your Ruby and Rails out-of-the-box Kafka UI Read More »

Ruby concurrency is hard: how I became a Ruby on Rails contributor 20

Ruby concurrency is hard: how I became a Ruby on Rails contributor

For the past several weeks, I’ve been trying to fix a cranky spec in Karafka integrations suite, which in the end, lead me to become a Ruby on Rails micro-contributor and submitting similar fix to several other high-popularity projects from the Ruby ecosystem. Here’s my story of trying to make sense of my specs and …

Ruby concurrency is hard: how I became a Ruby on Rails contributor Read More »

RSpec story about disappearing classes 24

RSpec story about disappearing classes

ActiveSupport#descendants can be slow. In a bigger system with layers of descendants, finding all of them can be time-consuming: puts Benchmark.measure do 100.times { Dispatchers::Base.descendants } end # 5.235370 0.015754 5.251124 ( 5.251069) In the code I’ve been working on, it meant that a single lookup was taking around 50ms. That is a lot, especially …

RSpec story about disappearing classes Read More »

Reduce your method calls by 99.9% by replacing Thread#pass with Queue#pop 25

Reduce your method calls by 99.9% by replacing Thread#pass with Queue#pop

When doing multi-threaded work in Ruby, there are a couple of ways to control the execution flow within a given thread. In this article, I will be looking at Thread#pass and Queue#pop and how understanding each of them can help you drastically optimize your applications. Thread#pass – what it is and how does it work …

Reduce your method calls by 99.9% by replacing Thread#pass with Queue#pop Read More »

Controlling Elgato Key Light under Ubuntu with Ruby 36

Controlling Elgato Key Light under Ubuntu with Ruby

Recently I’ve acquired Elgato Key Light. It is a WiFi controllable LED lighting panel. The panel uses 160 LEDs to provide up to 2800 lumens of brightness and a color range of 2900-7000K. While you can control it from a mobile device, doing it directly from the shell makes the whole experience way more convenient. …

Controlling Elgato Key Light under Ubuntu with Ruby Read More »

Reading the uncompressed GZIP file size in Ruby without decompression 37

Reading the uncompressed GZIP file size in Ruby without decompression

There are cases where you have a compressed GZIP file for which you want to determine the uncompressed data size without having to extract it. For example, if you work with large text-based documents, you can either display their content directly in the browser or share it as a file upon request depending on the …

Reading the uncompressed GZIP file size in Ruby without decompression Read More »