Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Spring Framework 5: History and Reactive features

794 views

Published on

Spring Framework 5 history and introduction to new Reactive features.

Published in: Technology
  • Be the first to comment

Spring Framework 5: History and Reactive features

  1. 1. SPRING FRAMEWORK 5 FAST AND FURIOUS Aliaksei Zhynhiarouski
 TechTalk, 2.2017
  2. 2. AGENDA TIME TO LEARN MORE ▸ History of Spring Framework from version 1 to 5 ▸ Current state of “Enterprise” Java and challenges ▸ What awaits us with Spring 5? ▸ Coding!
  3. 3. 2002 PROTOTYPE IN THE BOOK Rod Johnson “Expert One-on-One J2EE Design and Development” with no mention of Spring 30k LOC under com.interface21 Check code on Github Juergen Hoeller open source book code with new name Spring where Spring means spring after J2EE winter
  4. 4. 2003 INTERFACE 21 & SPRING 0.9
  5. 5. 2004 SPRING 1.0 Others frameworks integration (Struts/Hibernate) AOP support with AspectJ New books about Spring Big growth of popularity
  6. 6. 2005 SPRING 1.2.6 400k Downloads Lead AspectJ now with Spring team
  7. 7. 2006 SPRING 2.0 & 1_000_000 DOWNLOADS Spring Security Spring Web Flow Spring LDAP
  8. 8. 2007 SPRING 2.5 Investments $10m & 3m Downloads From Interface21 to SpringSource Spring Integration is announced Spring Webservice is announced Spring Batch is announced
  9. 9. 2008 GROOVY Acquired G2One – company behind Groovy & Grails Spring Batch 1.0 Spring Integration 1.0 Spring Team behind projects like Tomcat, Apache HTTP Server Cloud Foundry – PaaS provider Hyperic – tools for monitoring Java
  10. 10. 2009 SPRING 3.0 & VMWARE SpringSource acquired by VMWare for $420m Spring 3: ‣ JDK 5+ ‣ Modularize uber Jar ‣ Comprehensive REST support ‣ Spring Expression Language
  11. 11. 2010-2011 SPRING DATA & SPRING AMQP VMWare bought RabbitMQ company spring-data-commons spring-data-jpa spring-data-mongoDB spring-data-redis
  12. 12. 2013 SPRING 4.0 & PIVOTAL Pivotal was born Reactor 1.0 Spring IO Platform announced Spring Boot introduced JDK 8 and WebSocket support SPR-9044
  13. 13. 2014-2015 SPRING BOOT Spring Boot 1.0 Released Spring XD 1.0 Released Bye-Bye Groovy 😥 Spring Cloud available (with Netflix OSS) Spring Framework 4.2.3 in the end of 2015
  14. 14. 2016 SPRING FRAMEWORK 4.3 Last release in 4.3 branch support until 2020 will work with JDK 6,7,8,9 and Tomcat 6-9 Spring Framework 5 M4 Reactor 3
  15. 15. CURRENT STATE AND CHALLENGES DO WE NEED TO CHANGE?
  16. 16. CURRENT STATE AND CHALLENGES HOW TO ASYNC LATENCY REAL MATTERS RESOURCE UTILIZATION IMPERATIVE CODE
  17. 17. SERVLET CONTAINER IN NUTSHELL
  18. 18. SERVLET CONTAINER IN NUTSHELL
  19. 19. FIX SERVLET CONTAINERS
  20. 20. THERE IS ANOTHER WAY
  21. 21. REACTOR/EVENT-LOOP
  22. 22. REACTOR/EVENT-LOOP
  23. 23. HOW TO WRITE NON BLOCKING CALLBACKS }); 
 });
 });
 }); COMPLETABLE FUTURE since JDK 8 Completable Future + java.util.Stream RX
  24. 24. CURRENT STATE AND CHALLENGES NON-BLOCKING IO LATENCY REAL MATTERS RESOURCE UTILIZATION REACTIVE CODE
  25. 25. 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
  26. 26. FLUX<T>
  27. 27. MONO<T>
  28. 28. HOW TO WRITE NON BLOCKING REACTIVE STREAMS ▸ Specification for non-blocking libs interoperability ▸ Collaborative effort: Netflix, Pivotal, RedHat, Twitter, Lightbend ▸ JDK9 adoption java.util.concurrent.Flow ▸ Only 4 Interfaces http://www.reactive-streams.org https://spring.io/blog/2016/04/19/understanding-reactive-types
  29. 29. ONLY 4 INTERFACES
  30. 30. REACTIVE STREAMS The core concern of Reactive Streams is handling backpressure. In a nutshell, backpressure is a mechanism that permits a receiver to ask how much data it wants to receive from the emitter. It allows: ▸ The receiver to start receiving data only when it is ready to process it ▸ To control the inflight amount of data ▸ Efficient handling of slow emitter/fast receiver or fast emitter/slow receiver use cases
  31. 31. SPRING 5 SPRING + REACTOR + RX = 🌞
  32. 32. REACTIVE STREAMS EVERYWHERE
  33. 33. REACTIVE STREAMS EVERYWHERE
  34. 34. UNDER THE HOOD
  35. 35. WHAT’S NEW SPRING FRAMEWORK 5.0 Core updates ‣ Java 8 in the core ‣ Java 9 full compatibility, no jigsaw Web ‣ HTTP/2 on client and server HTTP/2 Comes to Java ‣ Reactive Streams based controllers ‣ Alternatives to annotated controllers handlers design ‣ Lambda oriented HTTP routing & processing ‣ Kotlin SPR-13716
  36. 36. WHAT’S NEW SPRING FRAMEWORK 5.0 Roadmap ‣ 5.0 M4 available now ‣ 5.0 RC1: Dec 2016/Jan 2017 ‣ 5.0 GA wait for JDK9 GA JDK 8+, Servlet 3.1, JMS 2.0+, JPA 2.1+, JUnit 5 Major baseline updates with Java EE 7
  37. 37. JAVA PROFESSIONALS BY
  38. 38. LINKS Aliaksei Zhynhiarouski
 twitter: @a_lithium http://www.reactive-streams.org https://spring.io/blog/2016/04/19/understanding-reactive-types Notes on Reactive Programming Part I Notes on Reactive Programming Part II Notes on Reactive Programming Part III https://github.com/aliaksei-lithium/spring5demo

×