TechDays 2017 - Scalable Enterprise Applications with CQRS and Service Fabric

TechDays 2017 - Scalable Enterprise Applications with CQRS and Service Fabric

In this session we will show how we use CQRS and event sourcing to deploy our ERP solution on Service Fabric. We will talk about the pitfalls and the lessons learned. But we will also talk about how we keep this maintainable and testable by applying the ports and adapters approach from hexagonal architecture.

03dc1d993fa7d5de422c1f35d53f80e6?s=128

Michiel Overeem

October 13, 2017
Tweet

Transcript

  1. michiel.overeem@afas.nl @michielovereem

  2. 400+ employees (4 locations) 10.500 customers (companies) AFAS Software

  3. HRM, CRM, finance, order management, project management, workflow, ... AFAS

    Profit
  4. Filmpje mark (eerste plaat van het filmpje hier) 4752 cores,

    70 TB RAM, 380 TB SSD storage 18.000 concurrent RDP users 450.000 unique users a month 5.600.000 API calls a day AFAS Online (89% customers)
  5. None
  6. Client Command system Query system Eventing system

  7. Client Command system Query system Eventing system “PlaceOrderCommand”: { “OrderId”:

    “0b81b458-7671-4e9b-844b-9934255f5406”, “CustomerName”: “Linus Torvalds”, “OrderLines”: [ … ] }
  8. Client Command system Query system Eventing system The command system

    validates the command, using its own datamodel.
  9. Client Command system Query system Eventing system “OrderPlacedEvent”: { “OrderId”:

    “0b81b458-7671-4e9b-844b-9934255f5406”, “CustomerName”: “Linus Torvalds”, “OrderLines”: [ … ] }
  10. Client Command system Query system Eventing system Broadcasts the events

    to the query system.
  11. Client Command system Query system Eventing system Projection of data

    optimized for quering.
  12. Client Command system Query system Eventing system “GetPlacedOrdersQuery”: { “CustomerName”:

    “Linus Torvalds” }
  13. Client Command system Query system Eventing system And responds to

    queries send by the client.
  14. Client Command system Query system Eventing system Use the events

    published to built up the state in the Command system.
  15. Client Command system Query system Eventing system Use the events

    published to built up the state in the Command system.
  16. Client Command system Query system Eventing system

  17. None
  18. None
  19. None
  20. Next Generation ERP

  21. Client Command system Query system Eventing system

  22. Client Command system Query system Eventing system

  23. None
  24. Client Command system Query system Eventing system “PlaceOrderCommand”: { “OrderId”:

    “0b81b458-7671-4e9b-844b-9934255f5406”, “CustomerName”: “Linus Torvalds”, “OrderLines”: [ … ] }
  25. Client Command system Query system Eventing system “OrderPlacedEvent”: { “OrderId”:

    “0b81b458-7671-4e9b-844b-9934255f5406”, “CustomerName”: “Linus Torvalds”, “OrderLines”: [ … ] }
  26. Client Query system Eventing system Load balancer

  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. Client Query system Eventing system Load balancer “PlaceOrderCommand”: { “OrderId”:

    “0b81b458-7671-4e9b-844b-9934255f5406”, “CustomerName”: “Linus Torvalds”, “OrderLines”: [ … ] }
  35. None
  36. None
  37. Client Command system Query system Eventing system

  38. Client Command system Query system Eventing system “OrderPlacedEvent”: { “OrderId”:

    “0b81b458-7671-4e9b-844b-9934255f5406”, “CustomerName”: “Linus Torvalds”, “OrderLines”: [ … ] }
  39. Client Command system Query system Eventing system

  40. Client Command system Eventing system Load balancer

  41. None
  42. None
  43. None
  44. None
  45. None
  46. None
  47. Client Command system Eventing system Load balancer

  48. None
  49. None
  50. Client Command system Eventing system Load balancer

  51. None
  52. None
  53. None
  54. are made, the system

  55. Client Load balancer

  56. Client Load balancer

  57. None
  58. Client Load Balancer

  59. Client Load Balancer

  60. Client Load Balancer

  61. None
  62. None
  63. None
  64. None
  65. Client Load Balancer

  66. Client Load Balancer

  67. Client Load Balancer

  68. Client Load Balancer

  69. Client Load Balancer

  70. Client Load Balancer

  71. Client Load Balancer

  72. Client Load Balancer

  73. michiel.overeem@afas.nl @michielovereem https://dev.afas.nl