Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.12 KB

003.md

File metadata and controls

36 lines (27 loc) · 1.12 KB

Language & framework

Status

Accepted

Context

  1. It has to be Kotlin/Java/Scala
  2. MVP developer has best experience in Kotlin
  3. Project is a small modular monolith
  4. Integration with a database and event bus will be needed
  5. API must be documented with Swagger

Decision

  1. Kotlin for a language
  2. Ktor for a framework
  3. Kotlin package as a module representation

Consequences

Pros

  • fast development in the beginning (Ktor is a simple framework, package structure is simple)
  • there are libraries for Ktor to integrate with most common databases and message brokers
  • full support for non-blocking asynchronous code (Kotlin coroutines)
  • Relatively good support for functional programming
  • Packages can be transformed into gradle modules in the future if needed
  • Ktor is a number one server-side framework for Kotlin
  • Ktor provides support application events (it can be used for in-memory event bus)

Cons

  • data duplication
  • Ktor lacks some out-of-the-box functionalities that Spring has (like Spring Data, Swagger integration)
  • Ktor is less popular than Spring
  • Kotlin is less popular than Java for server-side