microservices built for digital consumption
TRANSCRIPT
World®’16
MicroservicesBuiltforDigitalConsumptionLouPowell– FoundingPartner– Vanick Digital
DO3X23V
DEVOPS
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
TheMicroservice patternhasbeenaroundforover10years,butthedigitalrevolutionhaselevatedthevisibilityandvalueofthispattern.InthissessionwewillcoverdesignpatternsandconsiderationsforbuildingMicroservices thatallowyourorganizationtofuelhighlyperformantdigitalexperiences.
LouPowell
Vanick DigitalFoundingPartner
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
TherecentinterestinMicroservices hasbeenspurredprimarilybybusinessdemandtodelivertechnologysolutionsthatsolveDigitalproblemsfaster.
So,asyoubuildyourMicroservices,hereareafewdesignconsiderationsthatyoucanapplythatwillensurethatyoursolutionmeetsdigitalexpectations.
LouPowell
VanickDigitalFoundingPartner
“Themarriageofsomereallygreatclientappswithsomereallygreatcloudservicesisincrediblypowerful"
-SteveJobs2007@D3PriortotheiPhoneLaunch
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
5DesignPrinciples
1. FaçadeorBfFs ServiceLayer
2. Cacheability
3. Performance
4. ABAC
5. ReduceFriction
forDigitalFriendlyMicroservices
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
FaçadePattern
§ The facadepattern (or façadepattern)isa softwaredesignpattern commonlyusedwith object-orientedprogramming.Thenameisbyanalogytoan architecturalfacade.
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Backends forFrontends(BfF)
TheBFFistightlycoupledtoaspecificuserexperience,andwilltypicallybemaintainedbythesameteamastheuserinterface,therebymakingiteasiertodefineandadapttheAPIastheUIrequires,whilealsosimplifyingprocessofliningupreleaseofboththeclientandserver components.
Source:http://samnewman.io/patterns/architectural/bff/
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DigitalArchitectureLayers
Omnichannel
Platforms
APIs
CoreServices&Microservice
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Overtime,Hootsuitehasclassifiedtheirmicroservicesintothreecategories:dataservicesthatencapsulatekeybusinessentitiesandensurescalability,functionalservicesthatcombinedataserviceswithbusinesslogictoexecutecorebusinesslogic,andfaçadeservicesthatdecoupleconsumercontractsfromcorefunctionallogic.
HootSuite
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ThekeydriverforthisredesignedAPIisthefactthattherearearangeofdifferencesacrossthe800+devicetypesthatwesupport.MostAPIs(includingtheRESTAPIthatNetflixhasbeenusingsince2008)treatthesedevicesthesame,inagenericway,tomaketheserver-sideimplementationsmoreefficient.Andthereisgoodreasonforthisapproach.ProvidinganOSFAAPIallowstheAPIteamtomaintainasolidcontractwithawiderangeofAPIconsumersbecausetheAPIteamissettingtherulesforeveryonetofollow.
Whileeffective,theproblemwiththeOSFAapproachisthat itsemphasisistomakeitconvenientfortheAPIprovider,nottheAPIconsumer.Accordingly,OSFAisignoringthedifferencesofthesedevices;thedifferencesthatallowustomoreoptimallytakeadvantageoftherichfeaturesofferedoneach.
Netflix
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ConsumerFocusedThisservicelayerisconstructedbasedonthespecificusecasesoftheconsumer,makingconsumptionandadoptionoftheservicesimplerandmoresuccessful.
BenefitsofFaçadeorBfF Services
SimplifyCoreServicesBypushingthespecificconsumptionneedsoftheconsumersup,youwillbeabletomaintainasimple,comprehensible,generalpurposecoreservice.
ExpectedTransienceThislayerisintendedforfragmentation,iterationandinnovation.Changeisgood,aslongasadoptionfollows.
HelpsManageRiskTheabilitytoquicklysurfaceanewendpointswithoutdisruptingexistingendpointsbasedonriskwillallowforprogramvelocity.
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
UnderstandingWhyWeCache
§ ReduceDataRetrievalTimes
§ ReduceComputeTime
§ ShortenthePipe
§ ReduceSystemandNetworkLoad
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Microservice CacheConsiderations
§ Understandconsumptionpatterns
§ Cachedatabasedonconsumption
§ Cacheoptimizedofrequests
§ Cacheoptimizedforpayloads
§ Cachethefaçade
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ConsumerExperienceExpectations
TTFBmeasuresthedurationfromtheuserorclientmakinganHTTPrequesttothefirstbyteofthepagebeingreceivedbytheclient'sbrowser.
TTI isthepointatwhichapagedisplaysitsprimaryinteractivecontentthatwillallowausertoreasonandact.
APICalls APICalls
Over100Resources
LessThan2Seconds
https://www.sitepoint.com/average-page-weight-increased-another-16-2015/
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
CQRS
CommandQueryResponsibilitySegregation(CQRS)isanarchitecturalpatternthatseparatesreadingandwritingdataintotwodifferentmodels.
CQRSisabestfitpatternfordigitalconsumptionwherequerydemandonthedataisexponentiallyhigherthancommand(resourcestatechange)ordifferentindatastructure.
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
PolyglotPersistenceofData
§ Choosetherightdatastorefortheproblembeingsolved
§ Chooseadatastorethatwillgivethebestperformance
§ Chooseadatastorethatyouhavecommittedtosupportingandhaveexpertisein
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Role-basedaccesscontrol (RBAC)isamethodofregulatingaccesstocomputerornetworkresourcesbasedontherolesofindividualuserswithinanenterprise.Inthiscontext,accessistheabilityofanindividualusertoperformaspecifictask,suchasview,create,ormodifyafile.
ABAC isalogicalaccesscontrolmodelthatisdistinguishablebecauseitcontrolsaccesstoobjectsbyevaluatingrulesagainsttheattributesoftheentities(subjectandobject)actionsandtheenvironmentrelevanttoarequest.
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SmartEndpoints– DumbPipes
Themicroservice communityfavorssmartendpoints
anddumbpipes.Applicationsbuiltfrom
microservices aimtobeasdecoupledandas
cohesiveaspossible- theyowntheirowndomain
logicandactmoreasfiltersintheclassicalUnix
sense- receivingarequest,applyinglogicas
appropriateandproducingaresponse.Theseare
choreographedusingsimpleRESTish protocolsrather
thancomplexprotocolssuchasWS-Choreographyor
BPELororchestrationbyacentraltool.
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
FrictionlessDataFlow
§ DesignStandards
§ Vocabulary
§ Objects
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.27 @CAWORLD#CAWORLD
DevOps– APIManagementandApplicationDevelopment
FormoreinformationonDevOps– APIManagementandApplicationDevelopment,pleasevisit:http://cainc.to/DL8ozQ