7. Reactive Streams is an initiative to provide a
standard for asynchronous stream processing
with non-blocking back pressure. This
encompasses efforts aimed at runtime
environments (JVM and JavaScript) as well as
network protocols.
- http://www.reactive-streams.org/
10. Reactive Streams is an initiative to provide a
standard for asynchronous stream processing
with non-blocking back pressure. This
encompasses efforts aimed at runtime
environments (JVM and JavaScript) as well as
network protocols.
- http://www.reactive-streams.org/
28. Project Reactor
Ÿ Reactive Streams Library for JVM
Ÿ Declarative operations similar to Java 8 Streams
Ÿ Flux and Mono reactive composable API types
Ÿ Compatible with RxJava,
37. Ÿ Oracle, MySQL
Ÿ A database access API for Java that does not block user
threads
Ÿ Target high throughput apps
From: JDBC Next by Douglas Surber (JavaOne 2016)
NonBlocking JDBC Access to Oracle,Mysql
39. Spring 5 - Reactive Web Controller
@Controller
Public class UserController {
private final UserRepository userRepository;
public UserController(UserRepository userRepository) {
this.userRepository = userRepository; }
@GetMapping(“/users/{id}”)
public Mono<User> getUser(@PathVariable Long id) {
return this.userRepository.findOne(id);}
@PostMapping(“/users”)
public Mono<Void> addUser(@RequestBody User user) {
return this.userRepository.save(user);}
}
(Controller) - (Repository)
40. Spring 5 - Reactive Web Framework
public interface ReactiveHttpInputMessage extends HttpMessage {
Flux<DataBuffer> getBody();
}
public interface ReactiveHttpOutputMessage extends HttpMessage {
Mono<Void> writeWith(Publisher<DataBuffer> body);
}
(Framework) - (Controller) - (Repository)
41. Spring 5 – Reactive HTTP Server
Ÿ Servlet 3.1 Bridge
Ÿ Undertow in spring-web
Ÿ Reactor Netty
Ÿ RxNetty
Ÿ Reactive Stream Bridge to Tomcat and Jetty
(HTTP Server) - (Framework) - (Controller) - (Repository)