Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building asynchronous API with Ktor & Kotlin

Building asynchronous API with Ktor & Kotlin

This was a slide that I use at #devfest Makurdi 2021, where I covered in practice the creation of an asynchronous API in a straightforward way, using Kotlin and Ktor.

Manuel Ernesto

December 04, 2021
Tweet

More Decks by Manuel Ernesto

Other Decks in Programming

Transcript

  1. Building
    asynchronous API
    with Ktor & Kotlin
    Manuel Ernesto
    Software Engineer, BMA

    View full-size slide

  2. Ktor
    Lightweight and flexible framework built from scratch using Kotlin and
    Coroutine, which allows us to easily build asynchronous client and server
    applications.

    View full-size slide

  3. Ktor
    Lightweight and flexible framework built from scratch using Kotlin
    and Coroutine, which allows us to easily build asynchronous client and server
    applications.

    View full-size slide

  4. Ktor
    Lightweight and flexible framework built from scratch using
    Kotlin and Coroutine,
    which allows us to easily build asynchronous client and server applications.

    View full-size slide

  5. Ktor
    Lightweight and flexible framework built from scratch using Kotlin and
    Coroutine,
    which allows us to easily build asynchronous client and server applications.

    View full-size slide

  6. Ktor
    Lightweight and flexible framework built from scratch using Kotlin and Coroutine,
    which allows us to easily build asynchronous
    client and server
    applications.

    View full-size slide

  7. Application
    Ktor

    View full-size slide

  8. Application
    Tomcat
    Ktor

    View full-size slide

  9. Application
    Tomcat
    Jetty
    Ktor

    View full-size slide

  10. Application
    Tomcat
    Jetty
    Netty (default)
    Ktor

    View full-size slide

  11. Application
    Tomcat Routing
    Jetty
    Netty (default)
    Ktor

    View full-size slide

  12. Application
    Tomcat Routing
    Serialization
    Jetty
    Netty (default)
    Ktor

    View full-size slide

  13. Application
    Tomcat Routing
    Serialization
    Authentication
    Jetty
    Netty (default)
    Ktor

    View full-size slide

  14. Application
    Tomcat Routing
    Serialization
    Authentication
    Jetty
    Netty (default)
    Ktor
    Exposed

    View full-size slide

  15. Tools
    ● intellij idea

    View full-size slide

  16. ● intellij idea https://start.ktor.io
    Setup

    View full-size slide

  17. ● intellij idea https://start.ktor.io
    Setup

    View full-size slide

  18. Resources
    1. https://ktor.io
    2. https://kotlinlang.org
    3. https://github.com/manuelernesto/ktor-movie-demo
    4. https://youtube.com/manuelernesto

    View full-size slide

  19. Thanks 󰚢
    Manuel Ernesto
    @manuelernest0

    View full-size slide