Presentation for a talk given at University of Malta in relation to industry direction of Reactive Programming and its adoption in Java and Spring as of their latest releases.
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
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
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
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
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
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