Unique id generation in distributed systems

Recently at work, We were looking for a way to generate unique IDs across a distributed system that could also be used as the primary keys in the MySQL tables.

We knew in a single MySQL database we can simply use an auto-increment ID as the primary key, But this…

Nano Id — By Apoorv Tyagi


In every software system, we need unique Ids to distinguish between several objects from one another.

Recently, I wrote about the unique Id generation for a large-scale distributed environment. In that article, we touched a little on UUIDs.

In this blog post, I will share an alternative to UUIDs that…

Code should be written in such a way that is self-explanatory, easy to understand, and easy to modify or extend for new features. Because code is read more than it is written, that’s why so much emphasis is given to clean code.

The more readable our source code is:

  • The…


In this article, you will learn how to use Spring Boot and HarperDB to create a microservice. Later on, you will also look at how to deploy the complete application on AWS Elastic Beanstalk.

You will be building an Employee Leave Management System. This application will be responsible for tracking…

myth busting mathematics

Sum of all positive integers

What is 1+2? Ah, who doesn’t know, it’s 3. What is 1+2+3? Well, it’s 6. (easy peasy lemon squeezy)

Now, what if I asked you to count the sum of all positive integers which is: 1+2+3+4…to infinity?

That’s it. This is the crux of this blog post.

Wait a minute…

In this article, I’ll share 10 JavaScript tips, tricks, and best practices that I follow and have found useful.

1. Use Numeric Separators

This is one of the most used operators when I have to deal with large numbers. …

❓ Did you know you can’t name a file “Con” in Windows

If you’re running a Windows machine, try it right now. Go to File Explorer -> create a new folder -> name it “Con”

Did it work? Now try with “PRN”, “AUX” or “NUL”. What did you get?


The Trojan — Nullish Coalescing Operator

In this article, we will see what’s the difference between a Nullish Coalescing Operator (??) and a Logical OR (||)

But before going further, let us refresh ourselves with one very common concept in Javascript which is, what are the truthy/falsy values.

In JavaScript, there are 6 values that are…

Most Famous Interview Question

What is the most famous interview question?

FizzBuzz is the most popular coding problem, and perhaps also one of the easiest.

For those of you who don’t know, here’s the problem statement :

Write a short program that prints each number from 1 to 100 on a new line. For each multiple of 3, print “Fizz” instead…

Non Fungible Tokens

Recently, Digital collectibles have exploded in popularity because of NFTs. You’ve probably seen people in your social media feeds talking about NFTs too.

The growing market for NFT is turning the art, music, gaming, and finance industries upside down.

NFTs can be confusing to understand for someone who is hearing…

Apoorv Tyagi

Fledgling software developer. Java | Spring | Node.js | SQL | Docker | Kubernetes | Elastic Stack.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store