event-driven architecture
TRANSCRIPT
![Page 1: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/1.jpg)
Event Driven Architecture Aprimer…
@ShawnWallace
![Page 2: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/2.jpg)
The Great Debate…
MonolithFirst?
http://martinfowler.com/bliki/MonolithFirst.html
MicroservicesFirst?
http://martinfowler.com/articles/dont-start-monolith.html
![Page 3: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/3.jpg)
Monolithic
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
![Page 4: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/4.jpg)
A problem with ‘Monolith First’
Aproductofouragileapproachtoourprojects…smallerfeaturesfinishedearlier.
ThegoalistodeploymoreoCen…thisishard.OnesoluDonistohavesmallerapplicaDons.
![Page 5: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/5.jpg)
Monolithic
Invoicing Inventory
Logging
Profiles
Warehouse
Orders
![Page 6: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/6.jpg)
SOA
Orders Invoicing Inventory
Logging Profiles Warehouse
![Page 7: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/7.jpg)
SOA
Orders Invoicing Inventory
Logging Profiles Warehouse
TightlyCoupled
![Page 8: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/8.jpg)
SOA with Enterprise Service Bus
Orders Invoicing Inventory
Logging Profiles Warehouse
STILLTightlyCoupled
EnterpriseServiceBus
![Page 9: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/9.jpg)
Event Driven Architecture
• AnEventisrepresentssomethingthathappensinadomain• CustomerSubmitsOrder• CustomerBilled• PaymentReceived• OrderReadyforShipment• OrderShipped
• WhileEventsandtheirpayloadaredesignedattheenterprisesystemlevel,theirimplementaDonsareleCtothespecificsubsystems.
![Page 10: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/10.jpg)
Event Driven Architecture
• Nopoint-to-pointintegraDons• Looselycoupled,highlyscalablesystems• Looselycoupled,TEAMS• Easiertotest• Easiertochange• TopologyagnosDc
![Page 11: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/11.jpg)
Loosely Coupled
Orders Invoicing Inventory
Logging Profiles ReporDng
EventBus
![Page 12: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/12.jpg)
Easy to Integrate New Systems
Orders Invoicing Inventory
Logging Profiles ReporDng
EventBus
NewSystem
![Page 13: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/13.jpg)
Easy to Test
![Page 14: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/14.jpg)
InventoryInventory
Inventory
Scales
Orders Invoicing Inventory
Logging Profiles ReporDng
EventBus
![Page 15: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/15.jpg)
The basic thesis of this article is that organizations which design systems (in the broad sense used here) are constrained to produce designs which are copies of the communication structures of these organizations. --- Melvin Conway
![Page 16: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/16.jpg)
Easily Modeled as a finite state diagram
![Page 17: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/17.jpg)
Other benefits
• Easeof3rdpartyintegraDon• ExisDngsystemscanbe‘wrapped’• Canbedeliberateaboutscaling• Faulttolerant• Eventmessagescanbeloggedand‘replayed’• CantestsubsystemsinisolaDon
![Page 18: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/18.jpg)
A Retail System
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 19: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/19.jpg)
A Retail System – PlaLorm AgnosMc
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 20: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/20.jpg)
Order Accepted Event is generated
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 21: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/21.jpg)
Customer Billed Event
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 22: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/22.jpg)
Order Ready for Shipment Event
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 23: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/23.jpg)
Order Shipped
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 24: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/24.jpg)
Logger Consumes EVERY Event
Sales Logger
Invoicing Shipping Warehouse
RabbitMQExchange
![Page 25: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/25.jpg)
Logger Consumes EVERY Event
![Page 26: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/26.jpg)
![Page 27: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/27.jpg)
For Further Reading
• THISpresentaDon(andcode)onGitHubhXps://github.com/shawnewallace/choreographed_process• StephanNorbergEDAhXp://www.infoq.com/presentaDons/Domain-Event-Driven-Architecture• “ProgrammingWithoutaCallStack”hXp://www.enterpriseintegraDonpaXerns.com/docs/EDA.pdf• “Event-DrivenArchitectureOverview”• hXp://www.omg.org/soa/Uploaded%20Docs/EDA/bda2-2-06cc.pdf
![Page 28: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/28.jpg)
Shawn WallaceWork:
[email protected]: @ShawnWallace
Blog: blog.shawnewallace.comhttp://www.about.me/shawnwallace
![Page 29: Event-driven Architecture](https://reader031.vdocuments.us/reader031/viewer/2022030305/5871ac851a28abda6a8b5b3b/html5/thumbnails/29.jpg)
• Event-drivenarchitectureisaversaDleapproachtodesigningcomplexsoCwaresystems.ThesesystemstendtobeeasiertomodelforanorganizaDonasEDAembracesConway’sLawandcanoCenbemodeledasafinitestatemachine.Event-drivenarchitectureisnotanewconcept,butasmoreorganizaDonsembracemicroservices,thisapproachtosystemdesignhasbecomeappropriateinmoresituaDons.Inthistalkwe’ll:introduceevent-drivenarchitecture,talkaboutkeycomponents,lookatasampleimplementaDonofaretailsystem.