Structured Concurrency in Practice: CoroutineScope vs StructuredTaskScope [Part 1]
This post series assumes familiarity with Kotlin, Java, and Spring Boot. No AI was used during the writing of this post series. What we're building We have an old library and we want to sell all th...
![Structured Concurrency in Practice: CoroutineScope vs StructuredTaskScope [Part 1]](https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96rzdml3e898pxqe15mi.jpg)
Source: DEV Community
This post series assumes familiarity with Kotlin, Java, and Spring Boot. No AI was used during the writing of this post series. What we're building We have an old library and we want to sell all the books. For that purpose we decided to build a simple bookstore app. We decide to use the best tools for the job, which in this case are Kotlin and Spring Boot. We want our customers to be able to see the details of each book, along with the reviews. For that we have the following controller: package com.bookstore.books import com.bookstore.reviews.ReviewsService import org.slf4j.LoggerFactory import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/books") class BooksController( private val booksRepository: BooksRepository, private val reviewsService: ReviewsService, ) { priv