Software bench-marking is extremely tough but it is something I really enjoy doing. Whether that is running apache bench on HTTP servers, running redis-benchmark, or pgbench — it is always interesting seeing how various tweaks impact performance.

Two of my go to languages for building anything are Kotlin and Golang. In those, two of my go to libraries to build HTTP services are Vert.x and Echo respectively. It was natural instinct to see how they perform when put under a stress test.

The internet is filled with comments around the JVM being slower compared to native code — It is…


One of the few issues I find myself facing with being a Kotlin developer and advocate is that it is mainly used for Android development. When you search for anything regarding it — the results are almost always in the context of Android. Search for ‘Kotlin coroutines stack overflow’ and the first result is regarding its usage in Android.

To promote more backend development in Kotlin — I want to share some libraries and frameworks that I typically employ for building APIs. The three pillars I will cover are caching, interacting with a SQL Database, and the HTTP server itself.

HTTP Server

Background context

Both Kotlin and go have the concept of Coroutines [or goroutines]. While Kotlin’s coroutines are primarily used to provide a convenience layer over callback/futures based APIs and interfaces, goroutines are mainly there to allow for simplified concurrency. Interestingly enough they are implemented slightly differently as well. You can read more around the differences in this stack-overflow answer here by Roman Elizarov who is the team lead at Jetbrains for Kotlin coroutines.

It is a common task for developers to have to fetch multiple things from a backend or 3rd party service and join it together before sending the response back…

Non-blocking vs parallel

Recently read an article here on HashNode on async/await v/s withContext, which you can check out here: .

I wanted to share what I commented on the post itself. It can be confusing to devs who are just getting into coroutines and may end up using it incorrectly.

Coroutines are syntactic sugar to write non blocking code in a sequential looking fashion. They are akin to callbacks or futures/promises. That is first and foremost. The ability to schedule multiple things in parallel is a secondary benefit.

Use async/launch when you want to do work in true ‘parallel’ — async…

I recently picked up a Raspberry Pi 4 [4GB edition].

Background Context

I had been debating picking up a Linux system for some dev work. I don’t like using Docker right from the get go as a dev environment. My general workflow for any project goes in the following steps — for a Kotlin project

  1. Run from IDE
  2. Run from terminal via build tool such as maven or bazel
  3. Compile to a fat jar and run using java -jar <project>.jar
  4. Run fat jar on a Linux server [now possible]
  5. Run as a docker container
  6. Run as a Kubernetes deployment

I know many…

Almost every week I read online about how FaaS [Functions as a Service] or serverless is the future of cloud computing. The premise is simple — you write some piece of code and add a trigger point to it — and everything else such as deployment, metrics, scaling etc are all taken care of. I generally would avoid it for anything more than submitting forms from a frontend [probably why Node.js is almost always supported] or basic REST middleware anything more involved than that is pushing it.

Things like Lambdas or Cloud functions are great for what they are but…

For the final project of my parallel programming course this semester in grad school, I chose to implement a DynmoDB clone in C using OpenMP and MPI. Dynamo uses a partitioning strategy where the data is spread across multiple nodes. It hashes the key to determine, which server to store the item on i.e. consistent hashing.

Consistent hashing is a powerful technique that is useful to keep in mind when architecting large scale distributed systems. Let’s look at the three levels of this technique.

Level 1: Hash + Modulo

The first level of consistent hashing is to hash your item key with a fast well-distributed…

Haven’t seen these in a while

With Covid-19 keeping everyone inside, hopefully, I was thinking of web apps that are a bit more collaborative in nature. General directions I was thinking of taking involved making something similar to a friend group quiz application like Kahoot, or a Google docs style editor but for your GitHub repos, or a jukebox where all clients are listening to the same audio at roughly the same position. By the title of this post, it’s probably obvious which one I went with.

We’ll be looking at the server-side code for this, which is written in Kotlin and Vert.x.

The application can…

Asad Awadia

Tech. Finance. Life. curl

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