SlideShare a Scribd company logo
1 of 52
Download to read offline
SPRINGONE2GX
WASHINGTON, DC
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Web Applications
Stephane Maldini
Rossen Stoyanchev
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
About the Speakers
• Stephane Maldini
• Reactor Project Lead
• Reactive Streams Spec contributor
• Rossen Stoyanchev
• Spring Framework committer
• Spring MVC
• WebSocket messaging (STOMP, SockJS)
2
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3
Why are you here ?
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 4
What is Reactive ?
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 5
Why Non Blocking Matters ?
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 6
Non Blocking = Faster ?
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 7
Non Blocking = Internet Scale ?
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 8
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Web App Stack
9
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Servlet 3.0 Async Requests
• Async HTTP requests have been possible since Servlet 3.0
• Essentially: the ability to get off the Servlet container thread
• originated from Jetty continuations, CometD, etc.
• “Live” data in web apps
• e.g. HTTP streaming, long polling
• Reduce burden on server thread pool
• scatter-gather, external REST APIs, etc
10
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
• A bit quirky, Servlet API wasn’t built for async
• Complex to grasp in its entirety + comes with some caveats
• e.g. lack of notification when client goes away
• Spring MVC provides full support for Servlet 3 async requests
• alleviates most concerns
• Effectively async can be introduced into existing applications
• … and ecosystem of libraries !
Servlet 3.0 Async Requests: the bottom line
11
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Servlet 3.1 Non-Blocking I/O
• Read and write without blocking
• Register ReadListener and WriteListener callbacks
• switches to non-blocking mode
• ServletInputStream and ServletOutputStream change behavior
• Must call isReady first before read() or write()
• if connection not ready (slow client), callback is scheduled
12
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Servlet 3.1 Non-Blocking: the bottom line
• Carefully designed + it does provide non-blocking capability
• However not easy to use correctly, a number of pitfalls
• Many “innocent” looking parts of Servlet API may lead to blocking
• e.g. request.getParameters()
• For a good overview and perspective see Greg Wilkins’ talk
• ”Into the Wild with Servlet 3.1 Async I/O”
13
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Streams Spec for the JVM
• Specification for non-blocking library interop
• governs exchange of data across async boundaries
• Collaborative effort
• Kaazing, Netflix, Pivotal, RedHat, Twiiter, Typesafe
• Momentum and growing ecosystem of libraries
• network, database, etc.
• On path to adoption in JDK 9 java.util.concurrent
14
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 15
onSubscribe
onNext*
(onError|onComplete)?
Publisher
Subscriber
Subscription
Reactive Streams API
request(n)
cancel()
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Back-Pressure
• A key part of Reactive Streams is back-pressure
• It’s a type of flow control
• Subscribers make requests for additional data
• Publishers abide and produce what has been requested
16
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Streams for Network I/O
public interface ServerHttpRequest extends HttpRequest {
Publisher<byte[]> getBody();
}
public interface ServerHttpResponse extends HttpMessage {
Publisher<Void> writeWith(Publisher<byte[]> publisher);
}
17
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Instead of...
public interface ServerHttpRequest extends HttpRequest {
InputStream getBody();
}
public interface ServerHttpResponse extends HttpMessage {
OutputStream getBody();
}
18
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Streams over Servlet Runtime ?
• Servlet 3.1 provides the non-blocking capability
• Reactive Streams provides a non-blocking API with broad industry support
• A single Reactive Streams pipeline
• back-pressure through the layers (from DB to Web server)
• Jetty is actively investigating this very option
19
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Streams and Servlet 4.0 ???
• It is under discussion in the expert group
• It would be great if it did happen
• Potential obstacle is the Java EE 8 - JDK 8 association
• Hopefully not a show-stopper since Reactive Streams is here today
20
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
• Netty was designed from the ground up to be non-blocking
• Easy to translate to Reactive Streams semantics
• Two ongoing experiments
• RxNetty
• Reactor Net
Reactive Streams Over Netty
21
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Streams Network I/O
Akka HTTP, Vert.x, Ratpack, Reactor Net, RxNetty*
22
*(via RxJava-ReactiveStreams bridge)
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 23
Netty, Servlet 3.1
Reactive Streams
Reactive
Web App Stack
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 24
Web Framework
Netty, Servlet 3.1
Reactive Streams
Reactive
Web App Stack
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 25
Web Framework
Application
Netty, Servlet 3.1
Reactive Streams
Reactive
Web App Stack
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 26
Web Framework
Application
Netty, Servlet 3.1
Reactive Streams
Reactive
Streams
HTTP
Data
Broker
Reactive
Web App Stack
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
?
27
Web Framework
Application
Netty, Servlet 3.1
Reactive Streams
Reactive
Streams
HTTP
Data
Broker
?
API to compose
asynchronous
streams?
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Working with Streams
• Non-blocking services return Publisher<T> instead of <T>
• How do you attach further processing?
• Reactive Streams is a callback-based API
• becomes very nested quickly
• Need something more declarative
• it’s beyond the scope of Reactive Streams
28
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
• Publisher represents a stream of data
• It’s natural to apply operations functional-style
• like the Java 8 Stream
• Need API for composing async logic
• rise above callbacks
Stream Operations
29
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactor Stream
• Project Reactor provides a Stream API
• Reactive Streams Publisher + composable operations
30
Streams.just('a' 'b' 'c')
.take(2)
.map(Character::toUpperCase)
.consume(System.out::println);
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Extensions (Rx)
• Stream composition API based on Observer pattern
• originated at Microsoft, work by Erik Meijer
• Implemented for different languages -- RxJava, RxJS, Rx.NET, …
31
Observable.just('a', 'b', 'c')
.take(2)
.map(Character::toUpperCase)
.subscribe(System.out::println);
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
RxJava and Reactive Streams
• RxJava 1.x predates Reactive Streams and doesn’t implement it directly
• Very similar concepts, different names
• Observable-Observer vs Publisher-Subscriber
• RxJava supports “reactive pull” back-pressure
• RxJava 1.x - Reactive Streams bridge
32
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Demo:
HeadFirst
33
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
RxNetty
• RxJava as the reactive bridge to Netty IO operations
• Immediate and embedded client/server for TCP and HTTP
• Decorating IO Read with rx.Observable and applying dynamic pull/push
• Decorating IO Write with rx.Subscriber and requesting more on flush
34
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
RxNetty … what’s up
• RxNetty has introduced Backpressure support in 0.5
• Powered by the backpressure protocol from RxJava
• Overall the API has been heavily lifted too
https://github.com/ReactiveX/RxNetty/wiki/0.5.x-FAQs
35
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactor Net
36
• Reactive Streams as the reactive bridge to Netty and ZeroMQ IO operations
• Immediate and embedded client/server for TCP, UDP and HTTP
• Decorating IO Read with Publisher and applying dynamic pull/push
• Decorating IO Write with Subscriber and requesting more on flush
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Member of the Reactor initiative
• Reactor is a maturing Reactive Streams suite of libraries
• As with a lot of the reactive libraries, observing a rapidly evolving set of API
• Precluded Reactive Streams specification work
• Now evolving and getting ready for Spring 5 Reactive story
projectreactor.io , github.com/reactor
37
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Demo:
Back-Pressure
38
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Async I/O with Reactive Streams
• Never block on Applications Queues :
Max(request) == Queue.capacity()
• Keep Reading : Any asynchronous handoff is non-blocking
• Make Writes Quicker : IO operation signals demand on availability
• Optimize hardware resources : Claim bounded memory and cpu
39
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Read
One read implementation : Publisher stop-read
• Consume NIO Buffers only when requested
• request size is != bytes read
• Application stopping reads propagates back-pressure
• server buffers fill
• client buffers fill
• eventually throttles client
40
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Write
One write implementation : Subscriber request after flush
• Request after flush indicates availability in write buffer
• Request size is != bytes written
• Write buffers filling naturally propagates back-pressure
• buffers fill
• no requests
• eventually throttles application
41
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Serialization Concerns
• Subscription.request(n)is not absolute ( != bytes number )
• Decoding operations might produce one to many objects
• must match subscriber capacity
• Encoding operations might consume one to many byte chunks
• must match buffering capacity
• Available serialization libraries not built for chunked streams
• Jackson, Kryo, Protobuf, etc.
42
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Demo:
Scatter-gather
43
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Reactive
44
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Reactive
• Experimental work for Spring Framework 5
• Non-blocking runtimes -- Netty, Jetty, Tomcat
• Reactive Streams over network I/O -- RxNetty, Reactor Net
• Spring web processing
45
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
@RequestMapping("/capitalize")
@ResponseBody
public Publisher<Person> capitalize(@RequestBody Publisher<Person> persons) {
// …
}
46
Reactive Streams Publisher
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
@RequestMapping("/capitalize")
@ResponseBody
public Stream<Person> capitalize(@RequestBody Stream<Person> persons) {
return persons.map(person -> {
person.setName(person.getName().toUpperCase());
return person;
});
}
47
Reactor Stream
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
@RequestMapping("/capitalize")
@ResponseBody
public Observable<Person> capitalize(@RequestBody Observable<Person> persons) {
return persons.map(person -> {
person.setName(person.getName().toUpperCase());
return person;
});
}
48
RxJava Observable
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
ReactiveX On the Client Side
49
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
RxJS
function() {
StreamService.connect("stream")
.flatMap(unpackCsv)
.subscribe(updateUI, logError, logComplete);
}
var unpackCsv = function (ev) {
return Rx.Observable.from(ev.data ? ev.data.split("n") : [])
.filter(discardEmpty)
.map(csvToJson)
}
50
Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Demo:
RxJS and Ratpack
51
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 52
Learn More. Stay Connected.
@springcentral Spring.io/video
Thank You for Listening!
@smaldini / @rstoya05

More Related Content

What's hot

High performance stream processing
High performance stream processingHigh performance stream processing
High performance stream processingGlenn Renfro
 
Reactive frontends with RxJS and Angular
Reactive frontends with RxJS and AngularReactive frontends with RxJS and Angular
Reactive frontends with RxJS and AngularVMware Tanzu
 
Building Highly Scalable Spring Applications using In-Memory Data Grids
Building Highly Scalable Spring Applications using In-Memory Data GridsBuilding Highly Scalable Spring Applications using In-Memory Data Grids
Building Highly Scalable Spring Applications using In-Memory Data GridsJohn Blum
 
Data Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationData Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationAlvaro Videla
 
P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersVMware Tanzu
 
RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...
RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...
RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...VMware Tanzu
 
Modern messaging with RabbitMQ, Spring Cloud and Reactor
Modern messaging with RabbitMQ, Spring Cloud and ReactorModern messaging with RabbitMQ, Spring Cloud and Reactor
Modern messaging with RabbitMQ, Spring Cloud and Reactoracogoluegnes
 
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...Luis Lopez
 
WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)Luis Lopez
 
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96Boni García
 
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...Luis Lopez
 
Developing rich multimedia applications with FI-WARE.
Developing rich multimedia applications with FI-WARE.Developing rich multimedia applications with FI-WARE.
Developing rich multimedia applications with FI-WARE.Luis Lopez
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesVMware Tanzu
 
Implementing Raft in RabbitMQ
Implementing Raft in RabbitMQImplementing Raft in RabbitMQ
Implementing Raft in RabbitMQVMware Tanzu
 
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...Boni García
 
Kurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTCKurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTCLuis Lopez
 
Developing applications with Kurento
Developing applications with KurentoDeveloping applications with Kurento
Developing applications with KurentoLuis Lopez
 
Consumer Driven Contracts and Your Microservice Architecture
Consumer Driven Contracts and Your Microservice ArchitectureConsumer Driven Contracts and Your Microservice Architecture
Consumer Driven Contracts and Your Microservice ArchitectureVMware Tanzu
 
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...Luis Lopez
 

What's hot (20)

High performance stream processing
High performance stream processingHigh performance stream processing
High performance stream processing
 
Reactive frontends with RxJS and Angular
Reactive frontends with RxJS and AngularReactive frontends with RxJS and Angular
Reactive frontends with RxJS and Angular
 
Building Highly Scalable Spring Applications using In-Memory Data Grids
Building Highly Scalable Spring Applications using In-Memory Data GridsBuilding Highly Scalable Spring Applications using In-Memory Data Grids
Building Highly Scalable Spring Applications using In-Memory Data Grids
 
Data Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationData Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring Integration
 
P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to Containers
 
RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...
RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...
RDBMS and Apache Geode Data Movement: Low Latency ETL Pipeline By Using Cloud...
 
Modern messaging with RabbitMQ, Spring Cloud and Reactor
Modern messaging with RabbitMQ, Spring Cloud and ReactorModern messaging with RabbitMQ, Spring Cloud and Reactor
Modern messaging with RabbitMQ, Spring Cloud and Reactor
 
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
 
WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)
 
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
 
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
 
NUBOMEDIA Webinar
NUBOMEDIA WebinarNUBOMEDIA Webinar
NUBOMEDIA Webinar
 
Developing rich multimedia applications with FI-WARE.
Developing rich multimedia applications with FI-WARE.Developing rich multimedia applications with FI-WARE.
Developing rich multimedia applications with FI-WARE.
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
 
Implementing Raft in RabbitMQ
Implementing Raft in RabbitMQImplementing Raft in RabbitMQ
Implementing Raft in RabbitMQ
 
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
 
Kurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTCKurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTC
 
Developing applications with Kurento
Developing applications with KurentoDeveloping applications with Kurento
Developing applications with Kurento
 
Consumer Driven Contracts and Your Microservice Architecture
Consumer Driven Contracts and Your Microservice ArchitectureConsumer Driven Contracts and Your Microservice Architecture
Consumer Driven Contracts and Your Microservice Architecture
 
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
 

Viewers also liked

Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysManuel Bernhardt
 
Reactive design: languages, and paradigms
Reactive design: languages, and paradigmsReactive design: languages, and paradigms
Reactive design: languages, and paradigmsDean Wampler
 
Reactive Programming in Spring 5
Reactive Programming in Spring 5Reactive Programming in Spring 5
Reactive Programming in Spring 5poutsma
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
Building Evented Single Page Applications
Building Evented Single Page ApplicationsBuilding Evented Single Page Applications
Building Evented Single Page ApplicationsSteve Smith
 
Reactive web applications
Reactive web applicationsReactive web applications
Reactive web applicationsJuan Sandoval
 
Reactive programming
Reactive programmingReactive programming
Reactive programmingJianbin LIN
 
Reactive Software Systems
Reactive Software SystemsReactive Software Systems
Reactive Software SystemsBehrad Zari
 
The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...
The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...
The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...Codemotion
 
Reactive Systems And Vertx
Reactive Systems And VertxReactive Systems And Vertx
Reactive Systems And VertxOkay Aslan
 
Map Reduce in Hazelcast - Hazelcast User Group London Version
Map Reduce in Hazelcast - Hazelcast User Group London VersionMap Reduce in Hazelcast - Hazelcast User Group London Version
Map Reduce in Hazelcast - Hazelcast User Group London VersionChristoph Engelbert
 
What is Reactive programming?
What is Reactive programming?What is Reactive programming?
What is Reactive programming?Kevin Webber
 
Vert.x introduction
Vert.x introductionVert.x introduction
Vert.x introductionGR8Conf
 
Can Single Page Applications Deliver a World-Class Web UX?
Can Single Page Applications Deliver a World-Class Web UX?Can Single Page Applications Deliver a World-Class Web UX?
Can Single Page Applications Deliver a World-Class Web UX?UXPA International
 
Modern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.xModern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.xThomas Segismont
 
Securing Single-Page Applications with OAuth 2.0
Securing Single-Page Applications with OAuth 2.0Securing Single-Page Applications with OAuth 2.0
Securing Single-Page Applications with OAuth 2.0Prabath Siriwardena
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMManuel Bernhardt
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMMassimiliano Dessì
 

Viewers also liked (20)

Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
 
Reactive design: languages, and paradigms
Reactive design: languages, and paradigmsReactive design: languages, and paradigms
Reactive design: languages, and paradigms
 
Reactive Programming in Spring 5
Reactive Programming in Spring 5Reactive Programming in Spring 5
Reactive Programming in Spring 5
 
Reactive Spring Framework 5
Reactive Spring Framework 5Reactive Spring Framework 5
Reactive Spring Framework 5
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Building Evented Single Page Applications
Building Evented Single Page ApplicationsBuilding Evented Single Page Applications
Building Evented Single Page Applications
 
Reactive web applications
Reactive web applicationsReactive web applications
Reactive web applications
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Reactive Software Systems
Reactive Software SystemsReactive Software Systems
Reactive Software Systems
 
The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...
The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...
The Reactive Manifesto: Message-driven, Resilient, Elastic, Responsive - Stef...
 
Reactive Systems And Vertx
Reactive Systems And VertxReactive Systems And Vertx
Reactive Systems And Vertx
 
Map Reduce in Hazelcast - Hazelcast User Group London Version
Map Reduce in Hazelcast - Hazelcast User Group London VersionMap Reduce in Hazelcast - Hazelcast User Group London Version
Map Reduce in Hazelcast - Hazelcast User Group London Version
 
What is Reactive programming?
What is Reactive programming?What is Reactive programming?
What is Reactive programming?
 
Vert.x introduction
Vert.x introductionVert.x introduction
Vert.x introduction
 
Can Single Page Applications Deliver a World-Class Web UX?
Can Single Page Applications Deliver a World-Class Web UX?Can Single Page Applications Deliver a World-Class Web UX?
Can Single Page Applications Deliver a World-Class Web UX?
 
Node.js architecture (EN)
Node.js architecture (EN)Node.js architecture (EN)
Node.js architecture (EN)
 
Modern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.xModern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.x
 
Securing Single-Page Applications with OAuth 2.0
Securing Single-Page Applications with OAuth 2.0Securing Single-Page Applications with OAuth 2.0
Securing Single-Page Applications with OAuth 2.0
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVM
 

Similar to SpringOne2GX Reactive Web Apps

Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Daniel Woods
 
Spring MVC 4.2: New and Noteworthy
Spring MVC 4.2: New and NoteworthySpring MVC 4.2: New and Noteworthy
Spring MVC 4.2: New and NoteworthyRossen Stoyanchev
 
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...VMware Tanzu
 
Designing, Implementing, and Using Reactive APIs
Designing, Implementing, and Using Reactive APIsDesigning, Implementing, and Using Reactive APIs
Designing, Implementing, and Using Reactive APIsVMware Tanzu
 
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...cornelia davis
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaJoe Stein
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Springsdeeg
 
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...VMware Tanzu
 
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...VMware Tanzu
 
SpringOnePlatform2017 recap
SpringOnePlatform2017 recapSpringOnePlatform2017 recap
SpringOnePlatform2017 recapminseok kim
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET MicroservicesVMware Tanzu
 
Cloud-Native Streaming and Event-Driven Microservices
Cloud-Native Streaming and Event-Driven MicroservicesCloud-Native Streaming and Event-Driven Microservices
Cloud-Native Streaming and Event-Driven MicroservicesVMware Tanzu
 
Spring Integration Done Bootifully
Spring Integration Done BootifullySpring Integration Done Bootifully
Spring Integration Done BootifullyGlenn Renfro
 
It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?VMware Tanzu
 
Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...
Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...
Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...confluent
 
riffing on Knative - Scott Andrews
riffing on Knative - Scott Andrewsriffing on Knative - Scott Andrews
riffing on Knative - Scott AndrewsVMware Tanzu
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with IstioVMware Tanzu
 
Migrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring DevelopersMigrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring DevelopersGunnar Hillert
 
Cloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud ServicesCloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud ServicesVMware Tanzu
 
The Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring CloudThe Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring CloudVMware Tanzu
 

Similar to SpringOne2GX Reactive Web Apps (20)

Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
 
Spring MVC 4.2: New and Noteworthy
Spring MVC 4.2: New and NoteworthySpring MVC 4.2: New and Noteworthy
Spring MVC 4.2: New and Noteworthy
 
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
 
Designing, Implementing, and Using Reactive APIs
Designing, Implementing, and Using Reactive APIsDesigning, Implementing, and Using Reactive APIs
Designing, Implementing, and Using Reactive APIs
 
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Spring
 
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
 
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
 
SpringOnePlatform2017 recap
SpringOnePlatform2017 recapSpringOnePlatform2017 recap
SpringOnePlatform2017 recap
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET Microservices
 
Cloud-Native Streaming and Event-Driven Microservices
Cloud-Native Streaming and Event-Driven MicroservicesCloud-Native Streaming and Event-Driven Microservices
Cloud-Native Streaming and Event-Driven Microservices
 
Spring Integration Done Bootifully
Spring Integration Done BootifullySpring Integration Done Bootifully
Spring Integration Done Bootifully
 
It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?
 
Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...
Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...
Kafka Summit NYC 2017 - Cloud Native Data Streaming Microservices with Spring...
 
riffing on Knative - Scott Andrews
riffing on Knative - Scott Andrewsriffing on Knative - Scott Andrews
riffing on Knative - Scott Andrews
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
Migrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring DevelopersMigrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring Developers
 
Cloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud ServicesCloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud Services
 
The Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring CloudThe Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring Cloud
 

Recently uploaded

GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 

Recently uploaded (20)

GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 

SpringOne2GX Reactive Web Apps

  • 1. SPRINGONE2GX WASHINGTON, DC Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Web Applications Stephane Maldini Rossen Stoyanchev
  • 2. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ About the Speakers • Stephane Maldini • Reactor Project Lead • Reactive Streams Spec contributor • Rossen Stoyanchev • Spring Framework committer • Spring MVC • WebSocket messaging (STOMP, SockJS) 2
  • 3. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3 Why are you here ?
  • 4. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 4 What is Reactive ?
  • 5. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 5 Why Non Blocking Matters ?
  • 6. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 6 Non Blocking = Faster ?
  • 7. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 7 Non Blocking = Internet Scale ?
  • 8. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 8
  • 9. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Web App Stack 9
  • 10. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Servlet 3.0 Async Requests • Async HTTP requests have been possible since Servlet 3.0 • Essentially: the ability to get off the Servlet container thread • originated from Jetty continuations, CometD, etc. • “Live” data in web apps • e.g. HTTP streaming, long polling • Reduce burden on server thread pool • scatter-gather, external REST APIs, etc 10
  • 11. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ • A bit quirky, Servlet API wasn’t built for async • Complex to grasp in its entirety + comes with some caveats • e.g. lack of notification when client goes away • Spring MVC provides full support for Servlet 3 async requests • alleviates most concerns • Effectively async can be introduced into existing applications • … and ecosystem of libraries ! Servlet 3.0 Async Requests: the bottom line 11
  • 12. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Servlet 3.1 Non-Blocking I/O • Read and write without blocking • Register ReadListener and WriteListener callbacks • switches to non-blocking mode • ServletInputStream and ServletOutputStream change behavior • Must call isReady first before read() or write() • if connection not ready (slow client), callback is scheduled 12
  • 13. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Servlet 3.1 Non-Blocking: the bottom line • Carefully designed + it does provide non-blocking capability • However not easy to use correctly, a number of pitfalls • Many “innocent” looking parts of Servlet API may lead to blocking • e.g. request.getParameters() • For a good overview and perspective see Greg Wilkins’ talk • ”Into the Wild with Servlet 3.1 Async I/O” 13
  • 14. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Streams Spec for the JVM • Specification for non-blocking library interop • governs exchange of data across async boundaries • Collaborative effort • Kaazing, Netflix, Pivotal, RedHat, Twiiter, Typesafe • Momentum and growing ecosystem of libraries • network, database, etc. • On path to adoption in JDK 9 java.util.concurrent 14
  • 15. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 15 onSubscribe onNext* (onError|onComplete)? Publisher Subscriber Subscription Reactive Streams API request(n) cancel()
  • 16. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Back-Pressure • A key part of Reactive Streams is back-pressure • It’s a type of flow control • Subscribers make requests for additional data • Publishers abide and produce what has been requested 16
  • 17. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Streams for Network I/O public interface ServerHttpRequest extends HttpRequest { Publisher<byte[]> getBody(); } public interface ServerHttpResponse extends HttpMessage { Publisher<Void> writeWith(Publisher<byte[]> publisher); } 17
  • 18. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Instead of... public interface ServerHttpRequest extends HttpRequest { InputStream getBody(); } public interface ServerHttpResponse extends HttpMessage { OutputStream getBody(); } 18
  • 19. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Streams over Servlet Runtime ? • Servlet 3.1 provides the non-blocking capability • Reactive Streams provides a non-blocking API with broad industry support • A single Reactive Streams pipeline • back-pressure through the layers (from DB to Web server) • Jetty is actively investigating this very option 19
  • 20. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Streams and Servlet 4.0 ??? • It is under discussion in the expert group • It would be great if it did happen • Potential obstacle is the Java EE 8 - JDK 8 association • Hopefully not a show-stopper since Reactive Streams is here today 20
  • 21. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ • Netty was designed from the ground up to be non-blocking • Easy to translate to Reactive Streams semantics • Two ongoing experiments • RxNetty • Reactor Net Reactive Streams Over Netty 21
  • 22. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Streams Network I/O Akka HTTP, Vert.x, Ratpack, Reactor Net, RxNetty* 22 *(via RxJava-ReactiveStreams bridge)
  • 23. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 23 Netty, Servlet 3.1 Reactive Streams Reactive Web App Stack
  • 24. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 24 Web Framework Netty, Servlet 3.1 Reactive Streams Reactive Web App Stack
  • 25. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 25 Web Framework Application Netty, Servlet 3.1 Reactive Streams Reactive Web App Stack
  • 26. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 26 Web Framework Application Netty, Servlet 3.1 Reactive Streams Reactive Streams HTTP Data Broker Reactive Web App Stack
  • 27. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ? 27 Web Framework Application Netty, Servlet 3.1 Reactive Streams Reactive Streams HTTP Data Broker ? API to compose asynchronous streams?
  • 28. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Working with Streams • Non-blocking services return Publisher<T> instead of <T> • How do you attach further processing? • Reactive Streams is a callback-based API • becomes very nested quickly • Need something more declarative • it’s beyond the scope of Reactive Streams 28
  • 29. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ • Publisher represents a stream of data • It’s natural to apply operations functional-style • like the Java 8 Stream • Need API for composing async logic • rise above callbacks Stream Operations 29
  • 30. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor Stream • Project Reactor provides a Stream API • Reactive Streams Publisher + composable operations 30 Streams.just('a' 'b' 'c') .take(2) .map(Character::toUpperCase) .consume(System.out::println);
  • 31. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Extensions (Rx) • Stream composition API based on Observer pattern • originated at Microsoft, work by Erik Meijer • Implemented for different languages -- RxJava, RxJS, Rx.NET, … 31 Observable.just('a', 'b', 'c') .take(2) .map(Character::toUpperCase) .subscribe(System.out::println);
  • 32. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RxJava and Reactive Streams • RxJava 1.x predates Reactive Streams and doesn’t implement it directly • Very similar concepts, different names • Observable-Observer vs Publisher-Subscriber • RxJava supports “reactive pull” back-pressure • RxJava 1.x - Reactive Streams bridge 32
  • 33. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: HeadFirst 33
  • 34. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RxNetty • RxJava as the reactive bridge to Netty IO operations • Immediate and embedded client/server for TCP and HTTP • Decorating IO Read with rx.Observable and applying dynamic pull/push • Decorating IO Write with rx.Subscriber and requesting more on flush 34
  • 35. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RxNetty … what’s up • RxNetty has introduced Backpressure support in 0.5 • Powered by the backpressure protocol from RxJava • Overall the API has been heavily lifted too https://github.com/ReactiveX/RxNetty/wiki/0.5.x-FAQs 35
  • 36. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor Net 36 • Reactive Streams as the reactive bridge to Netty and ZeroMQ IO operations • Immediate and embedded client/server for TCP, UDP and HTTP • Decorating IO Read with Publisher and applying dynamic pull/push • Decorating IO Write with Subscriber and requesting more on flush
  • 37. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Member of the Reactor initiative • Reactor is a maturing Reactive Streams suite of libraries • As with a lot of the reactive libraries, observing a rapidly evolving set of API • Precluded Reactive Streams specification work • Now evolving and getting ready for Spring 5 Reactive story projectreactor.io , github.com/reactor 37
  • 38. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Back-Pressure 38
  • 39. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Async I/O with Reactive Streams • Never block on Applications Queues : Max(request) == Queue.capacity() • Keep Reading : Any asynchronous handoff is non-blocking • Make Writes Quicker : IO operation signals demand on availability • Optimize hardware resources : Claim bounded memory and cpu 39
  • 40. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Read One read implementation : Publisher stop-read • Consume NIO Buffers only when requested • request size is != bytes read • Application stopping reads propagates back-pressure • server buffers fill • client buffers fill • eventually throttles client 40
  • 41. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Write One write implementation : Subscriber request after flush • Request after flush indicates availability in write buffer • Request size is != bytes written • Write buffers filling naturally propagates back-pressure • buffers fill • no requests • eventually throttles application 41
  • 42. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Serialization Concerns • Subscription.request(n)is not absolute ( != bytes number ) • Decoding operations might produce one to many objects • must match subscriber capacity • Encoding operations might consume one to many byte chunks • must match buffering capacity • Available serialization libraries not built for chunked streams • Jackson, Kryo, Protobuf, etc. 42
  • 43. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Scatter-gather 43
  • 44. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Reactive 44
  • 45. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Reactive • Experimental work for Spring Framework 5 • Non-blocking runtimes -- Netty, Jetty, Tomcat • Reactive Streams over network I/O -- RxNetty, Reactor Net • Spring web processing 45
  • 46. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @RequestMapping("/capitalize") @ResponseBody public Publisher<Person> capitalize(@RequestBody Publisher<Person> persons) { // … } 46 Reactive Streams Publisher
  • 47. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @RequestMapping("/capitalize") @ResponseBody public Stream<Person> capitalize(@RequestBody Stream<Person> persons) { return persons.map(person -> { person.setName(person.getName().toUpperCase()); return person; }); } 47 Reactor Stream
  • 48. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @RequestMapping("/capitalize") @ResponseBody public Observable<Person> capitalize(@RequestBody Observable<Person> persons) { return persons.map(person -> { person.setName(person.getName().toUpperCase()); return person; }); } 48 RxJava Observable
  • 49. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ReactiveX On the Client Side 49
  • 50. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RxJS function() { StreamService.connect("stream") .flatMap(unpackCsv) .subscribe(updateUI, logError, logComplete); } var unpackCsv = function (ev) { return Rx.Observable.from(ev.data ? ev.data.split("n") : []) .filter(discardEmpty) .map(csvToJson) } 50
  • 51. Unless otherwise indicated these slides are © 2013-2014 Pivotal Software Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: RxJS and Ratpack 51
  • 52. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 52 Learn More. Stay Connected. @springcentral Spring.io/video Thank You for Listening! @smaldini / @rstoya05