Choose your weapon
Choose your weapon

This is the last in a series of three collaboratively written posts by Fabrício Rissetto, Matheus Caceres e Murilo Capanema. In case you haven’t read it already, here are parts 1 and 2.

Kotlin’s first service in production

After some PoCs with the language, first made on a weekend in the presence of some beer, we confirmed that this was a fascinating language and deserved a serious test.

It was then that we decided to extract a small, well-defined context from our monolith to a Kotlin microservice. This context, which dealt with automated credit policies, was well decoupled from the rest of the monolith, and had been written in Ruby, using Hanami. We took care when extracting it: taking this context out of the monolith wasn’t the only goal, we also wanted to evaluate Kotlin and its frameworks. To do this, we decided to migrate the code as faithfully as possible to its Ruby implementation, keeping the same classes, method names, and attributes. Of course, we had to add a few more things, such as interfaces, due to the switch from a dynamically typed to a statically typed language, but on the other hand things we would’ve needed to add weren’t there as well. …

Fabrício Rissetto

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