Building a Reactive Oauth Client App with SpringBoot and Kotlin Coroutines

Photo by Buzz Andersen on Unsplash Background In this post, I’ll walk through two new exciting things that have happened in the spring ecosystem recently. First is spring webflux support for kotlin couroutines and second is the overhaul of spring security, and the addition of the out of the box oauth2 client support for social logins. For me one of the most impactful new features is the integration with spring coroutines throw the Flow primitive....

June 9, 2020 · 7 min · Me

Right Way To Shadow Jar When Using Jetty With Http4k

If you’ve been spring boot for a while, you’re probably familiar with Spring’s bootJar functionality that lets you create a new executable “fat jar” with all its dependencies pre defined. However, while I was building a kotlin app using http4k, which doesn’t come with any such built in tooling I had to resort to using the shadowJar plugin to build a fat jar. However post deploy, the app stopped starting up and I noticed the following error in the logs:...

April 18, 2020 · 2 min · Me

Brows3r - Pure Kotlin S3 Browser

Background Recently I found myself with some extra development time on hand. Now usually, most of my projects start off as big grand ideas and as soon as I start working on them, I lose steam or life comes in the way and things just sit their eating dust as a private github repo. However, I stumbled upon Kweb which is a server side rendered web app building library, but written entirely in Kotlin....

July 29, 2019 · 5 min · Me

Simple Oembed Service Using Http4k

Recently on my usual #githunt prowl I came across a new promising http library called http4k. The library is based on the philosophy of Application as Function based on the twitter paper Your Server as a Function and promises a lightweight a server toolkit alongwith a very modular approach to adding functionality on top of the core set of capabilities built in. But the best part of all, http4k is written in pure Kotlin and follows a consistent functional approach in handling http services....

March 18, 2019 · 5 min · Me

Post Boot Actions Using Application Events

Background Recently I faced an interesting problem at work. A production app written in Kotlin with Spring Webflux as the webframework had suddenly started taking more than 189 seconds on average to start (more than 3 minutes 😱). Now as much as I love spring for the easy to use and battle tested APIs, everyone knows its not the nimblest of frameworks around, but having a boot time of 3 minutes was simply unacceptable....

January 10, 2019 · 5 min · Me