Six-Project Series

Fast Microservices with Kotlin you own this product

prerequisites
basic Spring and Spring Boot • intermediate Maven • basic Docker and Docker Compose • basic Java or Kotlin • REST principles • basic microservices
skills learned
create microservice using Kotlin • design interfaces that access a database • document the different endpoints • strategies to test the logic • security mechanisms for the different endpoints • cache mechanism to reduce the number of requests • build images using Spring Native to improve performance
Andres Sacco
6 weeks · 7-9 hours per week average · BEGINNER

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Step into the role of a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation reservation system that uses a microservice architecture running on Amazon Web Services (AWS). But while TWA’s success is reaching new heights, the performance of its reservation microservice is in a tailspin. Your job is to replace this microservice with an improved one using Kotlin and Spring Boot.

You’ll review the current microservice’s architecture and create one that has the same endpoints, saves all relevant information, has a default error handler, and can communicate with other microservices to access vital information. To reduce the risk of performance problems created by incorrect endpoint-invocation, you’ll create and validate documentation according to the Open API 3 standard. Following business-driven development (BDD) practices, you’ll implement robust testing to prevent deploying your new API with any bugs.

Improve performance by leveraging cache mechanisms that reduce traffic between APIs. Using Spring Security, you’ll secure the API against attacks, and you’ll minimize dependencies that slow it down. You’ll use GraalVM to create a Docker image that decreases consumption of resources, then wrap up by packaging your new API. When you’re done, you’ll have hands-on experience creating a secure, scalable, highly performant API from scratch—and TWA’s customers will be making many return trips!

These projects are designed for learning purposes and are not complete, production-ready applications or solutions.

I enjoyed learning about so many different aspects that I do not get to work with in my day job. I can’t wait to apply some of the techniques.

Calvin Miller, Software Engineer, Zift Solutions

Learn more about this liveProject Series and the Manning liveProject platform.

here's what's included

Project 1 Create a Reservation Service

You’re a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation system that uses a microservice architecture running on Amazon Web Services (AWS). But as TWA’s success has soared, the performance of its reservations microservice has taken a nosedive. TWA has decided to replace the reservation microservice with a new one, using Kotlin and Spring Boot to improve performance and maintainability. Your task is to review the architecture of the existing microservice and create a new one that has the same endpoints as the old one, saves all relevant information, has a default error handler, and communicates with other microservices to access other vital information.

Project 2 Document and Validate an API

You’re a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation system that uses a microservice architecture running on Amazon Web Services (AWS). But while TWA’s success is on the right track, the performance of its reservation microservice is off the rails. As a solution, TWA has replaced the microservice with a new one, using Kotlin and Spring Boot to improve performance and maintainability. Your job is to document the API endpoints for this new microservice—following the Open API 3 standard—to reduce the risk of someone invoking the endpoints incorrectly. You’ll also create custom rules for validating the documentation in an external library, allowing for reuse in other projects across the company.

Project 3 Test Your Code

You’re a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation system that uses a microservice architecture running on Amazon Web Services (AWS). But while the company’s success is moving quickly in the right direction, the performance of its reservations microservice has taken a wrong turn. As a solution, TWA has replaced this microservice with a new one, using Kotlin and Spring Boot to improve performance and maintainability. Your job is to reduce the risk of deploying the application with bugs—a common problem for the previous API—by implementing robust testing.

Following business-driven development (BDD) practices, you’ll create a series of unit tests that validate the code’s logic in a number of plausible scenarios. To test the behavior of the code itself without affecting or being influenced by external classes, you’ll create a series of mocks. Using several libraries, you’ll test to ensure database queries work as expected.

Project 4 Use Cache to Reduce Traffic

You’re a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation system that uses a microservice architecture running on Amazon Web Services (AWS). But while TWA’s success has been steadily climbing, the performance of its reservation microservice has been losing altitude. As a solution, TWA has replaced the microservice with a new one. Your job is to improve performance by leveraging cache mechanisms, including the Caffeine, Varnish, and Redis libraries, that will reduce traffic between APIs.

Project 5 Secure Your API

You’re a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation system that uses a microservice architecture running on Amazon Web Services (AWS). But while TWA’s success is flying high, the performance of its reservation microservice has taken an unfortunate detour. As a solution, TWA has replaced the microservice with a new one, using Kotlin and Spring Boot to improve performance and maintainability. Your job is to secure the API against possible attacks. You’ll configure a Keycloak authentication server to keep track of valid users. Using Spring Security, you’ll add security mechanisms on the microservice to ensure that only valid users can access it and that those users can only access their own reservations.

Project 6 Build and Package an API

You’re a senior developer at Travel World Agency (TWA), which has grown to become the largest travel agency in the world. The company has built a next-generation system that uses a microservice architecture running on Amazon Web Services (AWS). But while TWA’s success is rocketing higher, the performance of its reservations microservice is crashing and burning. As a solution, the company has replaced the microservice with a new one, using Kotlin and Spring Boot to improve performance and maintainability. Your job is to improve the performance of the new API.

With the help of the Maven Enforcer plugin, you’ll deal with dependencies that slow the microservice. You’ll use ktlint to format the source code according to a single standard, thereby increasing efficiency. You’ll create a Docker image using GraalVM and optimize it to decrease resource consumption. When you’re finished, your API will start up quicker and be more reactive, even on high-traffic days like Black Friday and Cyber Monday!

book resources

When you start each of the projects in this series, you'll get full access to the following book for 90 days.

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Fast Microservices with Kotlin project for free

This is a great series of courses for new/intermediate Java developers, perhaps thrown into a legacy system, who want to learn where things come from and want to understand how to improve and modernize their product.

John Chapek, Software Engineer, Prime Therapeutics

Great work Andres, I’m looking forward to completing the liveProject and chatting with you some more.

Etienne Savard, software developer, Omnimed

project author

Andres Sacco

Andres Sacco is a technical leader at Prisma. He has experience with many programming languages including Java, PHP, and Node.js. At his previous job, Andres helped find alternative ways to optimize data transfers between microservices, which reduced the cost of infrastructure by fifty-five percent. A co-author of Beginning Scala 3, published by Apress, Andres has also dictated internal courses about new technologies and shared his expertise in articles on Medium.

Prerequisites

These liveProjects are for developers who have an intermediate level of knowledge with Java/Kotlin and some tools like Maven. To begin these liveProjects, you’ll need to be familiar with the following:

TOOLS
  • Spring and Spring Boot
  • Maven
  • Docker and Docker Compose
TECHNIQUES
  • Basic knowledge of Java or Kotlin
  • Basic knowledge of Spring Boot and adding modules
  • Basic Docker and Docker Compose commands
  • REST principles
  • Basic knowledge of microservices

features

Self-paced
You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.