Welcome. I write about software engineering, systems, and whatever else I’m building.

Building a Distributed Sequence Generator with ZooKeeper and C#
1. Goal and Motivation This demo project explores how to assign unique, dynamic sequence numbers to multiple server instances in a distributed environment, inspired by challenges that surface when designing things like global ID generators (e.g., Twitter’s Snowflake). As described in the project’s README, the scenario began as a typical interview problem: how do you ensure each server instance receives (and keeps) a unique ID, especially if instances are started, stopped, or restarted? ...
Improving latency by 20x times!
I want to share my experience in improving our service latency and the steps I’ve taken to get there. As a result, the P75 Latency went down from more than 100 milliseconds to less than 5! By de-normalizing the SQL queries and creating one specific cache to fit our needs. Situation Our service is a read-heavy system, with a ratio of 99-1 reads over the writes Created in dotnet core, we use EF core as ORM (Object Relational Mapper), and our main DB is Postgres (relational DB) We used Redis for caching. But it was not a custom cache but yes a “general propose” one. We used a library that acted as a middleware between EF and the DB, named the Second-Level Cache. Very high latency (P75 ~ 140ms and P99 ~ 4s) with high peaks of more than 2 seconds! Frequent incidents! A lot of DB connections were created when the cache was cold, so reached the Postgres connection limit, and new pods were not created, even if existing ones were in a bad state. ...

Interpolate 2D Points Using Bezier Curves in WPF (and Javscript)
[Original Article] Sample on GitHub (WPF) Sample on Github (JavaScript) Live example in JavaScript (ReactJs) Introduction Interpolating points sometimes is hard mathematical work, even more, if the points are ordered. The solution is to create a function using the points and using an extra parameter t that represents the time dimension. This often is called a parametric representation of the curve. This article shows a simple way of interpolating a set of points using Bezier curves in WPF. ...

Tree-Extended, a tool to get custom directories trees
[Original Article] In this write, I want to show two ways to create custom directory trees by using the tree-extended tool: By using directly tree-extended in your SO command line by installing it as a node package. Or, by using the tree-extended vscode extension. Why tree-extended? I was documenting one of my projects and I wanted to write in markdown a directory tree representation, but I didn’t want to show all the directories but a particular one, the one that I was talking about in that section in the document. There is a command for Linux named tree that you can install, but it didn’t match all the requirements I was looking for. That is why I created tree-extended as a custom implementation of tree. ...

Build Your Personal Website for Free Using React.js
[Original Article] In this article, I want to show you how to create your personal website for free! To get that, we are going to use GitHub Pages which will allow us to host our website and even will give us a secure (HTTPS) URL. Optionally, we can even use our own domain name, in such case, it is the only thing that you will need to pay for. As the title says, we want to create the website using ReactJs. ...