![Page 1: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/1.jpg)
Hypermedia-DrivenOrchestrationinMicroservices
IrakliNadareishvili
DevOps:APIManagementandApplicationDevelopment
CATechnologiesDirectorofStrategy,APIAcademySessionDO3T25T
@inadarei#CAWorld
![Page 2: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/2.jpg)
2 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
©2015CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2015presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
![Page 3: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/3.jpg)
3 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Abstract
Hypermedia-DrivenOrchestrationinMicroservicesThenotionof"affordances"hasplayedseminalroleintransformingourunderstandingofusableservicedesign.Itiskeyinhypermediaarchitecturalstyleandenablesustobuildresilientsystems“atthescaleofdecades”.Withthemicroservice architecturalstyle,wecanbuildsystemsthathavehigherdegreesoffreedomthanthosehavingmonolitharchitectures.Insuchsystems,effectiveorchestrationandchoreographyarecrucial.Duringthispresentation, IrakliNadareishvili,DirectorofAPIStrategy,APIAcademy,exploreshypermedia-enabledapproachthatleadsto loosely-coupled,evolvableservicedesign.
IrakliNadareishviliCATechnologiesDirectorofStrategy,APIAcademy
![Page 4: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/4.jpg)
4 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
ArchitecturalStylesandtheDesignofNetwork-based Software,2001- RoyT.Fielding
“Hypermediaisdefinedbythepresenceofapplicationcontrolinformationembeddedwithin,orasalayer
above,thepresentationofinformation”
HypermediaperFielding
![Page 5: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/5.jpg)
5 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
LetAPIserverdynamicallyguideaclientbyrespondingtoclientwithnotjuststatic databutalsocontrolsdescribingAPIaffordances.
Or:Response=Data+Controls
![Page 6: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/6.jpg)
6 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Mostcommonhypermediacontrolsfacilitate:“single,nextstep.”
HypermediaShortcoming?
![Page 7: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/7.jpg)
Howdoweorchestrateloosely-coupledmicroservices
forcomplexworkflows?
![Page 8: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/8.jpg)
8 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Examples:
E-COMMERCE
BOOKINGTRAVEL1
2
![Page 9: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/9.jpg)
9 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
BookingTravel
![Page 10: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/10.jpg)
10 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Saga:Long-LivedCompensatingTransactions
SagawasintroducedbyHectorGarcia-MolinaandKennethSalemin1987.
ExamplescenariobyClemensVasters:http://vasters.com/clemensv/2012/09/01/Sagas.aspx
Car Hotel Flight
RoutingSlip
![Page 11: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/11.jpg)
11 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
@see:http://rels.messages.io
LinkRelationsforSaga:
§ rel =“routing-slip”(microformats)
§ rel =“compensatingtx”(microformats)
![Page 12: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/12.jpg)
12 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
E-Commerce
![Page 13: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/13.jpg)
13 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
3TypesofComplexWorkflows
BROWSING/DISCOVERY—“HYPERMEDIAMAZE”(AMUNDSEN)
CHECKOUT—SERVICE ORCHESTRATION
POST-PURCHASE—SERVICECHOREOGRAPHY
1
2
3
![Page 14: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/14.jpg)
14 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Source:Richardson, Amundsen,Ruby, “RESTfulWebAPIs,”O’Reilly, 2013.
MazeProblems
– MikeAmundsen
“Problemistoocomplextobeunderstoodallatonce,soit’ssplitupintosteps.”
![Page 15: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/15.jpg)
15 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Maze+XML
Source:Richardson, Amundsen,Ruby, “RESTfulWebAPIs,”O’Reilly, 2013.
![Page 16: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/16.jpg)
16 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Checkout
1.CollectShipping Info 2.BillingInfo 3.AuthorizePayment
4.Post-PurchaseProcessing
Checkout:Orchestration
![Page 17: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/17.jpg)
17 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
OrchestrationforWizard-StyleWFs:
StandardIANAlinkrelations:
§ rel =“next”
§ rel =“prev”
![Page 18: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/18.jpg)
18 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Post-Purchaseservice
Shipping Service
E-mailNotificationService
SMS NotificationService
PurchaseCompleted
event
PushNotificationService
Inspiredbyachoreographyexamplein:SamNewman,BuildingMicroservices,O’Reilly,2015.
«subscribes to»
PostPurchase:Choreography
![Page 19: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/19.jpg)
19 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
@see:http://rels.messages.io
ServiceChoreography
§ rel =“hub”(IANAstandard)§ rel =“sub”(new:microformats)§ rel =“unsub”(new:microformats)§ rel =“events”(new:microformats)
Async andevent-driven.Standard:Pubsubhubbub
![Page 20: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/20.jpg)
20 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
TypesofComplexWorkflows
BROWSING/DISCOVERY—“HYPERMEDIAMAZE”(MIKEAMUNDSEN)
CHECKOUT—SERVICEORCHESTRATION
POST-PURCHASE—SERVICECHOREOGRAPHY
1
2
3
DISTRIBUTEDTRANSACTIONS—SAGA4
![Page 21: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/21.jpg)
Aretheremoreworkflowtypes?Probably,but:nexttime!
![Page 22: Hypermedia-Driven Orchestration in Microservices](https://reader031.vdocuments.us/reader031/viewer/2022030314/5885f2831a28ab864f8b614d/html5/thumbnails/22.jpg)
22 ©2015CA.ALLRIGHTSRESERVED.@CAWORLD #CAWORLD
Q&A