Reactive Spring Boot With Kotlin Coroutines: Adding Virtual Threads

Ғылым және технология

With the advent of JDK 21, there’s a cool new kid in concurrency town: virtual threads! Conceptually, virtual threads claim to offer the same lightweight concurrency characteristics as coroutines. Everyone is wondering, how will they impact coroutines and reactive stacks? Will virtual threads compete with, coexist with, or complement them? And how does all this fit in with Spring Boot?
In this session, we’ll explore virtual threads in-depth. Using live coding, accompanied by clarifying illustrations and crisp samples, you’ll gain a robust understanding of how virtual threads and coroutines differ and are similar in the ways in which they address concepts such as structured concurrency, continuations, suspend methods, context propagation, and more. We’ll also explore how virtual threads and coroutines can be applied in Spring Boot by looking at various usage scenarios.
At the end of our journey, we’ll have uncovered the similarities and differences between coroutines and virtual threads, revealed their strengths and weaknesses, and explored viable usage scenarios, enabling you to choose the best approach for your specific challenges.
Demo project: github.com/upeter/kotlin-spri...
#kotlincoroutines #reactiveprogramming #webflux #kotlin

Пікірлер: 18

  • @varunshrivastava6845
    @varunshrivastava68455 ай бұрын

    This is one of the best explanation of how coroutines and virtual threads works. And also how springboot has incorporated these changes. Kudos to Urs Peter!!!!!

  • @wdeath
    @wdeath5 ай бұрын

    Clojure and spring webflux, is very simple to use also, functional dynamic, not spagheti code you just follow the flow. For people that like functional programming and data processing at least. Talk was very nice! Thank you.

  • @sushovanchakraborty1028
    @sushovanchakraborty10285 ай бұрын

    The best explanation of virtual threads till date.

  • @slaynnyt8130
    @slaynnyt81305 ай бұрын

    This is amazingly clear and well explained, I'm gonna send this to all backend engineers of the company I work at as a must-watch!

  • @theDevorium
    @theDevorium5 ай бұрын

    Really good explanations. But I kinda got lost in between switching good/bad approach in the end. I will have to watch it one more time I guess. Just a straightforward kotlin coroutines with spring boot+virtual threads would be nice. Keep up the good work. Cheers.

  • @RockyJaiswal
    @RockyJaiswal5 ай бұрын

    This is one of the best talks I have seen and I have been trying to get Async + VT + Coroutines right for the last year or so and this talk answers all the questions and gives clear explanation of each model.

  • @cristiansxxx
    @cristiansxxx5 ай бұрын

    Great video! Really open my eyes on some concepts. I enjoyed every minute of it and convinced me what a great language is Kotlin. Java dev here, never touched Kotlin so far in my life, but sure looks promising and will be quite curios to give a try in the future

  • @JetherRodrigues
    @JetherRodrigues5 ай бұрын

    Amazing explanation. Congrats @Urs Peter

  • @milosristic1111
    @milosristic11115 ай бұрын

    Good evening.Cheers

  • @andrewsneck
    @andrewsneck2 ай бұрын

    this is brilliant which I have searched

  • @simonegiusso
    @simonegiusso5 ай бұрын

    What has been said by Peter at 25:24 is not correct. It did not go Out Of Memory. What happened in reality is that you hit the max number of native thread your OS allows you to create per java processor. The error says "possible out of memory OR PROCESSOR/RESOURCE LIMITES REACHED. If you reduce the available amount of heap, lets say 1GB or 512MB or even less, probably you will see the exactly same error and you will be able to create the maximum number of threads your OS allows you to create. An "empty" Platform Thread occupies 1/2MB of STACK not heap. Cheers.

  • @qweezique
    @qweezique5 ай бұрын

    thx ❤

  • @user-dg9vc3ts1y
    @user-dg9vc3ts1y4 ай бұрын

    Hi, what kind of tool Mr Urs Peter use for testing the performance of the spring boot app?

  • @itshan3786
    @itshan37865 ай бұрын

    This was excellent. can we get the demo project from some where - presentation-springboot-coroutines?

  • @Kotlin

    @Kotlin

    5 ай бұрын

    Thanks for asking! Please find the link to the demo project in the description of the video.

  • @itshan3786

    @itshan3786

    5 ай бұрын

    @@Kotlin thanks a lot!😃😃😃

  • @user-hi3dj6wh7d

    @user-hi3dj6wh7d

    5 ай бұрын

    @@Kotlinthanks but i cant see any link in video description

  • @AntonArhipov

    @AntonArhipov

    5 ай бұрын

    @@user-hi3dj6wh7d you need to click to expand the description text - there will be the link

Келесі