microservices built for digital consumption

28
World ® ’1 6 Microservices Built for Digital Consumption Lou Powell – Founding Partner – Vanick Digital DO3X23V DEVOPS

Upload: ca-technologies

Post on 16-Apr-2017

185 views

Category:

Technology


1 download

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

6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

FaçadeLayerorBack-endforFront-end

(BfF)

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

12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

FaçadeorBfF Serivces

FaçadesorBfF

Microservices

13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ConsumerFocusedThisservicelayerisconstructedbasedonthespecificusecasesoftheconsumer,makingconsumptionandadoptionoftheservicesimplerandmoresuccessful.

BenefitsofFaçadeorBfF Services

SimplifyCoreServicesBypushingthespecificconsumptionneedsoftheconsumersup,youwillbeabletomaintainasimple,comprehensible,generalpurposecoreservice.

ExpectedTransienceThislayerisintendedforfragmentation,iterationandinnovation.Changeisgood,aslongasadoptionfollows.

HelpsManageRiskTheabilitytoquicklysurfaceanewendpointswithoutdisruptingexistingendpointsbasedonriskwillallowforprogramvelocity.

14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

BuiltforCacheability

Cache

15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

UnderstandingWhyWeCache

§ ReduceDataRetrievalTimes

§ ReduceComputeTime

§ ShortenthePipe

§ ReduceSystemandNetworkLoad

16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Microservice CacheConsiderations

§ Understandconsumptionpatterns

§ Cachedatabasedonconsumption

§ Cacheoptimizedofrequests

§ Cacheoptimizedforpayloads

§ Cachethefaçade

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

(TTI)Performance

(TTFB)

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

21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

AttributeBasedAccessControl

(ABAC)

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Role-basedaccesscontrol (RBAC)isamethodofregulatingaccesstocomputerornetworkresourcesbasedontherolesofindividualuserswithinanenterprise.Inthiscontext,accessistheabilityofanindividualusertoperformaspecifictask,suchasview,create,ormodifyafile.

ABAC isalogicalaccesscontrolmodelthatisdistinguishablebecauseitcontrolsaccesstoobjectsbyevaluatingrulesagainsttheattributesoftheentities(subjectandobject)actionsandtheenvironmentrelevanttoarequest.

23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

RemoveFriction

SmartEndpointsDumbPipes

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

26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Stayconnectedatcommunities.ca.com

Thankyou.

@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.27 @CAWORLD#CAWORLD

DevOps– APIManagementandApplicationDevelopment

FormoreinformationonDevOps– APIManagementandApplicationDevelopment,pleasevisit:http://cainc.to/DL8ozQ

[email protected]

LouPowell

@vanicklou

https://www.linkedin.com/pub/lou-powell/4/ba1/170

vanick.com