Oneofthereasons I amexcitedaboutthistalkisthisissomethingthatisanongoingprojectiswe'retryingtofigureoutwhichapplicationsweshouldmoveto, notonlyintothecloud, butinto a serverlessarchitecture.
ThenicethingisthatinmostcaseswecankeeprunningJavaScriptandtoendwithmaybe a littlebitofbashingthereforsomeofourdoctorcontainersandentrypointsinthattypeofthing.
Sothat's whatwe'regonnatalkabouttoday.
Um, serverLisisoneofthoseveryinterestingterms.
It's been a buzzwordfor a longtime, andit's onethat I reallydon't like.
It's a wayofthinkinginwhichthecloudproviderdynamicallymanagesallocationofmachinerysourcesandthenthepricingitselfisgenerallybasedontheactualconsumptionoftheprocessing.
Sowhateveryouuseiswhatyoupayfor.
Soobviouslythatmeans I'm notthere.
Yes, armsup.
Sothisthisdiagramkindofbreaksdowninto a coupledifferentcategories.
Allofthethingswewouldtalkaboutas a cloudoffering.
Andsomostofthese, I hopemanypeopleinherefamiliarwithsomeofthedifferentbroadcategories.
I asisprettycommon, you'regonnahaveinfrastructuresofservice.
Whetherthat's anonPremdataCenterthatyou'rehavingtopollresourceisfromanhour, Kate, oryou'reusing a C twoinstancesoryou'reusingcomputeinstancesfromwhateverprovidercloudprovideryouuse.
Soyou'vegotyourplatformis a servicethatyou'regoingtostartleveragingandwhat's reallyinterestingandwe'lltalk a littlebitmoreaboutthisiswiththingslikedirectconnectforAWS, andthere's otherthingswithsomeoftheotherserviceofferingsaswell.
Well, inthisdiagram, wekindofseethesteppingstonesbetweenmovingfromouroldmonolithicapplicationsinto a standardwhatwewouldcallthemicroserviceinfrastructureorecosystem.
Okay, soifyou'renotawareofwhateventualconsistency, consistencyis s threeand I toldMileswasgonnahavetoapologizetohim.
I don't knowifhe's inhere.
Allofmyexamplesareeightofus.
I amintentionallydoingprettygenericexamplesbecausethesearethingsyoucandoonanyserviceprovider.
I'm notdoing a salespitchrateofus.
I justjustwhat I knowthebest.
Buteventualconsistencybasicallymeansyoucondonedropanobjectintoan s threebucketforstorage.
Anditmayormaynotbeavailablefor a readrightawaybecauseithasthereplicateacrossdifferentdatacenters.
It's gottoreplicateitcostregions.
Andwhenyou'regetrequestsoryourpollrequestgoesbackout, ifithasn't replicatedallthewayacross, youmighthit a bucketorourregionwhereithasn't propagatedyet.
Andsoeventhoughyoujustwroteitandyougot a success, itmaynotbeavailabletoreadyet.
Andsoweactuallyhad a coupleprojectswerelikeseveralisalsowe'regonnadoonelambtwohere, andit's gonnadropsomethinginthe S three, andit's gonnafirethisthingoffoverhere, andthentheotherlandisgonnapickitupanddomoreprocessingwithit.
Anditwasn't there.
Andtheentireflowgrindsto a halt.
Andwerealizedthatweneedtocallit a B s.
Guys, thegameisonthephone.
We'retalkingwiththem.
Andthequestion, ofcourse.
WhatdidyoureadThe S L.
A.
No, I didn't.
Andasthreeiseventualconsistency, thereis a windowoftimeinwhichthey'restillwithin.
There s L A.
Andaslongasyoucanreaditbackoutwithin a certainlengthoftime, they'reokay.
Andsothesearethingslikethefaulttolerance a synchronicityisYou'redoingmultipleLando's.
They'restateless.
You'vegotthingslikethisthatyouhavetostartjugglingwhereyoudoitinanapplicationlevelon a monolithoreven a microserviceiswhereeachmicroservicecouldmaintainsometypeofstate.
Younowareintroducinglogicalchunksthatarestatelessthathavetobeawareorbeabletoretrieveorrebuildorsaturateordosomethingtobeabletocontinueprocessing, andsothingsthatbeforewe'resomewhatintuitivewithintheapplication, architecturearenowbecomingthingswehavetomanuallythinkthroughanddealwith, oratleastbeawareoflateandseetheonlyreason I bringituphere.
EverynewnetworkhopcanintroduceLeighton, see.
Soifyouhavesomething, let's saywe'vegotthreeMicroService's andthey'retalkingnicelytogetherandeverynewrequest, it's allthreeofthemandit's a handoff.
Ifyou'reconsideringserverlistsas a potentialarchitecture, youneedtoevaluateyouractualsystemwhatitisyou'retryingtobuildandwhatthebenefitsare.
Whatisyour r a y?
What's thecostgonnabe?
Howmanyrequestsareyougonnahaveon?
Andwe'lllookat a coupleofexamplesherein a minutewherewecanactuallytalkthroughsomeofthoseconcerns.
Um, solet's build a littlebit, um, thisslide, we'regonnatalkthrough a coupleoftheoptionsintheAWStoolsetthatactuallyweuseregularlyforserverlessapplications.
Sobroaderarchitecturessomeofthesearearguable.
Theyfallinto a slightlydifferentcategoriesthatmaybesomebodylike, Well, that's notpureserverlist.
That's thebagsorsomething.
Yeah, I getthat.
Butoverall, from a civilisedarchitecturestandpoint, here's a fewthingstobeawareof.
Weused 53 anytimewecantodo D.
N s resolutionbecauseittiessoseamlesslyintosomeoftheotherpieces, liketheFBIgateway.
AndwehadseveralAPeyesthathadbeenbuiltinternallyfordifferentteams, and a securityauditcamethroughandrealizedthatwehadmultipleAPeyesthathadaccesstodatathatwe'renotfrontedwithanytypeofauthenticationnow.
Goodnewsistheywereonlyontheinternalnetwork.
However, theystillwerenotfundedwithauthentication.
Soweweretaskedwithfiguringout a waytotryandfrontexistingAPeyeswithbasicallyinooffstyleauthenticationofsomesort.
Butwecouldgive a P I keysouttoonlythosewhoneedaccesstoit, andwecoulddosometypeoftokenexchangetograntaccessintothoseAPeyes.
Soifyou'veeverdonesomethinglikethatbefore, whereyou'vehadanexisting a p I, andyou'vehadtotryandputsomethinginfrontofit, itcouldbeextremelychallenging.
Andsowhatwewereabletodoistake a, uh, righthere, theFBIgatewayandsetup a basicallyjustanauthorizationpasswordexchange, soyoucantakeyourFBIkeyinyoursecret, andyoucanhitanendpointherethatwillreachoutintothething.
Thisiskindofwheretheapplicationlayer, I guess, fromthelawthingthatwecreated.
Thereasonwechosethisarchitectureisdynamodbtablesallowyoutospecify a t t l oneveryitemthatyoudropintothetableandatthattiTLitwillautoexpirethatitemandremoveitfromyourtable.
Soforthissolution, itworkedreallywellbecauseifwehad, youknow, let's saywehadfiveminutetokensandweonlywantedthemgoodfor a certainamountoftime.
Whateveritis, it's hittingtheendpoint, thencanpickupthattoken, passitofftothe A P I thattheyweretryingtoreachanywayandprovideanauthorizationheaderwith a beartokenonit.
Thatthenfiresoff a secondarylandathatallitknowshowtodoisauthorize.
Theonlythingthat's landeddoesisittakestheheaderanditlooksinheretoseeifitexists, andifithastheappropriatescopesforyoutoexecutewhatyou'retryingtoexecuteand a P I gatewayrighthereactuallyhas a conceptofauthorizeerandtheauthorize, erbasicallysaysyoucancheckyourtoken.
Soapplicationlayer, youendupdoingthehandoffonceeverythinghasbeengrantedandyoumoveforward, Um, thisone, I thinkit's a littlemoreapproachable.
Thisis a fullon.
Ifwewantedtodosomethinglike a mailinglist, wecouldactuallyhavetheraw 53 layerofthe D.
N s resolutionhitan A P I gateway.
Wecanhavethegatewaysimplydroppayloadsinto, like, a registrationbucket.
SoAtlanticandfireoff.
Oh, great.
Youwantedtoregister.
We'regonnadropdropyouremailaddressintodynamodbtable, andthenyoumighthaveanadministratorcominglaterandoneactuallysendanemailandtheycanhit a differentendpointontheFBIgateway.
Andit'llkickyouoverandbuildup a queueofallthe e mailsthatneedtobesent.
Andthenyoucanprocessthemhoweveryoulike.
I wanttojumprealquickandseeif I cando a quickdemoornot.
Sogivemeonemoment, just a coupleminuteshereandallright, sothisis a whirlwind.
I willtellyounow, I'm gonnaprobablyhavetocutthisveryshort.
Soit's a really, reallyrudimentaryemailmanagementormarketingtypething.
Butthat's that's essentiallyallthatthereisinitistheabilitytowireupyou're a P I directlyinto a lambdathatknowshowtoprocessgleanthedatathat's beendroppedinfromsomewhereelse.
Sothatneverdidloadedit.
No.
Allright, well, cometobelater, we'llwhat?
We'llrunthroughit.
Soagain, that's allthisthisdiagramisshowinginthiscase, What I wasdoingisdroppingitinto a Q andSQs, andthenwe'd beabletopullthat Q andpulloutthegeneratedemailstosendoff.
Thisis a veryhighlevelwehavethingslike I amrolls, you'vegotsecuritymodels.
You'vegot V P.
C foryourprivatecloud.
Youhavedirectconnect, which I didmentionwhichletsyourunthingsonyourinternalorbusinessnetwork s sothatyoucanactuallycontrolyoursecuritylittlebitbetterorhavesecuritysharedbetweeninternalandcloudapplications.