Idempotency in Your API

Introduction Idempotency is a crucial property in the world of APIs, ensuring that operations can be applied multiple times without changing the result. In this post, we’ll explore six effective strategies to achieve idempotency in your API, drawing inspiration from real-world examples and distributed systems principles. Idempotency Explained The light switch analogy is often used to explain idempotence. Consider a light switch in a room. The operation of turning the light switch on or off is idempotent....

November 11, 2023 · 4 min · Denis Nutiu

Windows Task Scheduler - Quick Start

Introduction Hello everyone 👋, This is a quick post about the windows task scheduler, if you’re a Software Developer using Windows the task scheduler is a great tool to automate tasks. I see it as a combination of cron and systemd (if you’re a Linux user you know what I’m talking about). For my personal use case, I use the task scheduler to download more images from the internet to improve a machine learning model used to classify images....

November 11, 2023 · 3 min · Denis Nutiu

CAP Theorem

The CAP theorem, also known as Brewer’s theorem, is a concept in distributed computing that states that it is impossible for a distributed system to simultaneously provide all three of the following guarantees: Consistency: All nodes in the system see the same data at the same time. Availability: Every request made to the system receives a response, without guarantee that it contains the most recent version of the data. Partition tolerance: The system continues to function despite arbitrary message loss or failure of part of the system....

May 9, 2023 · 2 min · Denis Nutiu, ChatGPT

Apache Cassandra Compaction

Introduction Apache Cassandra is a highly scalable and distributed NoSQL database that is designed to handle large volumes of data across multiple commodity servers. One of the key features of Cassandra is its ability to automatically manage data distribution, replication, and consistency across a cluster of nodes, providing high availability and fault tolerance. One important aspect of managing data in Cassandra is compaction. Compaction is the process of merging and removing unnecessary data from SSTables, which are the on-disk storage structures used by Cassandra....

April 13, 2023 · 6 min · Denis Nutiu, ChatGPT

Getting Started with pdoc3 for Python

Hello everyone! 👋 In this article we’ll talk about documentation and how to document a Python project with pdoc. Documentation is an essential part of writing high-quality Python code. Not only does it make your code easier to understand, but it also makes it more maintainable and reusable. In this post, we’ll explore how to use pdoc to generate documentation for your Python code. pdoc is a powerful tool that can automatically generate documentation for your Python modules and classes based on their docstrings....

April 13, 2023 · 4 min · Denis Nuțiu

Working with Volumes in Microk8s

Introduction Hello 👋, In this quick tutorial 💻 we’ll explore how to use Volumes and PersistentVolumes with hostpath storage in Microk8s. We will deploy a simple nginx instance and mount a volume inside it that points to the ~/Downloads folder. Let’s get started! Note: The following image was generated with Stable Diffusion How-To You can follow along if you want to setup a quick deployment with a host path volume....

April 13, 2023 · 2 min · Denis Nuțiu

Python Singleton Pattern implementation with LRU

Hello and happy new year! 🥳🙌 I’ve made a video on how to implement the singleton pattern in Python using the LRU cache. Thank you!

January 7, 2023 · 1 min · Denis Nuțiu

envsubst – Substitute Variables for Environment Variables

Hi 👋, Introduction In this short article I want to showcase a nice and useful Linux command. The comand 🥁 envsubst 🥁. In short it Substitutes the values of environment variables. It’s great for populating configuration files with values from environment variables, a common operation for developers containerizing their applications. Example Usecase Let’s say we are containerizing an application and we have the following file configuration.yaml, and we want to modify the values of the environment field and the log_level field without adding the additional complexity of mounting the configuration....

October 23, 2022 · 2 min · Denis Nuțiu

Kafka Connect MongoDB Sink Connector

Hello 👋, In this article we’re going to build a data pipeline that connects Kafka to MongoDB. In short, we’re going to add a MongoDB Sink connector to a Kafka Connect cluster and run a MongoDB instance in Docker to test the connector. By reading this article I hope that you will learn How to install the MongoDB connector in Kafka Connect How to configure the MongoDB connector How to create topics in Kafka using Confluent Tools How to monitor Kafka Connect using JConsole....

September 19, 2021 · 6 min · Denis Nuțiu

Sharding MongoDB using Range strategy

Hi 👋👋 In this article I will explore the topic of sharding a Mongo Database that runs on Kubernetes. Before we get started, if you want to follow along, please install the tools listed in the prerequisites section, and if you want to learn more about sharding, check out this fantastic article Sharding Pattern. Prerequisites Kubernetes Cluster & kubectl mongosh helm Introduction Let’s install a MongoDB instance on the Kubernetes cluster using helm....

August 8, 2021 · 7 min · Denis Nuțiu