Spring Framework 5 introduces major updates to support reactive programming and non-blocking architectures. It fully supports Java 8 and 9 features and provides both annotation-based and functional programming styles. New additions include support for HTTP/2, reactive streams with Project Reactor, and functional Kotlin extensions. These changes help address challenges of blocking IO and improve latency, resource utilization, and code imperativity for reactive applications.
1 of 32
More Related Content
Spring framework 5: New Core and Reactive features
2. AGENDA
TIME TO LEARN MORE
▸ What awaits us with Spring 5?
▸ “Enterprise” challenges and Reactive changes
▸ Coding!
3. HISTORY
Started at 2002 by Rod Johnson & Juergen Hoeller
Company behind: Interface21, SpringSource, Pivotal
4. 2017
SPRING FRAMEWORK 4.3
Last release in 4.3 branch
support until 2019
will work with JDK 6,7,8,9
and Tomcat 6-9
Spring Framework 5 M5
Reactor 3
5. WHAT’S NEW
SPRING FRAMEWORK 5.0
Roadmap
‣ 5.0 M5 available now
‣ 5.0 RC1: April 2017
‣ 5.0 GA expected at in June (wait for JDK9 GA)
JDK 8+, Servlet 3.1+, JMS 2.0+, JPA 2.1+, JUnit 5
Major baseline updates with Java EE 7
6. WHAT’S NEW
SPRING FRAMEWORK 5.0
Core updates
‣ Java 8 in the core
‣ Java 9 full compatibility, jigsaw
Web & Infrastructure
‣ HTTP/2 on client and server HTTP/2 Comes to Java
‣ Functional vs Annotation style
‣ Lambda oriented HTTP routing & processing
‣ spring-webflux
‣ Kotlin
SPR-13716
7. WHAT’S NEW
JDK9
‣ Many general improvements
* Compact Strings, G1, etc…
‣ Spring 4.3 and 5.0 can run on JDK9
‣ Frameworks jar’s as Jigsaw-compliant modules on module path
* Application module-info.java may refer framework modules
8. WHAT’S NEW
HTTP/2
‣ Servlet 4.0 – September 2017
* enforce support for HTTP/2 in Servlet containers
* API for stream prioritization and push resources
‣ Tomcat/Jetty/Undertow
* native HTTP/2 since in current Servlet 3.1
* Tomcat 8.5/9.0, Jetty 9.3, Undertow 1.3/1.4
‣ Spring Framework 5.1 will support Servlet 4.0
* as well as support for new JDK HTTP client
* 5.0 focus on native HTTP/2 on top of Tomcat, Jetty, Undertow
9. WHAT’S NEW
FUNCTIONAL STYLE
‣ Spring 4.3 summarize annotation history
* annotation based component model
‣ Spring 5 provides functional style API as an alternative
* pragmatic bean registration and endpoint composition
* no need for annotations or scanning
‣ Even better with Kotlin
* Java 8 style is nice
* Spring Kotlin’s extension make code even more concise
19. CURRENT STATE AND CHALLENGES
NON-BLOCKING IO
LATENCY REAL MATTERS
RESOURCE UTILIZATION
REACTIVE CODE
20. REACTIVEX CRASH COURSE
Stream Abstraction
▸ Functional, declarative programming model
▸ Combine, transform, reduce sequences
▸ Focus on what, not how
Stream (JDK8)
▸ Efficiently process collections
▸ Pull based and usable only once
▸ For non latency or infinite
Reactive Library
▸ Stream(JDK8) like API
▸ Push based
▸ Latency sensitive and infinite seqs