Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Spring boot 2.0 reactive bits (June 2018)

108 Aufrufe

Veröffentlicht am

Demo repo:
https://github.com/reactor/head-first-reactive-with-spring-and-reactor

Veröffentlicht in: Software
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Spring boot 2.0 reactive bits (June 2018)

  1. 1. REACTIVE SPRING SPRING BOOT 2 ❤ REACTOR @smaldini @madhurabhave23
  2. 2. SHIPS WITH SPRING FRAMEWORK 5.0
  3. 3. WHY REACTIVE SPRING? SERVLET STACK ✅
  4. 4. WHY REACTIVE SPRING? 🐌 Gateway Service 2 Service 1 DB Service 1 Service 2Gateway
  5. 5. DEMO
  6. 6. WHY REACTIVE SPRING? 🐌 Gateway Service 2 Service 1 DB Service 1 Service 2Gateway
  7. 7. 🐌 Service 1 Service 2Gateway 😱 Gateway Service 2 Service 1 DB WHY REACTIVE SPRING? TRY REACTIVE STACK 👍
  8. 8. WHY REACTIVE I/O?
  9. 9. BLOCKING I/O REQUEST RESPONSE
  10. 10. REQUEST RESPONSE NON - BLOCKING I/O EVENT LOOP
  11. 11. READ, WRITE, CLOSE AND MORE BECOME EVENTS Event Driven Requests IO Event Register Complete Intensive Op
  12. 12. REQUEST(2)REQUEST(2) REACTIVE I/O
  13. 13. PENDING REQUEST FRAGMENTS REACTIVE I/O
  14. 14. REQUEST(2) REACTIVE I/O
  15. 15. Slow client (mobile network) backend call app timers What drives request(n) ? combining backend calls
  16. 16. GETTING REACTIVE WITH REACTOR
  17. 17. rxjava 1.x reactor 2.x reactive streams common rxjava 2.x reactor 3.x reactive-streams rx   😎 spring 🍷🍷🍷 🍷
  18. 18. Reactive Streams sample extract reactive-streams.org
  19. 19. Flux.range(from, count)
  20. 20. FLUX<T>MONO<T>
  21. 21. DEMO
  22. 22. SPRING FRAMEWORK 5.0 FOR KOOL KIDS
  23. 23. WEBFLUX.FN: FUNCTIONAL ROUTING RouterFunction<?> route = route(GET("/person/{id}"), request -> { Mono<Person> person = Mono.justOrEmpty(request.pathVariable("id")) .map(Integer::valueOf) .then(repository::getPerson); return ServerResponse.ok().body(fromPublisher(person, Person.class)); }) .and(route(POST("/person"), request -> { Mono<Person> person = request.body(toMono(Person.class)); return ServerResponse.ok().build(repository.savePerson(person)); })); TRY IT IN KOTLIN 👍
  24. 24. METRICS SUPPORT WITH MICROMETER
  25. 25. MICROMETER PROVIDED BY SPRING BOOT ▸ Auto-configuration for metrics instrumentation library - Micrometer ▸ Hierarchical metrics replaced by dimensional metrics ▸ Facade over multiple monitoring systems
  26. 26. REACTIVE ACTUATOR ENDPOINTS ▸ Works with Spring WebFlux ▸ Reactive Health Indicators
  27. 27. DEMO
  28. 28. REACTIVE SPRING SECURITY
  29. 29. REACTIVE SECURITY ▸ Non-Blocking authentication support ▸ Reactive method security ▸ Auto-configuration for Spring WebFlux security ▸ Convenient security request matchers for reactive actuator endpoints
  30. 30. DEMO
  31. 31. BUILD, SECURE AND MONITOR EFFICIENT APPLICATIONS
  32. 32. AND THERE IS MORE (NEXT TIME MAYBE!) ▸ Spring Data Reactive ▸ Spring Cloud Reactive ▸ Reactive messaging (rabbitmq, kafka, grpc, rsocket…)
  33. 33. THANKS! https://github.com/reactor/head-first-reactive-with-spring-and-reactor/tree/complete

×