Top Banner
BE REACTIVE AND MICRO WITH A MICROPROFILE STACK Ondrej Mihályi @omihalyi
18

BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

Aug 15, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

BEREACTIVEANDMICROWITHAMICROPROFILE

STACK

OndrejMihályi@omihalyi

Page 2: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

WHATDOWEWANT?

@OMihalyi

Page 3: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

thereshouldbeaPROBLEMtosolve

WHYDOWEWANTIT?

@OMihalyi

Page 4: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

BETTERUSEREXPERIENCE

updateswhenready,reducedwaitingerrorsraisedASAPuserscanreactfasteravoidsunnecessaryuserretries

@OMihalyi

Page 5: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

HANDLEHIGHLOADS

utilizeresourcesatmaximum(CPU)threadsaren'twastedbyblockingavoidblockingofnewrequests

@OMihalyi

Page 6: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

HANDLEMASSIVELOADS

scaletomorenodesmessagingtodistributetheload

@OMihalyi

Page 7: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

DON'TFORGETABOUTFAILURES

failfastandavoidwastemakesurefailuresarehandledfailureshappenalotmoreindistributedsystems

@OMihalyi

Page 8: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

WHATISMICROPROFILE?

open-sourcespecificationforJavamicroservices( )microprofile.io

@OMihalyi

Page 9: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

REACTIVESUPPORTINMICROPROFILE

AsynchronousREST(JAX-RS)CDIeventseasyFaultToleranceMonitoringviaMetrics

@OMihalyi

Page 10: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

WE'LLADDWHAT'SMISSING

RxJavahandlecallbacksanddatastreams

asynchronousFaultTolerance

React.jseasyupdatesonevents

@OMihalyi

Page 11: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

OURDEMOAPPLICATION

@OMihalyi

Page 12: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

DEMOSource:https://github.com/OndrejM-demonstrations/Reactive-and-Micro-

with-MicroProfile-and-Payara

@OMihalyi

Page 13: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

WE'LLADDMORE

JavaEE8reactiveRESTclient(JAX-RS)Server-SentEvents

KafkaJCAconnectorHazelcast

distributedcacheandotherstructuresNoSQLdistributeddatastore

@OMihalyi

Page 14: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

DEMO

@OMihalyi

Page 15: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

PAYARASERVER

MicroProfile,JavaEE,Hazelcast,CloudJCAConnectors,CDIeventbusdynamicclustering(suitableforcloud)fastdevelopmentadminconsolemonitoring

@OMihalyi

Page 16: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

PAYARAMICRO

APIsasinServer(exceptSOAP,remoteEJB)mostoffeaturesoftheServerexecutableJAR,<70MBeasiertoinstallandrunapps

commandline,mavenplugin

builduberJAR

@OMihalyi

Page 17: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

WHATTOAVOID

relyingonrequestscoperelyingonthreadlocalusingsynchronousCDIinterceptorsDon'tjumptoreactivebeforeneeded

@OMihalyi

Page 18: BE REACTIVE AND MICRO WITH A MICROPROFILE STACK€¦ · reactive REST client (JAX-RS) Server-Sent Events Kafka JCA connector Hazelcast distributed cache and other structures NoSQL

QUESTIONS?

Thankyou!

@OMihalyi