Event-driven architecture

5e6931750500ceff304695657dc84ef0?s=47 Evandro Mohr
September 26, 2019

Event-driven architecture

Palestra apresentada no PHP community summit 2019 em SP

5e6931750500ceff304695657dc84ef0?s=128

Evandro Mohr

September 26, 2019
Tweet

Transcript

  1. 1 EVENT-DRIVEN ARCHITECTURE

  2. Evandro Mohr Developer Pilot Professor Photographer

  3. 1. The quest for scalability 3 A tale of a

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

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

    New team members • New technologies Software • Usage • Concurrency • Stored data • Availability
  6. Scalability cube 6 y-axis x-axis z-axis

  7. Monolithic Application 7 Monolithic Application Data Storage Database

  8. 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
  9. 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
  10. 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
  11. 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
  12. 2. Microservices 12 The silver bullet...

  13. 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
  14. 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
  15. Microservices & API Gateway Approach 15

  16. EVENT SOURCING 16

  17. “ 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
  18. Log- Structured Approach 18

  19. “ 19

  20. “ 20

  21. 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
  22. Event-Driven Architecture 22

  23. Microservices & Event Sourcing Approach 23

  24. Event Sourcing & Data streams Approach 24

  25. Integrate Legacy Applications 25

  26. A better Microservices Approach 26

  27. Questions? 27

  28. 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
  29. Thank you very much for your time 29