Skip to content

Building a Server with Ktor & Exposed

Training certified by

  • Kotlin
  • Server
  • Intermediate
  • 2d

Learn to build robust, maintainable Kotlin servers: secure, tested, and observable HTTP APIs with Ktor, backed by typed, performant, and scalable data access thanks to Exposed.

Course
Overview

Program
Objectives

  1. Set up a Ktor server and structure its code with the plugin model.


  2. Secure an HTTP API with authentication, JSON Web Tokens, and sessions.


  3. Test and monitor a Ktor server with OpenTelemetry.


  4. Model, query, and evolve a database with Exposed, using either the DSL or DAOs.


  5. Choose the right data access approach: DSL or DAO, JDBC or R2DBC.


  6. Master Exposed's transaction model and write complex queries, including joins.


Prerequisites

Program

D1

Ktor: building an HTTP server

Morning

Setting up a Ktor server

engines, configuration, and lifecycle

The plugin model

install, configure, and write your own plugins

Call routing

by path and by HTTP method

Serving raw or serialized content

content negotiation and kotlinx.serialization

Call authentication

providers and route protection

Afternoon

JSON Web Tokens

generation and renewal

Session management

cookies, headers, and storage

Static or generated content

files, resources, and templates

Server tests

verify behavior end to end

Monitoring with OpenTelemetry

traces and metrics

D2

Exposed: accessing databases

Morning

DSL or DAO

choose the right level of abstraction

JDBC or R2DBC

blocking or reactive access

Tables & relations

declare your data model

Indexes

declare and optimize indexes

CRUD operations

with the DSL or DAOs

Afternoon

Queries

query with the DSL or DAOs

The transaction model

understand and master transactions

Joins

join tables and queries

Complex queries

write custom queries

Migrations

evolve your schemas

Details

  • Format

    In-company

  • Duration

    2 days (14 hrs)

  • Level

    Intermediate

Contact

Organize this course for your team

Interested in this program? Tell us about your context, and we'll get back to you to build the right workshop for your team, together.

    You are



    Additional information

    These trainings might interest you

    Our workshops are designed for professionals. Each program is tailored to your team's level and context, whether in-house or as an open session.

    Kotlin Multiplatform: Mobile

    Kotlin Intermediate
    3j

    Share your business logic between Android and iOS without sacrificing the native experience: master the Kotlin Multiplatform toolchain and Swift interoperability to design, distribute, and integrate a robust shared SDK that accelerates your teams.

    Read

    The Kotlin Language: Concepts & Tools

    Kotlin Beginner
    3j

    Discover how Kotlin lets you write less code with fewer errors: its key concepts and tools will quickly make you productive at building safe, readable, and maintainable applications.

    Read

    Compose: Interfaces in All Their Forms

    Kotlin Intermediate
    2j

    Embrace declarative thinking to build reactive, maintainable, and performant interfaces. Master state and data flow to share a single UI codebase across Android, iOS, Desktop, and Web.

    Read

    The Kotlin Language: Expertise for Deploying APIs

    Kotlin Expert
    3j

    Go beyond everyday Kotlin: understand the deep mechanisms of the language and compiler to write idiomatic, safe code, design durable public APIs, and automate code generation.

    Read

    Kotlin Coroutines: Expert Usage

    Kotlin Expert
    2j

    Go beyond everyday coroutine usage: understand their inner mechanisms, from language primitives to flows, to write reliable, performant, and testable asynchronous code, and choose the right tool for each problem.

    Read

    Koog: Integrating AI into Your Multiplatform Apps

    IA Intermediate
    2j

    Go beyond the simple LLM call: use Koog to design AI agents integrated into your Kotlin applications, capable of acting and orchestrating themselves, reliable, cost-efficient, and observable in production.

    Read