$30 off During Our Annual Pro Sale. View Details »

Reactive programming with Spring boot 2

Dimitri
March 30, 2018

Reactive programming with Spring boot 2

An introduction to reactive programming with project reactor and Spring boot 2.0.

Dimitri

March 30, 2018
Tweet

More Decks by Dimitri

Other Decks in Programming

Transcript

  1. AN INTRODUCTION TO
    SPRING BOOT 2.0

    View Slide

  2. WHAT IS SPRING BOOT?
    - Framework to build production-ready applications
    - Based on Spring framework
    - Version 2.0 released this month

    View Slide

  3. View Slide

  4. WHAT IS NEW IN 2.0?
    - Spring 5
    - Project Reactor
    - Java 9 support
    - Kotlin integration
    - ...

    View Slide

  5. REACTIVE STREAMS

    View Slide

  6. - Non-blocking
    - Data streams
    - Back pressure
    - Asynchronous
    REACTIVE STREAMS

    View Slide

  7. KEY COMPONENTS
    Publisher
    Mono
    Flux
    Operators Subscriber

    View Slide

  8. KEY COMPONENTS

    View Slide

  9. SPRING MVC

    View Slide

  10. WEBFLUX

    View Slide

  11. ROUTER FUNCTION

    View Slide

  12. TRADITIONAL REPOSITORY

    View Slide

  13. REACTIVE REPOSITORY

    View Slide

  14. WEBCLIENT

    View Slide

  15. LIVE
    CODING
    TIME

    View Slide

  16. WHY ADAPT?
    - When writing new projects
    - When moving to Java 9
    - When you want to use Spring 5
    - When you want to use Kotlin

    View Slide

  17. WHY REACTIVE?
    - When real time or event-driven communication is important
    - When processing large, or infinite amounts of data
    - When you expect that there will be a large amount of traffic

    View Slide

  18. WHY NOT REACTIVE?
    - When expected to make blocking calls

    View Slide

  19. ANY QUESTIONS?*
    * Make sure to ask them in a reactive way.
    Don’t block your brains when you’re waiting for an answer.

    View Slide

  20. RESOURCES
    - Shameless self-promotion:
    https://g00glen00b.be/getting-started-spring-boot-2/
    - More shameless self-promotion:
    https://blog.optis.be/spring-devoxx-7c0fa8a9dc9f
    - Building a reactive RESTful service:
    https://spring.io/guides/gs/reactive-rest-service/
    - Live demo code:
    https://github.com/optis/spring-boot-2-webflux

    View Slide

  21. THE
    END

    View Slide