Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Event-driven architecture

Evandro Mohr
September 26, 2019

Event-driven architecture

Palestra apresentada no PHP community summit 2019 em SP

Evandro Mohr

September 26, 2019
Tweet

More Decks by Evandro Mohr

Other Decks in Programming

Transcript

  1. “ 4 Scalability is the property of a system to

    handle a growing amount of work by adding resources to the system.
  2. 5 Scalability Development • New features • Continuous Deployment •

    New team members • New technologies Software • Usage • Concurrency • Stored data • Availability
  3. Monolithic Application 8 Shop Rich UI Shop UI UI Logic

    GUI Data Storage Shared database Shop Backend Application Search Facade Order DAO Customer DAO Order Facade Business Data Product DAO GUI Data Customer UI Customer BO Customer Fat Client App
  4. Business Entity Service Customer BAS SOAP Payment BAS SOAP Product

    BAS SOAP Order BAS SOAP Business Activity Service Custer BAS SOAP Search BAS SOAP Order BAS SOAP SOA Approach 9 Shop Rich UI Shop UI UI Logic GUI Shop UI App Shop UI UI Logic GUI Data Storage Customer Database Order and Product DB
  5. Virtualized SOA Approach 10 Shop UI App Shop UI UI

    Logic GUI Shop Web App Shop UI UI Logic GUI The raise of the Enterprise Service Bus (ESB) Service Virtualization Layer SOAP Custer BAS SOAP Search BAS SOAP Order BAS S O A P Customer BAS Business Activity Service S O A P Payment BES S O A P Product BES S O A P Order BES Business Entity Service Data Storage Order and Product DB Customer Database Service Bus
  6. Orchestrated & Virtualized SOA Approach 11 Service Bus Shop UI

    App Shop UI UI Logic GUI Shop Web App Shop UI UI Logic GUI The raise of orchestration engines (BPEL & BPMN) Service Virtualization Layer SOAP Custer BAS SOAP Search BAS SOAP Order BAS S O A P Customer BAS Business Activity Service S O A P Payment BES S O A P Product BES S O A P Order BES Business Entity Service Data Storage Order and Product DB Customer Database Orchestration
  7. Customer Logic Customer Customer API REST Order Logic Order Order

    API REST Order Microservice Stock Logic Stock Stock API REST Stock Microservice Product Logic Product Product API REST Product Microservice Microservices Approach 13 Shop Web App GUI UI Logic Shop UI
  8. Microservices & API Gateway Approach 14 Shop Web App GUI

    UI Logic Shop UI Customer Logic Customer Customer API REST Order Logic Order Order API REST Order Microservice Stock Logic Stock Stock API REST Stock Microservice Product Logic Product Product API REST Product Microservice 14
  9. “ 17 Event Sourcing ensures that all changes to application

    state are stored as a sequence of events. Not just can we query these events, we can also use the event log to reconstruct past states, and as a foundation to automatically adjust the state to cope with retroactive changes. - Martin Fowler
  10. Event-Driven Architecture 21 ▪ 100% accurate audit logging ▪ Easy

    temporal queries ▪ Asynchronous communication ▪ Data Consistency ▪ Data recovery ▪ Horizontal scaling ▪ Loosely coupled services ▪ Act as Message Broker ▪ Idempotence
  11. References 28 • https://guidoschmutz.wordpress.com/ • http://microservices.io • https://kafka.apache.org/ • https://martinfowler.com/eaaDev/EventSourcing.html

    https://www.confluent.io/blog/data-dichotomy-rethinking-the-way-we -treat-data-and-services/ • https://engineering.linkedin.com/distributed-systems/log-what-every-s oftware-engineer-should-know-about-real-time-datas-unifying • https://medium.com/@hugo.oliveira.rocha/what-they-dont-tell-you-abo ut-event-sourcing-6afc23c69e9a