An introduction to reactive programming with project reactor and Spring boot 2.0.
AN INTRODUCTION TOSPRING BOOT 2.0
View Slide
WHAT IS SPRING BOOT?- Framework to build production-ready applications- Based on Spring framework- Version 2.0 released this month
WHAT IS NEW IN 2.0?- Spring 5- Project Reactor- Java 9 support- Kotlin integration- ...
REACTIVE STREAMS
- Non-blocking- Data streams- Back pressure- AsynchronousREACTIVE STREAMS
KEY COMPONENTSPublisherMonoFluxOperators Subscriber
KEY COMPONENTS
SPRING MVC
WEBFLUX
ROUTER FUNCTION
TRADITIONAL REPOSITORY
REACTIVE REPOSITORY
WEBCLIENT
LIVECODINGTIME
WHY ADAPT?- When writing new projects- When moving to Java 9- When you want to use Spring 5- When you want to use Kotlin
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
WHY NOT REACTIVE?- When expected to make blocking calls
ANY QUESTIONS?** Make sure to ask them in a reactive way.Don’t block your brains when you’re waiting for an answer.
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
THEEND