View
2
Download
0
Category
Preview:
Citation preview
Going reactive : more scalability and resilience but … no faster !
running waitingrunning waiting running
Server
Thread pool
My threads are waiting… my server is down
Java NIO : The Foundation
aSync + unBlockingEvent Queue
Event
Event
Event
Worker Thread
Operation
Operation
Operation
EVENT
LOOP
Register call back
Call BackTrigger Event
Reactor Pattern
Server
Event Queue
Worker Thread
read
decode
compute
encode
send
Everything runs in parallel… except my code …
Reactive StreamReactive Streams is an initiative to provide a standard for asynchronous stream processing with non-blocking back pressure
http://www.reactive-streams.org
Source
Flow
Sink
Source
Flow
Sink
1 msg/s20 msg/s
Source
Flow
Sink
1 msg/s20 msg/s
Source
Flow
Sink
1 msg/s20 msg/sOutOfMemoryError
Back PressureSource
Flow
Sink
20 msg/s1 msg/s 1 msg/s
Stop and Wait
Source
Sink🍺
🍕
🍔
Partition Merge
Zip
Advanced features
Advanced features
Advanced features
Devoxx 2017: Univercity VertxDevoxx 2017: Reactive SpringLightbend Blog:
https://www.lightbend.com/blog/exploring-reactive-integrations-java8-akka-streams-alpakka-kafka
References
Recommended