SlideShare uma empresa Scribd logo
1 de 41
Baixar para ler offline
Being Reactive with SpringBeing Reactive with Spring
Kris Galea
1
What's all this about?!What's all this about?!
Being Reactive .. huh ?Being Reactive .. huh ?
Nothing to do with Facebook's React Framework!
Face the challenges of popularity
Building robust applications for when it matters most
..with.. Spring?..with.. Spring?
Java framework
better than sliced bread (or ftira)
Java!Java!
What's all this Reactive-ness?!What's all this Reactive-ness?!
This fantastic thing called "The Internet"
Di culties in dealing with growing number of requests
Get to grips with the idea of Reactive Programming
2 . 2
Let's get some things straight!Let's get some things straight!
Publisher-Subscriber Messaging Pattern
Data Streams
Get technical ...Get technical ...
Java 8/9
Spring 5
Super exciting demo of Reactive Spring!Super exciting demo of Reactive Spring!
2 . 3
But rst! A little about us ...But rst! A little about us ...
Hi!Hi!
and something about yours truly...and something about yours truly...
Email: kristiang@ccbill.comEmail: kristiang@ccbill.com
Github: https://github.com/krisgaleaGithub: https://github.com/krisgalea
Slides:Slides:
https://www.slideshare.net/KrisGalea/being-https://www.slideshare.net/KrisGalea/being-
reactive-with-springreactive-with-spring
3 . 2
Where all this began ...Where all this began ...
Welcome to ...Welcome to ... The InternetThe Internet
The internet is growingThe internet is growing
4 . 2
Challenges of a Growing InternetChallenges of a Growing Internet
Number of requests increases
E-Commerce: businesses are now online
Multiple ways of scaling: hardware vs. software
Maintaining consistency come rain or shine
4 . 3
Let's talk ReactiveLet's talk Reactive
A Set of Principles/GuidelinesA Set of Principles/Guidelines
A software oriented approach to robustness
Not, strictly speaking, anything technical
A set of guidelines which motivate design decisions made from the ground
up
A way to ensure that applications are built to withstand the di culties of
modern necessities
5 . 2
One Manifesto to Rule them all ...One Manifesto to Rule them all ...
5 . 3
Technically speaking ...Technically speaking ...
Use of functional approach to allow an application to react to changes in
the environment as they happen
vs
Use of data streams to transmit changes from the source to the
destination
Use of the publisher-subscriber pattern
a:= b + c
a:= changing(b) + changing(c)
5 . 4
Let's try this out ...Let's try this out ...
5 . 5
A word about Backpressure...A word about Backpressure...
Hot vs Cold message emitting
Push vs Pull vs Hybrid-push-pull
5 . 6
Let's Get Down to Basics ...Let's Get Down to Basics ...
6
Publisher-Subscriber MessagingPublisher-Subscriber Messaging
PatternPattern
Messaging Pattern (architectural)
3 main actors: Publisher , Subscriber and Subscription
7 . 2
Subscribers subscribe to changes in the Publisher using a
Subscription
Publisher noti es of changes in its state
Publisher is not aware of the Subscriber's details
7 . 3
loose coupling
Allows for easy scalability using a common Message Bus
Message Broker can be as sophisticated or as dumb as needed
7 . 4
Data StreamsData Streams
A sequence of elements from a collection or data source
Pipes data from a source to a destination
Enforces statelessness (and immutability)
Easily parallellised
Allows chaining of Functional Operators
In Java implemented plainly as Streams
8 . 2
Functional Operator ChainingFunctional Operator Chaining
8 . 3
Functional Operator ChainingFunctional Operator Chaining
8 . 4
Functional Operator ChainingFunctional Operator Chaining
8 . 5
8 . 6
Let's Get Technical!Let's Get Technical!
9
Reactive and Java 8 & 9Reactive and Java 8 & 9
Paradigm shiftParadigm shift
10 . 2
Implementation of Streams as of Java 8Implementation of Streams as of Java 8
Use ofUse of Stream/Functional OperatorsStream/Functional Operators
Intermediate Operators
Terminal Operators
List <Integer> numbers = List.of(2,3,4,5,6);
numbers.stream().filter(number -> number > 4).forEach(num -> System.out.println(num));
10 . 3
PublisherPublisher
10 . 4
SubscriberSubscriber
10 . 5
SubscriptionSubscription
10 . 6
SpringSpring
A Java framework for enterprise quality applications
Dependency Injection and Inversion of Control
Convention over con guration
Annotation based
Provides a large tool set to quickly get up and running e.g. Spring Boot
11 . 2
Spring Reactive Data TypesSpring Reactive Data Types
11 . 3
11 . 4
Let's try all this out !Let's try all this out !
Let's pretend to process feeds from socialLet's pretend to process feeds from social
networks ...networks ...
That's it!That's it!
In this talk we've learned:In this talk we've learned:
What Reactive Programming is and why it's useful
The core concepts used to implement Reactive
Which industry tools are used to develop Reactive applications
13
Questions?Questions?
14
thx! <3thx! <3
Additional ReadingAdditional Reading
Reactive Manifesto
Reactive Spring
Josh Long - Spring Reactive
Intro to Rx
ReactiveX
Reactive Streams Spec
15

Mais conteúdo relacionado

Semelhante a Being Reactive with Spring

Reactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaReactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaAli Muzaffar
 
App Mod 03: Monoliths to microservices with java ee and spring boot
App Mod 03: Monoliths to microservices with java ee and spring bootApp Mod 03: Monoliths to microservices with java ee and spring boot
App Mod 03: Monoliths to microservices with java ee and spring bootJudy Breedlove
 
Real-World Pulsar Architectural Patterns
Real-World Pulsar Architectural PatternsReal-World Pulsar Architectural Patterns
Real-World Pulsar Architectural PatternsDevin Bost
 
Spring Book – Chapter 1 – Introduction
Spring Book – Chapter 1 – IntroductionSpring Book – Chapter 1 – Introduction
Spring Book – Chapter 1 – IntroductionTomcy John
 
RxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android MontréalRxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android MontréalSidereo
 
Reactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring ReactorReactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring ReactorTrayan Iliev
 
Client-side Development 2016
Client-side Development 2016Client-side Development 2016
Client-side Development 2016Huge
 
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in ActionBill Scott
 
Virtualising Tier 1 Apps
Virtualising Tier 1 AppsVirtualising Tier 1 Apps
Virtualising Tier 1 AppsIwan Rahabok
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowKaxil Naik
 
Project Reactor Now and Tomorrow
Project Reactor Now and TomorrowProject Reactor Now and Tomorrow
Project Reactor Now and TomorrowVMware Tanzu
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekDr. Felix Raab
 
Lean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partnerLean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partnerBill Scott
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Framework Engineering 2.1
Framework Engineering 2.1Framework Engineering 2.1
Framework Engineering 2.1YoungSu Son
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeVMware Tanzu
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Cωνσtantίnoς Giannoulis
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkRed Hat Developers
 

Semelhante a Being Reactive with Spring (20)

Reactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaReactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJava
 
App Mod 03: Monoliths to microservices with java ee and spring boot
App Mod 03: Monoliths to microservices with java ee and spring bootApp Mod 03: Monoliths to microservices with java ee and spring boot
App Mod 03: Monoliths to microservices with java ee and spring boot
 
Real-World Pulsar Architectural Patterns
Real-World Pulsar Architectural PatternsReal-World Pulsar Architectural Patterns
Real-World Pulsar Architectural Patterns
 
Spring Book – Chapter 1 – Introduction
Spring Book – Chapter 1 – IntroductionSpring Book – Chapter 1 – Introduction
Spring Book – Chapter 1 – Introduction
 
Why meteor
Why meteorWhy meteor
Why meteor
 
RxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android MontréalRxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android Montréal
 
Enabling Lean at Enterprise Scale: Lean Engineering in Action
Enabling Lean at Enterprise Scale: Lean Engineering in ActionEnabling Lean at Enterprise Scale: Lean Engineering in Action
Enabling Lean at Enterprise Scale: Lean Engineering in Action
 
Reactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring ReactorReactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring Reactor
 
Client-side Development 2016
Client-side Development 2016Client-side Development 2016
Client-side Development 2016
 
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
 
Virtualising Tier 1 Apps
Virtualising Tier 1 AppsVirtualising Tier 1 Apps
Virtualising Tier 1 Apps
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
 
Project Reactor Now and Tomorrow
Project Reactor Now and TomorrowProject Reactor Now and Tomorrow
Project Reactor Now and Tomorrow
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
Lean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partnerLean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partner
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Framework Engineering 2.1
Framework Engineering 2.1Framework Engineering 2.1
Framework Engineering 2.1
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a Mainframe
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
 

Último

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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
🐬 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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Being Reactive with Spring

  • 1. Being Reactive with SpringBeing Reactive with Spring Kris Galea 1
  • 2. What's all this about?!What's all this about?! Being Reactive .. huh ?Being Reactive .. huh ? Nothing to do with Facebook's React Framework! Face the challenges of popularity Building robust applications for when it matters most ..with.. Spring?..with.. Spring? Java framework better than sliced bread (or ftira) Java!Java!
  • 3. What's all this Reactive-ness?!What's all this Reactive-ness?! This fantastic thing called "The Internet" Di culties in dealing with growing number of requests Get to grips with the idea of Reactive Programming 2 . 2
  • 4. Let's get some things straight!Let's get some things straight! Publisher-Subscriber Messaging Pattern Data Streams Get technical ...Get technical ... Java 8/9 Spring 5 Super exciting demo of Reactive Spring!Super exciting demo of Reactive Spring! 2 . 3
  • 5. But rst! A little about us ...But rst! A little about us ... Hi!Hi!
  • 6. and something about yours truly...and something about yours truly... Email: kristiang@ccbill.comEmail: kristiang@ccbill.com Github: https://github.com/krisgaleaGithub: https://github.com/krisgalea Slides:Slides: https://www.slideshare.net/KrisGalea/being-https://www.slideshare.net/KrisGalea/being- reactive-with-springreactive-with-spring 3 . 2
  • 7. Where all this began ...Where all this began ... Welcome to ...Welcome to ... The InternetThe Internet
  • 8. The internet is growingThe internet is growing 4 . 2
  • 9. Challenges of a Growing InternetChallenges of a Growing Internet Number of requests increases E-Commerce: businesses are now online Multiple ways of scaling: hardware vs. software Maintaining consistency come rain or shine 4 . 3
  • 10. Let's talk ReactiveLet's talk Reactive
  • 11. A Set of Principles/GuidelinesA Set of Principles/Guidelines A software oriented approach to robustness Not, strictly speaking, anything technical A set of guidelines which motivate design decisions made from the ground up A way to ensure that applications are built to withstand the di culties of modern necessities 5 . 2
  • 12. One Manifesto to Rule them all ...One Manifesto to Rule them all ... 5 . 3
  • 13. Technically speaking ...Technically speaking ... Use of functional approach to allow an application to react to changes in the environment as they happen vs Use of data streams to transmit changes from the source to the destination Use of the publisher-subscriber pattern a:= b + c a:= changing(b) + changing(c) 5 . 4
  • 14. Let's try this out ...Let's try this out ... 5 . 5
  • 15. A word about Backpressure...A word about Backpressure... Hot vs Cold message emitting Push vs Pull vs Hybrid-push-pull 5 . 6
  • 16. Let's Get Down to Basics ...Let's Get Down to Basics ... 6
  • 18. Messaging Pattern (architectural) 3 main actors: Publisher , Subscriber and Subscription 7 . 2
  • 19. Subscribers subscribe to changes in the Publisher using a Subscription Publisher noti es of changes in its state Publisher is not aware of the Subscriber's details 7 . 3
  • 20. loose coupling Allows for easy scalability using a common Message Bus Message Broker can be as sophisticated or as dumb as needed 7 . 4
  • 22. A sequence of elements from a collection or data source Pipes data from a source to a destination Enforces statelessness (and immutability) Easily parallellised Allows chaining of Functional Operators In Java implemented plainly as Streams 8 . 2
  • 23. Functional Operator ChainingFunctional Operator Chaining 8 . 3
  • 24. Functional Operator ChainingFunctional Operator Chaining 8 . 4
  • 25. Functional Operator ChainingFunctional Operator Chaining 8 . 5
  • 26. 8 . 6
  • 27. Let's Get Technical!Let's Get Technical! 9
  • 28. Reactive and Java 8 & 9Reactive and Java 8 & 9
  • 30. Implementation of Streams as of Java 8Implementation of Streams as of Java 8 Use ofUse of Stream/Functional OperatorsStream/Functional Operators Intermediate Operators Terminal Operators List <Integer> numbers = List.of(2,3,4,5,6); numbers.stream().filter(number -> number > 4).forEach(num -> System.out.println(num)); 10 . 3
  • 35. A Java framework for enterprise quality applications Dependency Injection and Inversion of Control Convention over con guration Annotation based Provides a large tool set to quickly get up and running e.g. Spring Boot 11 . 2
  • 36. Spring Reactive Data TypesSpring Reactive Data Types 11 . 3
  • 38. Let's try all this out !Let's try all this out ! Let's pretend to process feeds from socialLet's pretend to process feeds from social networks ...networks ...
  • 39. That's it!That's it! In this talk we've learned:In this talk we've learned: What Reactive Programming is and why it's useful The core concepts used to implement Reactive Which industry tools are used to develop Reactive applications 13
  • 41. thx! <3thx! <3 Additional ReadingAdditional Reading Reactive Manifesto Reactive Spring Josh Long - Spring Reactive Intro to Rx ReactiveX Reactive Streams Spec 15