applying domain driven design to apis and...
TRANSCRIPT
Outside-InAPIDesignApproachWeb
Applica3on
APIDesign–“TheContract”
InternalApplica3onAPIConsumer Mobile
Applica3on
Highcohesioninternallyforclosely-relatedfuncIonality
Loosecouplingexternallyacrossmoduleswithoutinternaldetails
HighCohesion+LooseCoupling
package package
public
PublicAPIsencourageloosecouplingbetweenmodules
API
Scopingrulesrestrictaccessoutsideofmodules
X
API-CentricSoPwareDesign
SystemsDesignSystem
Subsystem Subsystem
Module Module
Module Module
Subsystem Subsystem
Module Module
API
API
API
System/SoluIon
Subsystem Subsystem
Subsystem
Module ModuleModule Module
Module ModuleModule Module
Module ModuleModule Module
Module Module
Module Module
DomainDrivenDesign(DDD)
u MapsdomainconceptsintosoPwareu Heavydomainexpertinvolvementu Commonvocabulary(“UbiquitousLanguage”)u Boundary-driven(“BoundedContext”)u ApplylearningoverIme
MicroserviceArchitecture
u Loosely-coupled,service-orientedarchitectureu ApplyboundedcontexttolimitcogniIveloadu IndependentlydeployableviaautomaIonu EnablereplaceabilityandexperimentaIonu Encouragecomposabilityofthebusinessu Bestforlargeteams,orco-locateddisparatedata
ListAvailInventory
DistributorAddProducttoOrder
CompleteOrder
CancelBooking
AddProducttoInventory
UpdateProductQty
LocateBooking
RedeemBooking
PointOfSale
RemoveProduct
Customer
Operator
Operator
OrderMgmtListAvailInventory
DistributorAddProducttoOrder
CompleteOrder
CancelBooking
AddProducttoInventory
UpdateProductQty
LocateBooking
RedeemBooking
Operator
PointOfSale
RemoveProduct
Customer
Operator
InventoryMgmt
Fulfillment
OrderAPIListAvailInventory
DistributorAddProducttoOrder
CompleteOrder
CancelBooking
AddProducttoInventory
UpdateProductQty
LocateBooking
RedeemBooking
PointOfSale
RemoveProduct
Customer
Operator
InventoryAPI
FulfillmentAPI
Operator
OrderAPIListAvailInventory
DistributorAddProducttoOrder
CompleteOrder
CancelBooking
AddProducttoInventory
UpdateProductQty
LocateBooking
RedeemBooking
Operator
RemoveProduct
InventoryAPI
FulfillmentAPI
#1 #2`
PointOfSale
OrderAPIListAvailInventory
AddProducttoOrder
CompleteOrder
CancelBooking
AddProducttoInventory
UpdateProductQty
LocateBooking
RedeemBooking
RemoveProduct
InventoryAPI
FulfillmentAPI
OrderAPI
ProductAvailabiliIes
Orders
ProductInventory
Bookings
InventoryAPI
FulfillmentAPI
SameenIty(Products),Conceptuallydifferentto
theAPIcontext!
Availabili3es-product
-date(s)avail-qtyavail
Orders-bookings-ordertotal
Products-name
-availschedule
Bookings-product-date(s)-status
Availabili3es-product
-date(s)avail-qtyavail
availabilityChanged()
Orders
-bookings-ordertotal
created()updated()
Products-name
-availschedule
created()removed()updated()
Bookings-product-date(s)-Status
redeemed()cancelled()
Availabili3es-product
-date(s)avail-qtyavail
availabilityChanged()
Orders
-bookings-ordertotal
created()updated()
Products-name
-availschedule
created()removed()updated()
Bookings-product-date(s)-status
redeemed()cancelled()
OrderAPI InventoryAPI
FulfillmentAPI
PublicAPIstargetdurabilitythroughexternalcontracts
MicroserviceAPIstarget
evoluIonthroughexperimentaIonPhotoCredit:h,ps://www.flickr.com/photos/libel_vox
Availabili3esService
OrdersService
ProductsService
BookingsService
OrdersHTTPAPI
InventoryHTTPAPI
FulfillmentHTTPAPI
Availabili3esService
OrdersService
ProductsService
BookingsService
OrdersHTTPAPI
InventoryHTTPAPI
FulfillmentHTTPAPI
PaymentService
RefundService
Alexa
VoiceSkill
API
Gatew
ay
API
Gatew
ay
Messaging
…Microservice
…
API
…Microservice
…
API
…Microservice
…
API
…Microservice
…AP
I
Slack
Chatbo
tWeb
+
Mob
ileApp
API
Gatew
ay
MicroserviceArchitecture
MigraIngtoMicroservices1. UseAPIFacadestodefineclearinterfaces2. Separatecomplexconcernsintoseparate
services3. UseServiceObjectPaeerntodecompose4. Buildanautomateddeploymentpipeline5. Migrateserviceobjectstomicroservices
TheComposableWorldofAPIs
Offers API
Inventory API
Bookings API
Identity API
Accounts API
Rewards API
Partners
Internal Developers
Public App Developers
Consumers
Third-party Approved Apps