SlideShare a Scribd company logo
1 of 75
Download to read offline
Reactor Californium
Stephane Maldini - @smaldini
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3
But Really ?
Californium ?
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 4
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Just Released
5
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactor Core 3.2
Reactor Addons 3.2
Reactor Netty 0.8
6
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 7
Used by

Spring Framework
5.1
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Used by

Spring Framework
5.1
8
(And Soon® 

Spring Boot 2.1)
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactor Core 3.2
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support
10
Monitor Flux and Mono
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support
11
New metric() operator
with auto detection for name() and tag()
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support
12
Noop if Micrometer not on class path
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support
13
Flux.range(1, 1000)
.delayUntil(i -> Mono.delay(Duration.ofMillis(100*(i % 10))))
.name("test-flow")
.log()
.metrics()
.limitRate(10)
.repeat()
.blockLast();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support
14
Flux.range(1, 1000)
.delayUntil(i -> Mono.delay(Duration.ofMillis(100*(i % 10))))
.name("test-flow")
.log()
.metrics()
.limitRate(10)
.repeat()
.blockLast();
Identify the flux for meaningful metrics
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support : Good to know
15
Time delays between start and data signals…
…Then between each data signals
Time full flow duration if finite
Tag by signal type
Detect Malformed Reactive Signals
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support w/ Spring Boot
16
compile "io.projectreactor:reactor-core:3.2.0.RELEASE"
compile "org.springframework.boot:spring-boot-starter-webflux"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "io.micrometer:micrometer-registry-prometheus"
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Initial Micrometer Support w/ Spring Boot
17
compile "io.projectreactor:reactor-core:3.2.0.RELEASE"
compile "org.springframework.boot:spring-boot-starter-webflux"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "io.micrometer:micrometer-registry-prometheus"
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 18
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
19
Reward end-to-end users with unique features in 3.2
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
20
Immutable container using optimized copy-on-write
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
21
Propagate at subscribe time
from the subscribing side to the producing side.
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
22
StepVerifier.create(
Mono.subscriberContext()
.subscriberContext(Context.of("initial", "value"))
)
.expectNextMatches(c -> c.hasKey("initial"))
.verifyComplete();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
23
StepVerifier.create(
Mono.subscriberContext()
.subscriberContext(Context.of("initial", "value"))
)
.expectNextMatches(c -> c.hasKey("initial"))
.verifyComplete();
Read from the current subscription Write during current subscription
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
24
StepVerifier.create(
Flux.just("foo")
.flatMap(v -> Mono.subscriberContext())
.subscriberContext(Context.of("initial", "value"))
)
.expectNextMatches(c -> c.hasKey("initial"))
.verifyComplete();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
reactor.util.context.Context: reactive flow attributes
25
StepVerifier.create(
Flux.just("foo")
.flatMap(v -> Mono.subscriberContext())
.subscriberContext(Context.of("initial", "value"))
)
.expectNextMatches(c -> c.hasKey("initial"))
.verifyComplete();
Works inside nested flows
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Context: an alternative to Thread-Local
26
Spring Security
Spring Cloud Sleuth
doOnDiscard
onErrorContinue
Spring Data
…
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard
27
Reroute upstream operators discarded items
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard
28
Useful to build strongly consistent reactive flows
Even more useful to release resources 

such as pooled buffers (hello netty!)
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : react to filtered items
29
AtomicInteger discardNumberCount = new AtomicInteger();
Flux.range(1, 12)
.filter(i -> i % 2 == 0)
.doOnDiscard(Number.class, i -> discardNumberCount.incrementAndGet())
.subscribe();
Assertions.assertThat(discardNumberCount).hasValue(6);
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : react to partial collections
30
DirectProcessor<String> p = DirectProcessor.create();
Disposable d = p.collectList()
.doOnDiscard(String.class, System.out::println)
.subscribe();
p.onNext("a");
p.onNext("b");
p.onNext("c");
d.dispose();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : react to cancelled items
31
DirectProcessor<String> p = DirectProcessor.create();
Disposable d = p.collectList()
.doOnDiscard(String.class, System.out::println)
.subscribe();
p.onNext("a");
p.onNext("b");
p.onNext("c");
d.dispose(); a
b
c
Console Output
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : testable behavior
32
StepVerifier.create(Flux.range(1, 12)
.filter(i -> i % 2 == 0)
)
.expectNext(2, 4, 6, 8, 10, 12)
.expectComplete()
.verifyThenAssertThat()
.hasDiscarded(1, 3, 5, 7, 9, 11);
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : scope of work
33
Limited number of supported operators

Planning to add more during 3.2.x
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : scope of work
34
Limited number of supported operators

Planning to add more during 3.2.x
Look for this in JavaDoc
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : scope of work
35
Does not guarantee exactly-once callback invocation
combineLatest
overlapping buffers
overlapping windows
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DoOnDiscard : scope of work
36
Use your own de-duplication if you need exactly-once
semantics
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue
37
Reroute upstream operators selected errors
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue
38
Useful to build more resilient reactive flows
Even more useful to messaging use cases

such as data processing pipelines
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
39
Flux.just(0, 1)
.map(i -> 1 / i)
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
40
Flux.just(0, 1)
.map(i -> 1 / i)
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
A Door left open for errors
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
41
Flux.just(0, 1)
.map(i -> 1 / i)
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
Console Output
[main] INFO reactor.Flux.ContextStart.1 - | onSubscribe([Fuseable] FluxContextStart.ContextStartSubscriber)
[main] INFO reactor.Flux.ContextStart.1 - | request(unbounded)
/ by zero - 0
[main] INFO reactor.Flux.ContextStart.1 - | onNext(1)
[main] INFO reactor.Flux.ContextStart.1 - | onComplete()
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
42
Flux.just(0, 1)
.map(i -> 1 / i)
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
Console Output
[main] INFO reactor.Flux.ContextStart.1 - | onSubscribe([Fuseable] FluxContextStart.ContextStartSubscriber)
[main] INFO reactor.Flux.ContextStart.1 - | request(unbounded)
/ by zero - 0
[main] INFO reactor.Flux.ContextStart.1 - | onNext(1)
[main] INFO reactor.Flux.ContextStart.1 - | onComplete()
/ by zero - 0
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
43
Flux.just(0, 1)
.map(i -> 1 / i)
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
Console Output
[main] INFO reactor.Flux.ContextStart.1 - | onSubscribe([Fuseable] FluxContextStart.ContextStartSubscriber)
[main] INFO reactor.Flux.ContextStart.1 - | request(unbounded)
/ by zero - 0
[main] INFO reactor.Flux.ContextStart.1 - | onNext(1)
[main] INFO reactor.Flux.ContextStart.1 - | onComplete()
onNext(1)
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
44
Flux.just(0, 1)
.flatMap(f -> Mono.just(f).map(i -> 1/i))
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : keep things running
45
Flux.just(0, 1)
.flatMap(f -> Mono.just(f).map(i -> 1/i))
.onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data))
.log()
.subscribe();
Nested Flows support - Thanks Context !
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : scope of work
46
Limited number of supported operators

Planning to add more during 3.2.x
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : scope of work
47
Limited number of supported operators

Planning to add more during 3.2.x
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : scope of work
48
Error must not be related to 

the start or the end of sequence
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : scope of work
49
Impact the way the flow is working
As the operator usually needs to request an extra item
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
onErrorContinue : scope of work
50
Impact the way the flow is working
As the operator usually needs to request an extra item
No use-case for Mono#onErrorContinue
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
retryBackoff : pragmatic retry
51
The new retry operator you will want to use all the time
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
retryBackoff : pragmatic retry
52
The new retry operator you will want to use all the time
With randomized exponential timeouts
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
retryBackoff : pragmatic retry
53
The new retry operator you will want to use all the time
With randomized exponential timeouts
Promoted operator from Reactor Addons 👍
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
retryBackoff : pragmatic retry
54
StepVerifier.withVirtualTime(() ->
Mono.error(new IOException("boom retry"))
.doOnError(e -> elapsedList.add(Schedulers.parallel().now(TimeUnit.MILLISECONDS)))
.retryBackoff(4, Duration.ofMillis(100), Duration.ofMillis(2000))
)
.thenAwait(Duration.ofMinutes(1))
.expectErrorSatisfies(e -> assertThat(e).hasMessage("Retries exhausted: 4/4"))
.verify();
System.out.println(elapsedList);
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
retryBackoff : pragmatic retry
55
StepVerifier.withVirtualTime(() ->
Mono.error(new IOException("boom retry"))
.doOnError(e -> elapsedList.add(Schedulers.parallel().now(TimeUnit.MILLISECONDS)))
.retryBackoff(4, Duration.ofMillis(100), Duration.ofMillis(2000))
)
.thenAwait(Duration.ofMinutes(1))
.expectErrorSatisfies(e -> assertThat(e).hasMessage("Retries exhausted: 4/4"))
.verify();
System.out.println(elapsedList);
pro-tip: use virtual time to instant-test time driven sequences
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
retryBackoff : pragmatic retry
56
StepVerifier.withVirtualTime(() ->
Mono.error(new IOException("boom retry"))
.doOnError(e -> elapsedList.add(Schedulers.parallel().now(TimeUnit.MILLISECONDS)))
.retryBackoff(4, Duration.ofMillis(100), Duration.ofMillis(2000))
)
.thenAwait(Duration.ofMinutes(1))
.expectErrorSatisfies(e -> assertThat(e).hasMessage("Retries exhausted: 4/4"))
.verify();
System.out.println(elapsedList); Console Output
[0, 129, 386, 749, 1463]
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
usingWhen : Arbitrary resource lifecycle binding
57
Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new),
d -> Flux.just("Transaction started", "work in transaction", "more work in transaction"),
TestResource::commit,
TestResource::rollback);
StepVerifier.create(flux)
.expectNext("Transaction started")
.expectNext("work in transaction")
.expectNext("more work in transaction")
.verifyComplete();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
usingWhen : Arbitrary resource lifecycle binding
58
Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new),
d -> Flux.just("Transaction started", "work in transaction", "more work in transaction"),
TestResource::commit,
TestResource::rollback);
StepVerifier.create(flux)
.expectNext("Transaction started")
.expectNext("work in transaction")
.expectNext("more work in transaction")
.verifyComplete();
Commit method will be used
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
usingWhen : Arbitrary resource lifecycle binding
59
Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new),
d -> Flux.just("Transaction started").concatWith(Mono.error(new Exception("fail"))),
TestResource::commit,
TestResource::rollback);
StepVerifier.create(flux)
.expectNext("Transaction started")
.verifyErrorMessage(“fail");
Rollback method will be used
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
usingWhen : Arbitrary resource lifecycle binding
60
Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new),
d -> Flux.just("Transaction started").concatWith(Mono.error(new Exception("fail"))),
TestResource::commit,
TestResource::rollback,
TestResource::rollback);
StepVerifier.create(flux)
.expectNext("Transaction started”)
.thenCancel()
.verify();
Rollback method will be used on cancel too
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Learn about all improvements
61
https://github.com/reactor/reactor-core/releases/tag/v3.2.0.RELEASE
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Things that are still in the oven
62
Full Processor API refactoring
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Things that are still in the oven
63
Full Processor API refactoring
Too impacting for now
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Things that are still in the oven
64
Converting Marble Diagrams to SVG

Shout Out to @thekalinga 
Metrics for Schedulers
new FluxSink#tryNext
Website improvements
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 65
Learn more from Simon Baslé
3:20 Flight of the Flux: A Look at Reactor Execution Model
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactor Netty 0.8
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The API refining continues
67
Aligned HttpClient APIs with WebClient
Merged Options and Stateless builders

into XxxClient/XxxServer
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The API refining continues
68
HttpClient.create()
.wiretap()
.followRedirect(true)
.get()
.uri("https://projectreactor.io")
.responseContent()
.asString()
.limitRate(1)
.reduce(String::concat)
.block(Duration.ofSeconds(30));
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The API refining continues
69
HttpClient.create()
.wiretap()
.followRedirect(true)
.get()
.uri("https://projectreactor.io")
.responseContent()
.asString()
.limitRate(1)
.reduce(String::concat)
.block(Duration.ofSeconds(30));
Single level of nesting
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The API refining continues
70
HttpClient.create()
.wiretap()
.followRedirect(true)
.get()
.uri("https://projectreactor.io")
.responseContent()
.asString()
.limitRate(1)
.reduce(String::concat)
.block(Duration.ofSeconds(30));
Specify client options in the builder
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The API refining continues
71
HttpClient.create()
.wiretap()
.followRedirect(true)
.get()
.uri("https://projectreactor.io")
.responseContent()
.asString()
.limitRate(1)
.reduce(String::concat)
.block(Duration.ofSeconds(30));
Basic decoding OoB
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 72
Learn more from Violeta Georgieva
11:30 Reactor Netty, the Default Spring Boot 2.0 Runtime
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Next ?
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What’s next ?
74
dysprosium [Dy] ?
Dubnium [Db] ?
Darmstadtium [Ds] ?
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Thanks

More Related Content

Similar to What's new in Reactor Californium

Spring Cloud Gateway - Stéphane Maldini
Spring Cloud Gateway - Stéphane MaldiniSpring Cloud Gateway - Stéphane Maldini
Spring Cloud Gateway - Stéphane MaldiniVMware Tanzu
 
Containers Were Never Your End State
Containers Were Never Your End StateContainers Were Never Your End State
Containers Were Never Your End StateVMware Tanzu
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterVMware Tanzu
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterVMware Tanzu
 
riffing on Knative - Scott Andrews
riffing on Knative - Scott Andrewsriffing on Knative - Scott Andrews
riffing on Knative - Scott AndrewsVMware Tanzu
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidVMware Tanzu
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidVMware Tanzu
 
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John BlumFrom Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John BlumVMware Tanzu
 
Automating Brownfield Application Modernization on Pivotal Cloud Foundry
Automating Brownfield Application Modernization on Pivotal Cloud FoundryAutomating Brownfield Application Modernization on Pivotal Cloud Foundry
Automating Brownfield Application Modernization on Pivotal Cloud FoundryVMware Tanzu
 
Spring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan BaxterSpring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan BaxterVMware Tanzu
 
Spring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan BaxterSpring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan BaxterVMware Tanzu
 
Spring Cloud Kubernetes - Spencer Gibb
Spring Cloud Kubernetes - Spencer GibbSpring Cloud Kubernetes - Spencer Gibb
Spring Cloud Kubernetes - Spencer GibbVMware Tanzu
 
Architectures That Bend but Don't Break
Architectures That Bend but Don't BreakArchitectures That Bend but Don't Break
Architectures That Bend but Don't BreakMatt Stine
 
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
 
How to Manage Microservices and APIs with Apigee and Istio
How to Manage Microservices and APIs with Apigee and IstioHow to Manage Microservices and APIs with Apigee and Istio
How to Manage Microservices and APIs with Apigee and IstioVMware Tanzu
 
Reactive frontends with RxJS and Angular
Reactive frontends with RxJS and AngularReactive frontends with RxJS and Angular
Reactive frontends with RxJS and AngularVMware Tanzu
 
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
 
Innovating Faster with Continuous Application Security
Innovating Faster with Continuous Application Security Innovating Faster with Continuous Application Security
Innovating Faster with Continuous Application Security Jeff Williams
 
Accelerating the Consumption of APIs Built on Cloud Foundry
Accelerating the Consumption of APIs Built on Cloud FoundryAccelerating the Consumption of APIs Built on Cloud Foundry
Accelerating the Consumption of APIs Built on Cloud FoundryVMware Tanzu
 

Similar to What's new in Reactor Californium (20)

Spring Cloud Gateway - Stéphane Maldini
Spring Cloud Gateway - Stéphane MaldiniSpring Cloud Gateway - Stéphane Maldini
Spring Cloud Gateway - Stéphane Maldini
 
Spring Cloud Gateway
Spring Cloud GatewaySpring Cloud Gateway
Spring Cloud Gateway
 
Containers Were Never Your End State
Containers Were Never Your End StateContainers Were Never Your End State
Containers Were Never Your End State
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
riffing on Knative - Scott Andrews
riffing on Knative - Scott Andrewsriffing on Knative - Scott Andrews
riffing on Knative - Scott Andrews
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
 
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John BlumFrom Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
 
Automating Brownfield Application Modernization on Pivotal Cloud Foundry
Automating Brownfield Application Modernization on Pivotal Cloud FoundryAutomating Brownfield Application Modernization on Pivotal Cloud Foundry
Automating Brownfield Application Modernization on Pivotal Cloud Foundry
 
Spring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan BaxterSpring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan Baxter
 
Spring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan BaxterSpring Cloud Kubernetes - Ryan Baxter
Spring Cloud Kubernetes - Ryan Baxter
 
Spring Cloud Kubernetes - Spencer Gibb
Spring Cloud Kubernetes - Spencer GibbSpring Cloud Kubernetes - Spencer Gibb
Spring Cloud Kubernetes - Spencer Gibb
 
Architectures That Bend but Don't Break
Architectures That Bend but Don't BreakArchitectures That Bend but Don't Break
Architectures That Bend but Don't Break
 
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...
 
How to Manage Microservices and APIs with Apigee and Istio
How to Manage Microservices and APIs with Apigee and IstioHow to Manage Microservices and APIs with Apigee and Istio
How to Manage Microservices and APIs with Apigee and Istio
 
Reactive frontends with RxJS and Angular
Reactive frontends with RxJS and AngularReactive frontends with RxJS and Angular
Reactive frontends with RxJS and Angular
 
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
 
Innovating Faster with Continuous Application Security
Innovating Faster with Continuous Application Security Innovating Faster with Continuous Application Security
Innovating Faster with Continuous Application Security
 
Accelerating the Consumption of APIs Built on Cloud Foundry
Accelerating the Consumption of APIs Built on Cloud FoundryAccelerating the Consumption of APIs Built on Cloud Foundry
Accelerating the Consumption of APIs Built on Cloud Foundry
 

More from Stéphane Maldini

Multi-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocketMulti-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocketStéphane Maldini
 
The Future of Reactive Architectures
The Future of Reactive ArchitecturesThe Future of Reactive Architectures
The Future of Reactive ArchitecturesStéphane Maldini
 
Spring boot 2.0 reactive bits (June 2018)
Spring boot 2.0 reactive bits (June 2018)Spring boot 2.0 reactive bits (June 2018)
Spring boot 2.0 reactive bits (June 2018)Stéphane Maldini
 
Reactor 3.0, a reactive foundation for java 8 and Spring
Reactor 3.0, a reactive foundation for java 8 and SpringReactor 3.0, a reactive foundation for java 8 and Spring
Reactor 3.0, a reactive foundation for java 8 and SpringStéphane Maldini
 
Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5Stéphane Maldini
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive ProgrammingStéphane Maldini
 
Designing for Distributed Systems with Reactor and Reactive Streams
Designing for Distributed Systems with Reactor and Reactive StreamsDesigning for Distributed Systems with Reactor and Reactive Streams
Designing for Distributed Systems with Reactor and Reactive StreamsStéphane Maldini
 
Reactor, Reactive streams and MicroServices
Reactor, Reactive streams and MicroServicesReactor, Reactive streams and MicroServices
Reactor, Reactive streams and MicroServicesStéphane Maldini
 
Springone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and ReactorSpringone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and ReactorStéphane Maldini
 
Reactor grails realtime web devoxx 2013
Reactor grails realtime web   devoxx 2013Reactor grails realtime web   devoxx 2013
Reactor grails realtime web devoxx 2013Stéphane Maldini
 
Groovy reactor grails realtime web devoxx 2013
Groovy reactor grails realtime web   devoxx 2013Groovy reactor grails realtime web   devoxx 2013
Groovy reactor grails realtime web devoxx 2013Stéphane Maldini
 
Reactor spring one2gx_2013_0902-final
Reactor spring one2gx_2013_0902-finalReactor spring one2gx_2013_0902-final
Reactor spring one2gx_2013_0902-finalStéphane Maldini
 

More from Stéphane Maldini (15)

The value of reactive
The value of reactiveThe value of reactive
The value of reactive
 
Multi-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocketMulti-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocket
 
The Future of Reactive Architectures
The Future of Reactive ArchitecturesThe Future of Reactive Architectures
The Future of Reactive Architectures
 
Spring boot 2.0 reactive bits (June 2018)
Spring boot 2.0 reactive bits (June 2018)Spring boot 2.0 reactive bits (June 2018)
Spring boot 2.0 reactive bits (June 2018)
 
Reactor 3.0, a reactive foundation for java 8 and Spring
Reactor 3.0, a reactive foundation for java 8 and SpringReactor 3.0, a reactive foundation for java 8 and Spring
Reactor 3.0, a reactive foundation for java 8 and Spring
 
Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive Programming
 
Designing for Distributed Systems with Reactor and Reactive Streams
Designing for Distributed Systems with Reactor and Reactive StreamsDesigning for Distributed Systems with Reactor and Reactive Streams
Designing for Distributed Systems with Reactor and Reactive Streams
 
Reactor, Reactive streams and MicroServices
Reactor, Reactive streams and MicroServicesReactor, Reactive streams and MicroServices
Reactor, Reactive streams and MicroServices
 
Springone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and ReactorSpringone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and Reactor
 
Reactor grails realtime web devoxx 2013
Reactor grails realtime web   devoxx 2013Reactor grails realtime web   devoxx 2013
Reactor grails realtime web devoxx 2013
 
Groovy reactor grails realtime web devoxx 2013
Groovy reactor grails realtime web   devoxx 2013Groovy reactor grails realtime web   devoxx 2013
Groovy reactor grails realtime web devoxx 2013
 
Ss2gx
Ss2gxSs2gx
Ss2gx
 
Reactor spring one2gx_2013_0902-final
Reactor spring one2gx_2013_0902-finalReactor spring one2gx_2013_0902-final
Reactor spring one2gx_2013_0902-final
 
Eventsggx
EventsggxEventsggx
Eventsggx
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

What's new in Reactor Californium

  • 2. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
  • 3. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3 But Really ? Californium ?
  • 4. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 4
  • 5. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Just Released 5
  • 6. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor Core 3.2 Reactor Addons 3.2 Reactor Netty 0.8 6
  • 7. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 7 Used by
 Spring Framework 5.1
  • 8. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Used by
 Spring Framework 5.1 8 (And Soon® 
 Spring Boot 2.1)
  • 9. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor Core 3.2
  • 10. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support 10 Monitor Flux and Mono
  • 11. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support 11 New metric() operator with auto detection for name() and tag()
  • 12. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support 12 Noop if Micrometer not on class path
  • 13. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support 13 Flux.range(1, 1000) .delayUntil(i -> Mono.delay(Duration.ofMillis(100*(i % 10)))) .name("test-flow") .log() .metrics() .limitRate(10) .repeat() .blockLast();
  • 14. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support 14 Flux.range(1, 1000) .delayUntil(i -> Mono.delay(Duration.ofMillis(100*(i % 10)))) .name("test-flow") .log() .metrics() .limitRate(10) .repeat() .blockLast(); Identify the flux for meaningful metrics
  • 15. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support : Good to know 15 Time delays between start and data signals… …Then between each data signals Time full flow duration if finite Tag by signal type Detect Malformed Reactive Signals
  • 16. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support w/ Spring Boot 16 compile "io.projectreactor:reactor-core:3.2.0.RELEASE" compile "org.springframework.boot:spring-boot-starter-webflux" compile "org.springframework.boot:spring-boot-starter-actuator" compile "io.micrometer:micrometer-registry-prometheus"
  • 17. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Initial Micrometer Support w/ Spring Boot 17 compile "io.projectreactor:reactor-core:3.2.0.RELEASE" compile "org.springframework.boot:spring-boot-starter-webflux" compile "org.springframework.boot:spring-boot-starter-actuator" compile "io.micrometer:micrometer-registry-prometheus"
  • 18. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 18
  • 19. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 19 Reward end-to-end users with unique features in 3.2
  • 20. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 20 Immutable container using optimized copy-on-write
  • 21. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 21 Propagate at subscribe time from the subscribing side to the producing side.
  • 22. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 22 StepVerifier.create( Mono.subscriberContext() .subscriberContext(Context.of("initial", "value")) ) .expectNextMatches(c -> c.hasKey("initial")) .verifyComplete();
  • 23. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 23 StepVerifier.create( Mono.subscriberContext() .subscriberContext(Context.of("initial", "value")) ) .expectNextMatches(c -> c.hasKey("initial")) .verifyComplete(); Read from the current subscription Write during current subscription
  • 24. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 24 StepVerifier.create( Flux.just("foo") .flatMap(v -> Mono.subscriberContext()) .subscriberContext(Context.of("initial", "value")) ) .expectNextMatches(c -> c.hasKey("initial")) .verifyComplete();
  • 25. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ reactor.util.context.Context: reactive flow attributes 25 StepVerifier.create( Flux.just("foo") .flatMap(v -> Mono.subscriberContext()) .subscriberContext(Context.of("initial", "value")) ) .expectNextMatches(c -> c.hasKey("initial")) .verifyComplete(); Works inside nested flows
  • 26. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Context: an alternative to Thread-Local 26 Spring Security Spring Cloud Sleuth doOnDiscard onErrorContinue Spring Data …
  • 27. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard 27 Reroute upstream operators discarded items
  • 28. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard 28 Useful to build strongly consistent reactive flows Even more useful to release resources 
 such as pooled buffers (hello netty!)
  • 29. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : react to filtered items 29 AtomicInteger discardNumberCount = new AtomicInteger(); Flux.range(1, 12) .filter(i -> i % 2 == 0) .doOnDiscard(Number.class, i -> discardNumberCount.incrementAndGet()) .subscribe(); Assertions.assertThat(discardNumberCount).hasValue(6);
  • 30. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : react to partial collections 30 DirectProcessor<String> p = DirectProcessor.create(); Disposable d = p.collectList() .doOnDiscard(String.class, System.out::println) .subscribe(); p.onNext("a"); p.onNext("b"); p.onNext("c"); d.dispose();
  • 31. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : react to cancelled items 31 DirectProcessor<String> p = DirectProcessor.create(); Disposable d = p.collectList() .doOnDiscard(String.class, System.out::println) .subscribe(); p.onNext("a"); p.onNext("b"); p.onNext("c"); d.dispose(); a b c Console Output
  • 32. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : testable behavior 32 StepVerifier.create(Flux.range(1, 12) .filter(i -> i % 2 == 0) ) .expectNext(2, 4, 6, 8, 10, 12) .expectComplete() .verifyThenAssertThat() .hasDiscarded(1, 3, 5, 7, 9, 11);
  • 33. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : scope of work 33 Limited number of supported operators
 Planning to add more during 3.2.x
  • 34. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : scope of work 34 Limited number of supported operators
 Planning to add more during 3.2.x Look for this in JavaDoc
  • 35. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : scope of work 35 Does not guarantee exactly-once callback invocation combineLatest overlapping buffers overlapping windows
  • 36. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DoOnDiscard : scope of work 36 Use your own de-duplication if you need exactly-once semantics
  • 37. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue 37 Reroute upstream operators selected errors
  • 38. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue 38 Useful to build more resilient reactive flows Even more useful to messaging use cases
 such as data processing pipelines
  • 39. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 39 Flux.just(0, 1) .map(i -> 1 / i) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe();
  • 40. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 40 Flux.just(0, 1) .map(i -> 1 / i) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe(); A Door left open for errors
  • 41. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 41 Flux.just(0, 1) .map(i -> 1 / i) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe(); Console Output [main] INFO reactor.Flux.ContextStart.1 - | onSubscribe([Fuseable] FluxContextStart.ContextStartSubscriber) [main] INFO reactor.Flux.ContextStart.1 - | request(unbounded) / by zero - 0 [main] INFO reactor.Flux.ContextStart.1 - | onNext(1) [main] INFO reactor.Flux.ContextStart.1 - | onComplete()
  • 42. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 42 Flux.just(0, 1) .map(i -> 1 / i) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe(); Console Output [main] INFO reactor.Flux.ContextStart.1 - | onSubscribe([Fuseable] FluxContextStart.ContextStartSubscriber) [main] INFO reactor.Flux.ContextStart.1 - | request(unbounded) / by zero - 0 [main] INFO reactor.Flux.ContextStart.1 - | onNext(1) [main] INFO reactor.Flux.ContextStart.1 - | onComplete() / by zero - 0
  • 43. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 43 Flux.just(0, 1) .map(i -> 1 / i) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe(); Console Output [main] INFO reactor.Flux.ContextStart.1 - | onSubscribe([Fuseable] FluxContextStart.ContextStartSubscriber) [main] INFO reactor.Flux.ContextStart.1 - | request(unbounded) / by zero - 0 [main] INFO reactor.Flux.ContextStart.1 - | onNext(1) [main] INFO reactor.Flux.ContextStart.1 - | onComplete() onNext(1)
  • 44. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 44 Flux.just(0, 1) .flatMap(f -> Mono.just(f).map(i -> 1/i)) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe();
  • 45. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : keep things running 45 Flux.just(0, 1) .flatMap(f -> Mono.just(f).map(i -> 1/i)) .onErrorContinue((e, data) -> System.out.println(e.getMessage() + " - " + data)) .log() .subscribe(); Nested Flows support - Thanks Context !
  • 46. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : scope of work 46 Limited number of supported operators
 Planning to add more during 3.2.x
  • 47. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : scope of work 47 Limited number of supported operators
 Planning to add more during 3.2.x
  • 48. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : scope of work 48 Error must not be related to 
 the start or the end of sequence
  • 49. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : scope of work 49 Impact the way the flow is working As the operator usually needs to request an extra item
  • 50. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ onErrorContinue : scope of work 50 Impact the way the flow is working As the operator usually needs to request an extra item No use-case for Mono#onErrorContinue
  • 51. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ retryBackoff : pragmatic retry 51 The new retry operator you will want to use all the time
  • 52. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ retryBackoff : pragmatic retry 52 The new retry operator you will want to use all the time With randomized exponential timeouts
  • 53. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ retryBackoff : pragmatic retry 53 The new retry operator you will want to use all the time With randomized exponential timeouts Promoted operator from Reactor Addons 👍
  • 54. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ retryBackoff : pragmatic retry 54 StepVerifier.withVirtualTime(() -> Mono.error(new IOException("boom retry")) .doOnError(e -> elapsedList.add(Schedulers.parallel().now(TimeUnit.MILLISECONDS))) .retryBackoff(4, Duration.ofMillis(100), Duration.ofMillis(2000)) ) .thenAwait(Duration.ofMinutes(1)) .expectErrorSatisfies(e -> assertThat(e).hasMessage("Retries exhausted: 4/4")) .verify(); System.out.println(elapsedList);
  • 55. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ retryBackoff : pragmatic retry 55 StepVerifier.withVirtualTime(() -> Mono.error(new IOException("boom retry")) .doOnError(e -> elapsedList.add(Schedulers.parallel().now(TimeUnit.MILLISECONDS))) .retryBackoff(4, Duration.ofMillis(100), Duration.ofMillis(2000)) ) .thenAwait(Duration.ofMinutes(1)) .expectErrorSatisfies(e -> assertThat(e).hasMessage("Retries exhausted: 4/4")) .verify(); System.out.println(elapsedList); pro-tip: use virtual time to instant-test time driven sequences
  • 56. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ retryBackoff : pragmatic retry 56 StepVerifier.withVirtualTime(() -> Mono.error(new IOException("boom retry")) .doOnError(e -> elapsedList.add(Schedulers.parallel().now(TimeUnit.MILLISECONDS))) .retryBackoff(4, Duration.ofMillis(100), Duration.ofMillis(2000)) ) .thenAwait(Duration.ofMinutes(1)) .expectErrorSatisfies(e -> assertThat(e).hasMessage("Retries exhausted: 4/4")) .verify(); System.out.println(elapsedList); Console Output [0, 129, 386, 749, 1463]
  • 57. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ usingWhen : Arbitrary resource lifecycle binding 57 Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new), d -> Flux.just("Transaction started", "work in transaction", "more work in transaction"), TestResource::commit, TestResource::rollback); StepVerifier.create(flux) .expectNext("Transaction started") .expectNext("work in transaction") .expectNext("more work in transaction") .verifyComplete();
  • 58. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ usingWhen : Arbitrary resource lifecycle binding 58 Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new), d -> Flux.just("Transaction started", "work in transaction", "more work in transaction"), TestResource::commit, TestResource::rollback); StepVerifier.create(flux) .expectNext("Transaction started") .expectNext("work in transaction") .expectNext("more work in transaction") .verifyComplete(); Commit method will be used
  • 59. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ usingWhen : Arbitrary resource lifecycle binding 59 Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new), d -> Flux.just("Transaction started").concatWith(Mono.error(new Exception("fail"))), TestResource::commit, TestResource::rollback); StepVerifier.create(flux) .expectNext("Transaction started") .verifyErrorMessage(“fail"); Rollback method will be used
  • 60. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ usingWhen : Arbitrary resource lifecycle binding 60 Flux<String> flux = Flux.usingWhen(Mono.fromCallable(TestResource::new), d -> Flux.just("Transaction started").concatWith(Mono.error(new Exception("fail"))), TestResource::commit, TestResource::rollback, TestResource::rollback); StepVerifier.create(flux) .expectNext("Transaction started”) .thenCancel() .verify(); Rollback method will be used on cancel too
  • 61. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Learn about all improvements 61 https://github.com/reactor/reactor-core/releases/tag/v3.2.0.RELEASE
  • 62. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Things that are still in the oven 62 Full Processor API refactoring
  • 63. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Things that are still in the oven 63 Full Processor API refactoring Too impacting for now
  • 64. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Things that are still in the oven 64 Converting Marble Diagrams to SVG
 Shout Out to @thekalinga  Metrics for Schedulers new FluxSink#tryNext Website improvements
  • 65. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 65 Learn more from Simon Baslé 3:20 Flight of the Flux: A Look at Reactor Execution Model
  • 66. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor Netty 0.8
  • 67. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The API refining continues 67 Aligned HttpClient APIs with WebClient Merged Options and Stateless builders
 into XxxClient/XxxServer
  • 68. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The API refining continues 68 HttpClient.create() .wiretap() .followRedirect(true) .get() .uri("https://projectreactor.io") .responseContent() .asString() .limitRate(1) .reduce(String::concat) .block(Duration.ofSeconds(30));
  • 69. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The API refining continues 69 HttpClient.create() .wiretap() .followRedirect(true) .get() .uri("https://projectreactor.io") .responseContent() .asString() .limitRate(1) .reduce(String::concat) .block(Duration.ofSeconds(30)); Single level of nesting
  • 70. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The API refining continues 70 HttpClient.create() .wiretap() .followRedirect(true) .get() .uri("https://projectreactor.io") .responseContent() .asString() .limitRate(1) .reduce(String::concat) .block(Duration.ofSeconds(30)); Specify client options in the builder
  • 71. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The API refining continues 71 HttpClient.create() .wiretap() .followRedirect(true) .get() .uri("https://projectreactor.io") .responseContent() .asString() .limitRate(1) .reduce(String::concat) .block(Duration.ofSeconds(30)); Basic decoding OoB
  • 72. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 72 Learn more from Violeta Georgieva 11:30 Reactor Netty, the Default Spring Boot 2.0 Runtime
  • 73. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Next ?
  • 74. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What’s next ? 74 dysprosium [Dy] ? Dubnium [Db] ? Darmstadtium [Ds] ?
  • 75. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Thanks