My Kotlin AWS Journey

My Kotlin AWS Journey

In late 2018, I realized that I had been in computer field for over 20 years, and was becoming the grumpy old developer defending my old ways. I decided to get back to my roots and rediscover my excitement for new technologies.

With the help of my wife, I jumped at an opportunity to take a few months off work to explore some new technologies, or shall I say new to me. As part of this journey, I want to share my experiences and provide documentation on how to reproduce what I am doing, so you can follow along.

AWS, Docker and Kotlin

A few months isn’t a lot of time, so I’m going to focus on Microservices on Docker and AWS. There are a lot of benefits to microservices: 5 Major Benefits of Microservice Architecture, and with all the major players jumping onboard, I figured this the best place to spend my time. Docker seems to be the standard for microservices because of these benefits: Top 10 Benefits of Using Docker. AWS is the leading cloud provider, which makes it the logical choice. Plus their Free Tier will help keep down the cost.

But I don’t just want to focus on cloud architecture, I want to also explore application architecture around functional style programming and non-blocking services. Kotlin and Ktor both provide some exciting new features in this space, and will be a part of the journey.

Kotlin the language itself provides these interesting features: Switch to Kotlin. But the real reason I\'m exploring Kotlin are the Coroutines: Kotlin Corountines Guide. Ktor provides a webframework built on top of Coroutines.

Open Source Project

As part of this journey, I will be creating skeleton projects and code to demonstrate what I learn, which will provide a foundation to build complete applications. I’m releasing this code as open source, and encourage people to help make improvements.

As a note, I’m approaching these projects and the journey as if they were a startup. This means that I want to make sure that I focus on results that work rather than perfection. I will be making choices to cut features and my make suboptimal decisions to make sure I produce something.

If all goes well, I will make improvements as the project progress. Most of the time these will be future blog iterations, but occasionally the improvement will be small and I will just make updates on previous blogs. You can check for updates on the table contents found here: My Kotlin AWS Journey

You can find the GitHub repository here: reladev/kotlinaws

The Goal

At the end of this journey, I want to have a complete production-ready architecture that can handle multiple environments (dev, staging, prod, etc.). I don’t know what the final product will look like, but it should have these features:

  • Non-blocking REST API (Ktor)
  • Configuration across environments (Parameter Store)
  • DataStore capabilities (RDS)
  • Authentication across services (Cognito/JWT)
  • Continuous Deployment to development environment (Pipeline)
  • Autoscaling of Services and Clusters
  • Service Discovery for inter-service for REST APIs
  • Asynchronous inter-service APIs (SQS)

As a stretch goal, I will attempt to get these features:

  • Production Release and Rollback processes
  • Authorization

With any project of this size, there will be lots of unknowns that could change the direction of the project, which might change the list of features. I will do my best to describe when these shifts happen and why.

Getting Started

I think we have had enough of an introduction, and I feel we should jump into some code.

The next step will be creating a simple helloworld API that is deployed on ECS.

Comments are closed.