BEREACTIVEANDMICROWITHAMICROPROFILE
STACK
OndrejMihályi@omihalyi
WHATDOWEWANT?
@OMihalyi
thereshouldbeaPROBLEMtosolve
WHYDOWEWANTIT?
@OMihalyi
BETTERUSEREXPERIENCE
updateswhenready,reducedwaitingerrorsraisedASAPuserscanreactfasteravoidsunnecessaryuserretries
@OMihalyi
HANDLEHIGHLOADS
utilizeresourcesatmaximum(CPU)threadsaren'twastedbyblockingavoidblockingofnewrequests
@OMihalyi
HANDLEMASSIVELOADS
scaletomorenodesmessagingtodistributetheload
@OMihalyi
DON'TFORGETABOUTFAILURES
failfastandavoidwastemakesurefailuresarehandledfailureshappenalotmoreindistributedsystems
@OMihalyi
WHATISMICROPROFILE?
open-sourcespecificationforJavamicroservices( )microprofile.io
@OMihalyi
REACTIVESUPPORTINMICROPROFILE
AsynchronousREST(JAX-RS)CDIeventseasyFaultToleranceMonitoringviaMetrics
@OMihalyi
WE'LLADDWHAT'SMISSING
RxJavahandlecallbacksanddatastreams
asynchronousFaultTolerance
React.jseasyupdatesonevents
@OMihalyi
OURDEMOAPPLICATION
@OMihalyi
DEMOSource:https://github.com/OndrejM-demonstrations/Reactive-and-Micro-
with-MicroProfile-and-Payara
@OMihalyi
WE'LLADDMORE
JavaEE8reactiveRESTclient(JAX-RS)Server-SentEvents
KafkaJCAconnectorHazelcast
distributedcacheandotherstructuresNoSQLdistributeddatastore
@OMihalyi
DEMO
@OMihalyi
PAYARASERVER
MicroProfile,JavaEE,Hazelcast,CloudJCAConnectors,CDIeventbusdynamicclustering(suitableforcloud)fastdevelopmentadminconsolemonitoring
@OMihalyi
PAYARAMICRO
APIsasinServer(exceptSOAP,remoteEJB)mostoffeaturesoftheServerexecutableJAR,<70MBeasiertoinstallandrunapps
commandline,mavenplugin
builduberJAR
@OMihalyi
WHATTOAVOID
relyingonrequestscoperelyingonthreadlocalusingsynchronousCDIinterceptorsDon'tjumptoreactivebeforeneeded
@OMihalyi
QUESTIONS?
Thankyou!
@OMihalyi