SlideShare a Scribd company logo
REACTIVE WEB
DEVELOPMENT WITH
SPRING BOOT 2
Mike Melusky - @mrjavascript
June 11, 2018 – Capital Area Software Engineers (CASE)
About Speaker
• Michael Melusky
• Software Developer and College Instructor
• Xbox One / PS4 gaming
• Meat smoking/grilling
About the session
• This is a talk on Java and Spring
• Ideally was hoping to delve more into JDK 10
• The main goal is to highlight the new “reactive web” features in Spring Framework
5 / Spring Boot 2
• Personally manage number of Spring applications:
• JDK 1.8.171
• Spring Boot 1.5.X
• Spring MVC
• Ultimately need to upgrade these to use Spring Boot 2
THIS IS A
JAVATALK
WHAT IS SPRING
FRAMEWORK?
What is Spring Framework?
• Spring Framework is a application framework for the Java platform
• It’s also an excellent IoC (Inversion of Controller) container too!
• https://start.spring.io
SPRING IS AWESOME FORYOUR
RESTFUL API
Spring Framework release history
• Spring Framework 3
• Released in 2010
• Spring Framework 4
• Released in 2014
• Spring Boot 1.0
• Released in 2014
• Spring Boot 1.5
• Released in 2017
• Spring Framework 5
• Released GA in 2017
• Spring Boot 2.0
• Released GA in 2018
Spring Framework v. Boot
• If we used the analogy of a recipe:
• Spring Framework contains the ingredients
• Spring Boot is the casserole
Spring Boot 2
• New features in Spring Boot 2:
• Only supports Java 8 and up
• Java 9 support is not on the 1.x branch!
• Improved development features (logging, monitoring, metrics)
• Everything is secured (including actuator endpoints and static resources)
• The main new feature the Reactive Support in Spring Boot 2
• WebFlux
• Reactive counterparts for MongoDB, Redis, Cassandra
WHAT ISTHE REACTIVE
WEB?
Reactive Programming
• Another paradigm, like object-oriented programming or functional programming,
or procedural programming
• For starters read the Reactive Manifesto:
• https://www.reactivemanifesto.org
REACTIVE MANIFESTO
Reactive Manifesto
• Responsive:
• System responds in timely matter
• Resilient:
• System stays responsive regardless of failure
• Elastic:
• System stays responsive under varying workload
• Message Driven:
• Relies on asynchronous message passing to establish a boundary between components
Takeaway points
• Reactive Programming is all about non-blocking applications that are
asynchronous and event-driven and require a small number of threads to scale
• TL;DR: asynchronous, message passing is heavily used
Blocking vs. Non-Blocking
MULTI-THREADED JAVA SERVER
BLOCKING
(TRADITIONAL SPRING
MVC APPLICATION)
Spring MVC
• Classical Model-View-Controller framework for building web applications
• Features:
• @Controller / @RestController
• @RequestMapping
• ModelAndView
• Creating a spring app using start.spring.io
• ** DEMO **
NON-BLOCKING
(SPRING REACTIVE
WEB)
Reactive StreamsAPI
• Spring Framework 5 embraces the Reactive Streams specification API:
• Adopted in java 9 via java.util.concurrent.Flow
• Reactive Streams is 4 interfaces:
• Publisher
• Subscriber
• Subscription
• - one to one lifecycle of a subscriber subscribing to a publisher
• Processor
• – represents a processing stage between publisher and subscriber
PUBLISHER
SUBSCRIBER
SUBSCRIPTION
PROCESSOR
Spring ReactiveWeb Framework
• Uses Reactor under the hood (implementation of Reactive Streams API)
• Reactor extends the implementation with the following:
• Mono:
• Implements Publisher and returns 0 or 1 elements
• Flux:
• Implements Publisher and returns N elements
SPRING
REACTIVE WEB
FRAMEWORK
Building a Spring ReactiveWebApp
• Two ways of handling routes:
• “Traditional”
• Uses @Controller/@RestController
• “Functional”
• Uses request handlers
• ** DEMO **
WHAT ELSE IS
MISSING?
RestTemplate
• RestTemplate can be used to make blocking HTTP requests in your Spring
Application
• With WebFlux, a non-blocking class named WebClient was introduced
RESTTEMPLATE
WEBCLIENT
WEBCLIENT
FINAL POINTS ON
SPRING REACTIVE WEB
Reactive Web Development with Spring Boot 2
Worth it going full reactive?
• Troubleshooting a Reactive application is a bit difficult, and there is the possibility
that, while fixing an issue, you might accidentally block code has been introduced.
• Most of the traditional Java-based integration libraries are still blocking.
• Limited options are available for Reactive data stores, except for a few NoSQL
databases such as MongoDB.
• Spring Security is still not supported.
PERFORMANCE BENEFITS
(BLOCKING EXAMPLE)
PERFORMANCE BENEFITS (NON-
BLOCKING)
Performance Benefits
• Source: https://dev.to/bufferings/springboot2-blocking-web-vs-reactive-web-46jn
REFERENCES
References
• Reactive Manifesto:
• https://www.reactivemanifesto.org
• SpringWeb Reactive Framework:
• https://docs.spring.io/spring-framework/docs/5.0.0.M1/spring-framework-
reference/html/web-reactive.html
• Spring Framework Guru: “Reactive Streams in Java”
• https://springframework.guru/reactive-streams-in-java/
Thank you for coming
• Code on MS GitHub, Slides on SlideShare:
• @mrjavascript
Ad

More Related Content

What's hot (20)

Flux and React.js
Flux and React.jsFlux and React.js
Flux and React.js
sara stanford
 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
Frank van der Linden
 
Developing Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyDeveloping Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open Liberty
YK Chang
 
ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
David Bergunder
 
ONAP on Vagrant
ONAP on VagrantONAP on Vagrant
ONAP on Vagrant
Victor Morales
 
Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
Introduce flux & react in practice
Introduce flux & react in practiceIntroduce flux & react in practice
Introduce flux & react in practice
Hsuan Fu Lien
 
Mule soft meetup warsaw november 13th, 2019
Mule soft meetup   warsaw november 13th, 2019Mule soft meetup   warsaw november 13th, 2019
Mule soft meetup warsaw november 13th, 2019
Patryk Bandurski
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
Victor Morales
 
Moving ASP.NET MVC to ASP.NET Core
Moving ASP.NET MVC to ASP.NET Core Moving ASP.NET MVC to ASP.NET Core
Moving ASP.NET MVC to ASP.NET Core
John Patrick Oliveros
 
Build PWA with Ionic Toolkit
Build PWA with Ionic ToolkitBuild PWA with Ionic Toolkit
Build PWA with Ionic Toolkit
Pavel Kurnosov
 
Pune meetup 16 feb 2019
Pune meetup 16 feb 2019Pune meetup 16 feb 2019
Pune meetup 16 feb 2019
Santosh Ojha
 
Flux architecture
Flux architectureFlux architecture
Flux architecture
Badr Zaman [Front End , J2EE ]
 
Brightcove presentation on Automated Testing
Brightcove presentation on Automated TestingBrightcove presentation on Automated Testing
Brightcove presentation on Automated Testing
MassTLC
 
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom ConnectorsHow to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
AaronLieberman5
 
When Camel Smiles
When Camel SmilesWhen Camel Smiles
When Camel Smiles
Orest Ivasiv
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
ASP.NET Core Unit Testing
ASP.NET Core Unit TestingASP.NET Core Unit Testing
ASP.NET Core Unit Testing
Shahed Chowdhuri
 
React. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey KolodnitskiyReact. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey Kolodnitskiy
Valeriia Maliarenko
 
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
chaturanga ranatunga
 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
Frank van der Linden
 
Developing Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyDeveloping Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open Liberty
YK Chang
 
Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
Introduce flux & react in practice
Introduce flux & react in practiceIntroduce flux & react in practice
Introduce flux & react in practice
Hsuan Fu Lien
 
Mule soft meetup warsaw november 13th, 2019
Mule soft meetup   warsaw november 13th, 2019Mule soft meetup   warsaw november 13th, 2019
Mule soft meetup warsaw november 13th, 2019
Patryk Bandurski
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
Victor Morales
 
Build PWA with Ionic Toolkit
Build PWA with Ionic ToolkitBuild PWA with Ionic Toolkit
Build PWA with Ionic Toolkit
Pavel Kurnosov
 
Pune meetup 16 feb 2019
Pune meetup 16 feb 2019Pune meetup 16 feb 2019
Pune meetup 16 feb 2019
Santosh Ojha
 
Brightcove presentation on Automated Testing
Brightcove presentation on Automated TestingBrightcove presentation on Automated Testing
Brightcove presentation on Automated Testing
MassTLC
 
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom ConnectorsHow to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
AaronLieberman5
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
React. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey KolodnitskiyReact. Flux. Redux. by Andrey Kolodnitskiy
React. Flux. Redux. by Andrey Kolodnitskiy
Valeriia Maliarenko
 
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
How to Structure Your Xamarin Solution by Adhering to Common .NET Practices -...
chaturanga ranatunga
 

Similar to Reactive Web Development with Spring Boot 2 (20)

An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
Mike Melusky
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
Mike Melusky
 
Streaming to a new Jakarta EE
Streaming to a new Jakarta EEStreaming to a new Jakarta EE
Streaming to a new Jakarta EE
Markus Eisele
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
J On The Beach
 
GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)
gdgoncampuslncts
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
Frank van der Linden
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
Markus Eisele
 
Fluxible
FluxibleFluxible
Fluxible
Taylor Lovett
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
Dhaval Barot
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
Mike Melusky
 
React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
 
React-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsxReact-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsx
Kulbir4
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
programmersclubonlin
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
Phil Leggetter
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbai
vibrantuser
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
Taggart Bowen-Gaddy
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Serhat Can
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
Vinci Rufus
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
Manav Prasad
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical Skills
Sandeep Adwankar
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
Mike Melusky
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
Mike Melusky
 
Streaming to a new Jakarta EE
Streaming to a new Jakarta EEStreaming to a new Jakarta EE
Streaming to a new Jakarta EE
Markus Eisele
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
J On The Beach
 
GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)GDG Workshop on React (By Aakanksha Rai)
GDG Workshop on React (By Aakanksha Rai)
gdgoncampuslncts
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
Frank van der Linden
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
Markus Eisele
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
Dhaval Barot
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
Mike Melusky
 
React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
 
React-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsxReact-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsx
Kulbir4
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
programmersclubonlin
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
Phil Leggetter
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbai
vibrantuser
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Serhat Can
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
Vinci Rufus
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
Manav Prasad
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical Skills
Sandeep Adwankar
 
Ad

More from Mike Melusky (19)

Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET Developers
Mike Melusky
 
Containerize all the things!
Containerize all the things!Containerize all the things!
Containerize all the things!
Mike Melusky
 
Building a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet coreBuilding a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet core
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
Mike Melusky
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2
Mike Melusky
 
Securing your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protectionSecuring your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protection
Mike Melusky
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET Integration
Mike Melusky
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NET
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydsl
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows services
Mike Melusky
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1
Mike Melusky
 
Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET Developers
Mike Melusky
 
Containerize all the things!
Containerize all the things!Containerize all the things!
Containerize all the things!
Mike Melusky
 
Building a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet coreBuilding a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet core
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
Mike Melusky
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2
Mike Melusky
 
Securing your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protectionSecuring your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protection
Mike Melusky
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET Integration
Mike Melusky
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NET
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydsl
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows services
Mike Melusky
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1
Mike Melusky
 
Ad

Recently uploaded (20)

Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 

Reactive Web Development with Spring Boot 2

  • 1. REACTIVE WEB DEVELOPMENT WITH SPRING BOOT 2 Mike Melusky - @mrjavascript June 11, 2018 – Capital Area Software Engineers (CASE)
  • 2. About Speaker • Michael Melusky • Software Developer and College Instructor • Xbox One / PS4 gaming • Meat smoking/grilling
  • 3. About the session • This is a talk on Java and Spring • Ideally was hoping to delve more into JDK 10 • The main goal is to highlight the new “reactive web” features in Spring Framework 5 / Spring Boot 2 • Personally manage number of Spring applications: • JDK 1.8.171 • Spring Boot 1.5.X • Spring MVC • Ultimately need to upgrade these to use Spring Boot 2
  • 6. What is Spring Framework? • Spring Framework is a application framework for the Java platform • It’s also an excellent IoC (Inversion of Controller) container too! • https://start.spring.io
  • 7. SPRING IS AWESOME FORYOUR RESTFUL API
  • 8. Spring Framework release history • Spring Framework 3 • Released in 2010 • Spring Framework 4 • Released in 2014 • Spring Boot 1.0 • Released in 2014 • Spring Boot 1.5 • Released in 2017 • Spring Framework 5 • Released GA in 2017 • Spring Boot 2.0 • Released GA in 2018
  • 9. Spring Framework v. Boot • If we used the analogy of a recipe: • Spring Framework contains the ingredients • Spring Boot is the casserole
  • 10. Spring Boot 2 • New features in Spring Boot 2: • Only supports Java 8 and up • Java 9 support is not on the 1.x branch! • Improved development features (logging, monitoring, metrics) • Everything is secured (including actuator endpoints and static resources) • The main new feature the Reactive Support in Spring Boot 2 • WebFlux • Reactive counterparts for MongoDB, Redis, Cassandra
  • 12. Reactive Programming • Another paradigm, like object-oriented programming or functional programming, or procedural programming • For starters read the Reactive Manifesto: • https://www.reactivemanifesto.org
  • 14. Reactive Manifesto • Responsive: • System responds in timely matter • Resilient: • System stays responsive regardless of failure • Elastic: • System stays responsive under varying workload • Message Driven: • Relies on asynchronous message passing to establish a boundary between components
  • 15. Takeaway points • Reactive Programming is all about non-blocking applications that are asynchronous and event-driven and require a small number of threads to scale • TL;DR: asynchronous, message passing is heavily used
  • 19. Spring MVC • Classical Model-View-Controller framework for building web applications • Features: • @Controller / @RestController • @RequestMapping • ModelAndView • Creating a spring app using start.spring.io • ** DEMO **
  • 21. Reactive StreamsAPI • Spring Framework 5 embraces the Reactive Streams specification API: • Adopted in java 9 via java.util.concurrent.Flow • Reactive Streams is 4 interfaces: • Publisher • Subscriber • Subscription • - one to one lifecycle of a subscriber subscribing to a publisher • Processor • – represents a processing stage between publisher and subscriber
  • 26. Spring ReactiveWeb Framework • Uses Reactor under the hood (implementation of Reactive Streams API) • Reactor extends the implementation with the following: • Mono: • Implements Publisher and returns 0 or 1 elements • Flux: • Implements Publisher and returns N elements
  • 28. Building a Spring ReactiveWebApp • Two ways of handling routes: • “Traditional” • Uses @Controller/@RestController • “Functional” • Uses request handlers • ** DEMO **
  • 30. RestTemplate • RestTemplate can be used to make blocking HTTP requests in your Spring Application • With WebFlux, a non-blocking class named WebClient was introduced
  • 34. FINAL POINTS ON SPRING REACTIVE WEB
  • 36. Worth it going full reactive? • Troubleshooting a Reactive application is a bit difficult, and there is the possibility that, while fixing an issue, you might accidentally block code has been introduced. • Most of the traditional Java-based integration libraries are still blocking. • Limited options are available for Reactive data stores, except for a few NoSQL databases such as MongoDB. • Spring Security is still not supported.
  • 39. Performance Benefits • Source: https://dev.to/bufferings/springboot2-blocking-web-vs-reactive-web-46jn
  • 41. References • Reactive Manifesto: • https://www.reactivemanifesto.org • SpringWeb Reactive Framework: • https://docs.spring.io/spring-framework/docs/5.0.0.M1/spring-framework- reference/html/web-reactive.html • Spring Framework Guru: “Reactive Streams in Java” • https://springframework.guru/reactive-streams-in-java/
  • 42. Thank you for coming • Code on MS GitHub, Slides on SlideShare: • @mrjavascript