Kotlin Ktor vs Go performance

Omkar Deshmukh
3 min readJul 20, 2018
“Two people in crash helmets on white motorcycles racing on a track under a blue sky” by Joe Neric on Unsplash

Introduction

Kotlin is hot new programming language from Jetbrains. It has gained a lot of support and love from developers since Google announced it as officially supported language for Android development.

Ktor is web application development framework built for kotlin.

Go is relatively old language developed at and by Google. It is always praised for it’s performance and widely used in distributed software programming. For example, Kubernetes, Docker are built on golang. Primarily Go do not need any web framework to be used as a server. It has http package which help you to start in server mode and handle requests.

Why this comparison

As I mentioned, go is praised for it’s performance as a server side language to build distributed software. Go lang has huge benefit in performance because of it’s implementation of asynchronous programming. Async programming is achieved in go with goroutines and channels. Goroutines are light weight threads that are managed by Go runtime. They do not map directly to os threads (as in java) and easy to create and maintain.

Kotlin also came up with it’s own implementation of lightweight threads called coroutine. They are very similar to go goroutines. Actually coroutines, as defined by jetbrains, are computations…

--

--