Download - Reactive Architectures
![Page 1: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/1.jpg)
Reactive ArchitecturesRalph Winzinger, Senacor Technologies
![Page 2: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/2.jpg)
who am I?Ralph Winzinger Principal Architect, Senacor Technolgies
emerging technolgies, high scalable architectures, engineering processes, dissemination of knowledge
@rwinz [email protected]
![Page 3: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/3.jpg)
what’s up?
why reactive?
application structure
deployment & operating
organizational impact
development process
functional reactive
programming
![Page 4: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/4.jpg)
aspirin - candy for programmers
https://www.flickr.com/photos/atul666/237027107
![Page 5: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/5.jpg)
what’s up?
why reactive?
application structure
deployment & operating
organizational impact
development process
functional reactive
programming
![Page 6: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/6.jpg)
digitalization
![Page 7: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/7.jpg)
architectural goals
reactiveapplication resilienceelasticity
responsiveness
![Page 8: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/8.jpg)
architectural blueprintHTML / JS
service
legacy / core integration
IoT 3rd…
API gateway
service
IMDG
native, reactive user experience,optimized for low bandwidth access
offer high scalable service integration to address fine grained request/response cycles and various 3rd parties
maximize functional decoupling and vertical decomposition up to microservices
optimized persistence technology aligned with functional requirement up to high performance in-memory computing
transparently integrate legacy systems into state-of-the-art architectures
…
![Page 9: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/9.jpg)
clients & integrationhigh quality, native like user experience
mobile first, responsive design (if not native)
async communication for maximized responsiveness
full-duplex communication (push, partial update)
high scalable gateway services, optimized for handling finegrained requests, long polling requests, server push
integration of new channels (e.g. WebRTC, messaging, voice, video-chat)
async, non-blocking
Angular.js Node.js / Vert.x
![Page 10: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/10.jpg)
servicesno app containers
shared nothing service architecture for easy scale out
independent development and deployment
vertical decomposition aligned with functional features
further breakdown towards single responsibility ans micro services
lightweight communication, self discovery at best
resilient inter-service connection for failover and scalability
spring boot vert.x
![Page 11: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/11.jpg)
shared nothing, almostservice service service maximum isolation between services
- no shared state (including persistence) - no shared domain model or logic
easy scale out & easy failover
share non-functional infrastructure code - network access, serialization, failover, …
Asgard, Hystrix, Ribbon, Finagle, Simian Army, Hazelcast, …
![Page 12: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/12.jpg)
λI’ve seen the light … !
lambdas
streams
optionals
futures
https://github.com/ReactiveX/RxJava
RxJava
observable
observable future
loads of functions
![Page 13: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/13.jpg)
persistence
primary goal: efficiency
oracle mongo neo4jhadoop ???
![Page 14: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/14.jpg)
persistence
primary goal: efficiency
polyglot persistence - the best tool for the job
IMDG - high performance cache first approach
![Page 15: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/15.jpg)
communicationclient
service
service
HTTP & WebSockets
HTTP & Messaging
![Page 16: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/16.jpg)
„How did we end up here?“, Trisha Gee & Todd Montgomery, QCon NY 2015
![Page 17: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/17.jpg)
communicationclient
service
service
HTTP & WebSockets
HTTP & Messaging
![Page 18: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/18.jpg)
event sourcing
⓶ derive object state := left fold all events
⓵ every state change is triggered by an event
apply(apply(apply(apply(new, ev0), ev1), ev2), …)
⓷ do not store state, but events
so … no persistent state … but how do I query data?
![Page 19: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/19.jpg)
event sourcing & CQRS
aggregate
createEvent(cmd) apply(ev)
command
publishconsumestore social
service
consume
hadoop
graphDB
analytics service
query
![Page 20: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/20.jpg)
serializationservice
service
human readable data formats are great!
yeah!
except there is no human to read that stuff …
😣
![Page 21: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/21.jpg)
serialization
java ser XMLJSONcapnproto protobuf
size speed
java ser XMLJSONcapnproto protobufjava ser XMLJSONcapnproto protobuf
![Page 22: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/22.jpg)
serialization
java ser XMLJSONcapnproto protobuf
size speed
java ser XMLJSONcapnproto protobufjava ser XML
JSON
capnproto protobuf
![Page 23: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/23.jpg)
serialization
java ser XMLJSONcapnproto protobuf
size speed
java ser XMLJSONcapnproto protobufjava ser XML
JSON
capnproto
protobuf
![Page 24: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/24.jpg)
serialization
java ser XMLJSONcapnproto protobuf
size speed
java ser XMLJSONcapnproto protobufjava ser XML
JSON
capnproto
protobuf
![Page 25: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/25.jpg)
serialization
java ser XMLJSONcapnproto protobuf
size speed
java ser XMLJSONcapnproto protobuf
java ser
XML
JSON
capnproto
protobuf
![Page 26: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/26.jpg)
serialization
java ser XMLJSONcapnproto protobuf
size speed
java ser
XML
JSON
capnproto
protobuf
java ser
XML
JSON
capnproto
protobuf
![Page 27: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/27.jpg)
deployment & opsscale out & resilience
one service per server
ultra-fast deployment
precise monitoring
![Page 28: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/28.jpg)
wanna play?
message based communication
auto discovery
location agnostic deployment service monitoring
auto spawning / suicide
setup / tear down virtual machines
async / parallel service calls
local caching
fallback services
service call timeoutpartial page update
server -> client push
circuit breaker
back pressure / throttling
bulk head
![Page 29: Reactive Architectures](https://reader033.vdocuments.us/reader033/viewer/2022042701/55b6e811bb61eb69688b4813/html5/thumbnails/29.jpg)
wanna play?angular.js + websockets
vert.x 3 + Java8 + RxJava hystrix + dashboard
mongoDB
1000-2000 tps
@rwinz [email protected]