SlideShare a Scribd company logo
1 of 37
Why Reactive?
Reactive Programming With Spring 5
Dane Savot
Agenda
1. Why Reactive?
1. The Current Processing Model (Spring MVC)
2. The Reactive runtime (Non-Blocking Runtime)
2. Reactive Programming With Spring 5
1. Imperative vs Reactive Style Programming
2. Reactive Stream
3. Project Reactor
4. Example Usage (Reactive Repository)
5. Demo
Current Processing Model in Spring MVC World
Non-blocking Runtime
Reactive Programming
With Spring 5
Imperative vs Reactive Style Programming
List<Order> orders = repository.getOrders(id); -> block
filter(orders); -> block
List<Product> products = orders.stream().foreach(order -> {
order.addProducts(getProducts(order.orderId)); ->block
}); ->block
return orders;
Flux<Order> order = repository.getOrder(id)
.filter(order -> order.getName().match(“A**”))
.subscription( order -> {
order.addProduct(getProduct(order.orderId));
return orders;
Reactive Programming
Reactive Programming manages asynchronous data flows between producers of data and consumers
that need to react to that data in a non-blocking manner.
So, Reactive Programming is all about non-blocking applications that are asynchronous and
event-driven and require a small number of threads to scale. (Dzone.com)
Reactive Streams
public interface Subscriber<T> {
void onSubscribe(Subscription sub);
void onNext(T item);
void onError(Throwable ex);
void onComplete();
}
public interface Subscription
{
void request(long n);
void cancel();
}
public interface Publisher<T> {
void subscribe(Subscriber<? super T> subscriber);
}
Reactive Streams
Project Reactor
onSubscribe
request(unbounded)
onNext(User: Jason)
onNext(User: Jay)
...
onComplete()
onSubscribe
request(2)
onNext(User: Jason)
onNext(User: Jay)
request(2)
onNext(User: Joe)
onNext(User: John)
...
References
1. SpringOne Platform 2016 Keynote - Reactive Spring
2. From Imperative To Reactive Web Apps
3. Reactive Programming With Spring 5
4. Doing Reactive Programming with Spring 5

More Related Content

What's hot

OASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationOASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationMario Estrada
 
React js t7 - forms-events
React js   t7 - forms-eventsReact js   t7 - forms-events
React js t7 - forms-eventsJainul Musani
 
Angular JS Unit Testing - Overview
Angular JS Unit Testing - OverviewAngular JS Unit Testing - Overview
Angular JS Unit Testing - OverviewThirumal Sakthivel
 
React.js and Redux overview
React.js and Redux overviewReact.js and Redux overview
React.js and Redux overviewAlex Bachuk
 
Making react part of something greater
Making react part of something greaterMaking react part of something greater
Making react part of something greaterDarko Kukovec
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2Yakov Fain
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - componentsJainul Musani
 
Gatling overview
Gatling overviewGatling overview
Gatling overviewViral Jain
 
Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012slandelle
 
Microstrategy Integrity Manager for QA tests automation
Microstrategy Integrity Manager for QA tests automationMicrostrategy Integrity Manager for QA tests automation
Microstrategy Integrity Manager for QA tests automationSlava Potapenko
 
React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycleJainul Musani
 
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConfFull-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConfLoiane Groner
 
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5Marcin Mieszek
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introductionNir Kaufman
 
TestWorks Conf Performance testing made easy with gatling - Guillaume Corré
TestWorks Conf Performance testing made easy with gatling - Guillaume CorréTestWorks Conf Performance testing made easy with gatling - Guillaume Corré
TestWorks Conf Performance testing made easy with gatling - Guillaume CorréXebia Nederland BV
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingBinary Studio
 

What's hot (20)

Unit testing on mobile apps
Unit testing on mobile appsUnit testing on mobile apps
Unit testing on mobile apps
 
OASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationOASGraph LoopBack 4 Integration
OASGraph LoopBack 4 Integration
 
React js t7 - forms-events
React js   t7 - forms-eventsReact js   t7 - forms-events
React js t7 - forms-events
 
Angular JS Unit Testing - Overview
Angular JS Unit Testing - OverviewAngular JS Unit Testing - Overview
Angular JS Unit Testing - Overview
 
React.js and Redux overview
React.js and Redux overviewReact.js and Redux overview
React.js and Redux overview
 
Making react part of something greater
Making react part of something greaterMaking react part of something greater
Making react part of something greater
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2
 
React js t5 - state
React js   t5 - stateReact js   t5 - state
React js t5 - state
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - components
 
Gatling overview
Gatling overviewGatling overview
Gatling overview
 
Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012
 
Microstrategy Integrity Manager for QA tests automation
Microstrategy Integrity Manager for QA tests automationMicrostrategy Integrity Manager for QA tests automation
Microstrategy Integrity Manager for QA tests automation
 
React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycle
 
Metrics
MetricsMetrics
Metrics
 
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConfFull-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
 
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introduction
 
Getting Started With ReactJS
Getting Started With ReactJSGetting Started With ReactJS
Getting Started With ReactJS
 
TestWorks Conf Performance testing made easy with gatling - Guillaume Corré
TestWorks Conf Performance testing made easy with gatling - Guillaume CorréTestWorks Conf Performance testing made easy with gatling - Guillaume Corré
TestWorks Conf Performance testing made easy with gatling - Guillaume Corré
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
 

Similar to Why reactive:reactive programming spring 5

Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018Loiane Groner
 
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019Loiane Groner
 
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java GirlFull-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java GirlLoiane Groner
 
ASP.NET MVC 4 Request Pipeline Internals
ASP.NET MVC 4 Request Pipeline InternalsASP.NET MVC 4 Request Pipeline Internals
ASP.NET MVC 4 Request Pipeline InternalsLukasz Lysik
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developersIllia Seleznov
 
Build your website with angularjs and web apis
Build your website with angularjs and web apisBuild your website with angularjs and web apis
Build your website with angularjs and web apisChalermpon Areepong
 
Reactive programming for java developers
Reactive programming for java developersReactive programming for java developers
Reactive programming for java developersConstantin Popa
 
Damian Kmiecik - Road trip with Redux
Damian Kmiecik - Road trip with ReduxDamian Kmiecik - Road trip with Redux
Damian Kmiecik - Road trip with ReduxPROIDEA
 
ASP.NET MVC Internals
ASP.NET MVC InternalsASP.NET MVC Internals
ASP.NET MVC InternalsVitaly Baum
 
FullStack Reativo com Spring WebFlux + Angular
FullStack Reativo com Spring WebFlux + AngularFullStack Reativo com Spring WebFlux + Angular
FullStack Reativo com Spring WebFlux + AngularLoiane Groner
 
MVC 1.0 als alternative Webtechnologie
MVC 1.0 als alternative WebtechnologieMVC 1.0 als alternative Webtechnologie
MVC 1.0 als alternative WebtechnologieOPEN KNOWLEDGE GmbH
 
Going Reactive with Spring 5
Going Reactive with Spring 5Going Reactive with Spring 5
Going Reactive with Spring 5Drazen Nikolic
 
WAF In DevOps DevOpsFusion2019
WAF In DevOps DevOpsFusion2019WAF In DevOps DevOpsFusion2019
WAF In DevOps DevOpsFusion2019Franziska Buehler
 

Similar to Why reactive:reactive programming spring 5 (20)

Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
 
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
 
Spring framework part 2
Spring framework  part 2Spring framework  part 2
Spring framework part 2
 
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java GirlFull-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
 
ASP.NET MVC overview
ASP.NET MVC overviewASP.NET MVC overview
ASP.NET MVC overview
 
ASP.NET MVC 4 Request Pipeline Internals
ASP.NET MVC 4 Request Pipeline InternalsASP.NET MVC 4 Request Pipeline Internals
ASP.NET MVC 4 Request Pipeline Internals
 
Asp Net Architecture
Asp Net ArchitectureAsp Net Architecture
Asp Net Architecture
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
 
Build your website with angularjs and web apis
Build your website with angularjs and web apisBuild your website with angularjs and web apis
Build your website with angularjs and web apis
 
Flux architecture
Flux architectureFlux architecture
Flux architecture
 
Reactive programming for java developers
Reactive programming for java developersReactive programming for java developers
Reactive programming for java developers
 
Damian Kmiecik - Road trip with Redux
Damian Kmiecik - Road trip with ReduxDamian Kmiecik - Road trip with Redux
Damian Kmiecik - Road trip with Redux
 
ASP.NET MVC Internals
ASP.NET MVC InternalsASP.NET MVC Internals
ASP.NET MVC Internals
 
React inter3
React inter3React inter3
React inter3
 
FullStack Reativo com Spring WebFlux + Angular
FullStack Reativo com Spring WebFlux + AngularFullStack Reativo com Spring WebFlux + Angular
FullStack Reativo com Spring WebFlux + Angular
 
Android development
Android developmentAndroid development
Android development
 
MVC 1.0 als alternative Webtechnologie
MVC 1.0 als alternative WebtechnologieMVC 1.0 als alternative Webtechnologie
MVC 1.0 als alternative Webtechnologie
 
Going Reactive with Spring 5
Going Reactive with Spring 5Going Reactive with Spring 5
Going Reactive with Spring 5
 
WAF In DevOps DevOpsFusion2019
WAF In DevOps DevOpsFusion2019WAF In DevOps DevOpsFusion2019
WAF In DevOps DevOpsFusion2019
 
React JS .NET
React JS .NETReact JS .NET
React JS .NET
 

Recently uploaded

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Why reactive:reactive programming spring 5

Editor's Notes

  1. Hi Everyone, Welcome to our techtalk, and this is the first techtalk ever we have in our team, so basically our goal of this techtalk is to create the culture of Sharing, keeping with current and relevant technology so that we know what going on in the technology market. For those who are new to our team, we are actually working on a project call CDV, we have a very diverse team 1 Philipino, 1 Cambodia, a couple of Americans, 1 Chinese, 2 Russians, and also Indian.
  2. If we look at the execution model of how we are handling the requests in Spring MVC world. We know that the application run on the Servlet Container, and we have a number of incoming request from the clients, so what it does is that Servlet container will spawn every new Thread to handle the request so that it guarantee that each request is processed independently from the other.  Then it comes to the question that what if we have concurrent thousands of requests comping to the server, will the Servlet container running out of memory because of spawning new thread to handle each of the request? The answer is maybe, but luckily Servlet Container also has the concept of Threadpool that the a number of requests will be executed simontanously while the rest will be put in queue. However, if we continue to have many requests at the peak load eventually we will reach OutOfMemory exception. 
  3. So then what we do is that we try to scale the application horizontally by having a couple of JVM or instances and we have Load Balancer who try to balance the requests to different JVM.
  4. So it is a simple model that we can use to build the application that scale pretty well and has taken us this far, and there is no reason to change if thing has already be been working just fine. However, over the last 10 years things have changed dramatically in the way we develop application.  In addition there is a concern that the more resources we used in scalling up the application will end up more costs we need to spend in our architecture design. So What would be the alternative? That’s why we come to our topic today which is “Non-Blocking Runtime” 
  5. The concept is pretty influent by thing that have already been proof by the Event Loop execution model done by NodeJS in which we have 1 Thread that run asynchronously to handle all the request in non-blocking way. But, in the context of the Reactive NonBlocking Runtime , the idea is to reduce the number of Threads compare to a lot of Threads used in Servlet Container. Which basically we have a couple of Threads who are responsible for handling all the requests. Each of the worker Thread have to be non-blocking, and that it comes to our next topic how to develop the non-blocking application.
  6. In fact building non-blocking application is not really simple as we heard about developing application like that in NodeJS, we have the word like “Call back Hell”, and many other things, but with Project Reactor done by Pivotal in Spring 5 helps to leverage all the difficult works.