SlideShare une entreprise Scribd logo
1  sur  18
Beyond DDD: uno sguardo a
CQRS and event sourcing
about me

 {
     "firstName": "Alessandro",
     "lastName": "Melchiori",
     "role": "software architect @ codiceplastico",
     "contacts": [
                { "type": "email", "value": alessandro@codiceplastico.com },
                { "type": "twitter", "value": "@amelchiori" },
                { "type": "blog", "value": http://blog.codiceplastico.com/melkio }
      ]
 }
Il contesto
• Applicazione finanziaria (non “always online”)

• Circa 70 utenti

• 250.000+ aziende

• 750.000+ bilanci

• 70.000.000+ voci di bilancio

• 16.000+ call/mese

• “Pluggato” a servizi di terze parti

• Picchi di lavoro “temporali” (…la nuvola può darci una mano)
Agenda
• Com’era

• Com’è

• Come sarà
Presentation Layer
                            Come era…



Service/Application Layer




     Domain Model
           Storage
Come era…
Come era…
Come era…
I problemi…
• Logica (mal) sparpagliata

• Contesti non definiti

• Modello “fragile” e poco propenso alle evoluzioni

• Un unico modello per la lettura e per la scrittura

• Prestazioni

• UI “generazionalista”
DDD: brevi cenni
• Use AGGREGATES as unit of consistency across your domain
  model

• Protect your model with clearly defined BOUNDED CONTEXT

                                                      (Eric Evans)




          BC 01             BC 02             BC 03
DDD: brevi cenni
• It’s really become clear to me in the last couple of years that we
  need a new building block and that is the Domain Events

                                                           (Eric Evans)




            BC 01              BC 02               BC 03
CQRS / ES: brevi cenni
• Every method should either be a command that performs an
  action, or a query that returns data to the caller, but NOT BOTH

                                                 (Bertrand Meyer)
CQRS / ES: brevi cenni
• A single model cannot be appropriate for reporting, searching
  and transactional behavior

• State transition are an important part of our problem space and
  should be modeled within our domain

                                              (Greg Young, 2008)
L’evoluzione
Presentation Layer
                                                    Come è…


                             Service Layer




Read storage                Domain Model
                                    Write storage
Come sarà…


                       Worker / Web Role
      Service Bus
                                        ACS
                    AZURE ?
      Blob Storage       MongoDb
                       (PaaS or SaaS)
Quando
    DDD/CQRS/ES
    fanno per me?

Chiedilo al «tuo» UBIQUITOUS LANGUAGE

                            (Alessandro Melchiori)
Quando
      DDD/CQRS/ES
      fanno per me?

Tackling Complexity in the Heart of Software

Contenu connexe

Similaire à Beyond DDD: uno sguardo a CQRS e event sourcing

Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesisPawel Szulc
 
Raleigh Kafka Meetup - DDD, ES, and CQRS
Raleigh Kafka Meetup - DDD, ES, and CQRSRaleigh Kafka Meetup - DDD, ES, and CQRS
Raleigh Kafka Meetup - DDD, ES, and CQRSJeff Dutton
 
Stuff About CQRS
Stuff About CQRSStuff About CQRS
Stuff About CQRSthinkddd
 
The Yin and Yang of Software
The Yin and Yang of SoftwareThe Yin and Yang of Software
The Yin and Yang of Softwareelliando dias
 
Melbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureMelbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureSaul Caganoff
 
Microservices architecture enterprise architecture
Microservices architecture enterprise architectureMicroservices architecture enterprise architecture
Microservices architecture enterprise architectureAdhiguna Mahendra
 
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureCQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureThomas Jaskula
 
Microservices architecture: practical aspects
Microservices architecture: practical aspectsMicroservices architecture: practical aspects
Microservices architecture: practical aspectsAntonio Sagliocco
 
AWS Customer Presentation - Autodesk
AWS Customer Presentation - AutodeskAWS Customer Presentation - Autodesk
AWS Customer Presentation - AutodeskAmazon Web Services
 
How Autodesk uses Amazon VPC
How Autodesk uses Amazon VPCHow Autodesk uses Amazon VPC
How Autodesk uses Amazon VPCguestda111d9
 
AWS Customer Presentation - Autodesk
AWS Customer Presentation - AutodeskAWS Customer Presentation - Autodesk
AWS Customer Presentation - AutodeskAmazon Web Services
 
Spring cloud-netflix-oss-microservices
Spring cloud-netflix-oss-microservices Spring cloud-netflix-oss-microservices
Spring cloud-netflix-oss-microservices Staples
 
Docker - Scripting the PayPal Cloud
Docker - Scripting the PayPal CloudDocker - Scripting the PayPal Cloud
Docker - Scripting the PayPal CloudAbraham Hoffman
 
Rethink your architecture - Marten Deinum
Rethink your architecture - Marten DeinumRethink your architecture - Marten Deinum
Rethink your architecture - Marten DeinumNLJUG
 
Things to think about while architecting azure solutions
Things to think about while architecting azure solutionsThings to think about while architecting azure solutions
Things to think about while architecting azure solutionsArnon Rotem-Gal-Oz
 
Idiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRSIdiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRSAndrea Saltarello
 
Agile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemAgile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemTurja Narayan Chaudhuri
 

Similaire à Beyond DDD: uno sguardo a CQRS e event sourcing (20)

Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesis
 
Raleigh Kafka Meetup - DDD, ES, and CQRS
Raleigh Kafka Meetup - DDD, ES, and CQRSRaleigh Kafka Meetup - DDD, ES, and CQRS
Raleigh Kafka Meetup - DDD, ES, and CQRS
 
Stuff About CQRS
Stuff About CQRSStuff About CQRS
Stuff About CQRS
 
The Yin and Yang of Software
The Yin and Yang of SoftwareThe Yin and Yang of Software
The Yin and Yang of Software
 
Melbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureMelbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new Architecture
 
Microservices architecture enterprise architecture
Microservices architecture enterprise architectureMicroservices architecture enterprise architecture
Microservices architecture enterprise architecture
 
Service as-a-software
Service as-a-softwareService as-a-software
Service as-a-software
 
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureCQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architecture
 
Microservices architecture: practical aspects
Microservices architecture: practical aspectsMicroservices architecture: practical aspects
Microservices architecture: practical aspects
 
AWS Customer Presentation - Autodesk
AWS Customer Presentation - AutodeskAWS Customer Presentation - Autodesk
AWS Customer Presentation - Autodesk
 
How Autodesk uses Amazon VPC
How Autodesk uses Amazon VPCHow Autodesk uses Amazon VPC
How Autodesk uses Amazon VPC
 
AWS Customer Presentation - Autodesk
AWS Customer Presentation - AutodeskAWS Customer Presentation - Autodesk
AWS Customer Presentation - Autodesk
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Spring cloud-netflix-oss-microservices
Spring cloud-netflix-oss-microservices Spring cloud-netflix-oss-microservices
Spring cloud-netflix-oss-microservices
 
Docker - Scripting the PayPal Cloud
Docker - Scripting the PayPal CloudDocker - Scripting the PayPal Cloud
Docker - Scripting the PayPal Cloud
 
Rethink your architecture - Marten Deinum
Rethink your architecture - Marten DeinumRethink your architecture - Marten Deinum
Rethink your architecture - Marten Deinum
 
Things to think about while architecting azure solutions
Things to think about while architecting azure solutionsThings to think about while architecting azure solutions
Things to think about while architecting azure solutions
 
agile microservices @scaibo
agile microservices @scaiboagile microservices @scaibo
agile microservices @scaibo
 
Idiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRSIdiomatic Domain Driven Design: implementing CQRS
Idiomatic Domain Driven Design: implementing CQRS
 
Agile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemAgile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystem
 

Plus de Alessandro Melchiori

Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSAlessandro Melchiori
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSAlessandro Melchiori
 
How to search...better! (azure search)
How to search...better! (azure search)How to search...better! (azure search)
How to search...better! (azure search)Alessandro Melchiori
 
A quick tour around Azure Dev Spaces
A quick tour around Azure Dev SpacesA quick tour around Azure Dev Spaces
A quick tour around Azure Dev SpacesAlessandro Melchiori
 
Azure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutesAzure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutesAlessandro Melchiori
 
Monitoring docker: from zero to Azure
Monitoring docker: from zero to AzureMonitoring docker: from zero to Azure
Monitoring docker: from zero to AzureAlessandro Melchiori
 
Cooking Akka.net and Azure Service Fabric together
Cooking Akka.net and Azure Service Fabric togetherCooking Akka.net and Azure Service Fabric together
Cooking Akka.net and Azure Service Fabric togetherAlessandro Melchiori
 
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
ACR + ACS + VSTS: a complete ALM pipeline with docker and azureACR + ACS + VSTS: a complete ALM pipeline with docker and azure
ACR + ACS + VSTS: a complete ALM pipeline with docker and azureAlessandro Melchiori
 
Come ti "pusho" il web con WebSockets: da 0 a SignalR
Come ti "pusho" il web con WebSockets: da 0 a SignalR Come ti "pusho" il web con WebSockets: da 0 a SignalR
Come ti "pusho" il web con WebSockets: da 0 a SignalR Alessandro Melchiori
 
Azure service fabric: a gentle introduction
Azure service fabric: a gentle introductionAzure service fabric: a gentle introduction
Azure service fabric: a gentle introductionAlessandro Melchiori
 

Plus de Alessandro Melchiori (20)

Scale your (aks) cluster, luke!
Scale your (aks) cluster, luke!Scale your (aks) cluster, luke!
Scale your (aks) cluster, luke!
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKS
 
VS Code tools for docker
VS Code tools for dockerVS Code tools for docker
VS Code tools for docker
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKS
 
How to search...better! (azure search)
How to search...better! (azure search)How to search...better! (azure search)
How to search...better! (azure search)
 
AKS: k8s e azure
AKS: k8s e azureAKS: k8s e azure
AKS: k8s e azure
 
How to search...better!
How to search...better!How to search...better!
How to search...better!
 
A quick tour around Azure Dev Spaces
A quick tour around Azure Dev SpacesA quick tour around Azure Dev Spaces
A quick tour around Azure Dev Spaces
 
Azure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutesAzure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutes
 
Aks: k8s e azure
Aks:  k8s e azureAks:  k8s e azure
Aks: k8s e azure
 
Monitoring docker: from zero to Azure
Monitoring docker: from zero to AzureMonitoring docker: from zero to Azure
Monitoring docker: from zero to Azure
 
Cooking Akka.net and Azure Service Fabric together
Cooking Akka.net and Azure Service Fabric togetherCooking Akka.net and Azure Service Fabric together
Cooking Akka.net and Azure Service Fabric together
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
ACR + ACS + VSTS: a complete ALM pipeline with docker and azureACR + ACS + VSTS: a complete ALM pipeline with docker and azure
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
 
Docker & Azure
Docker & AzureDocker & Azure
Docker & Azure
 
Docker and Azure
Docker and AzureDocker and Azure
Docker and Azure
 
Come ti "pusho" il web con WebSockets: da 0 a SignalR
Come ti "pusho" il web con WebSockets: da 0 a SignalR Come ti "pusho" il web con WebSockets: da 0 a SignalR
Come ti "pusho" il web con WebSockets: da 0 a SignalR
 
Docker & azure
Docker & azureDocker & azure
Docker & azure
 
Azure service fabric: a gentle introduction
Azure service fabric: a gentle introductionAzure service fabric: a gentle introduction
Azure service fabric: a gentle introduction
 

Dernier

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Beyond DDD: uno sguardo a CQRS e event sourcing

  • 1. Beyond DDD: uno sguardo a CQRS and event sourcing
  • 2. about me { "firstName": "Alessandro", "lastName": "Melchiori", "role": "software architect @ codiceplastico", "contacts": [ { "type": "email", "value": alessandro@codiceplastico.com }, { "type": "twitter", "value": "@amelchiori" }, { "type": "blog", "value": http://blog.codiceplastico.com/melkio } ] }
  • 3. Il contesto • Applicazione finanziaria (non “always online”) • Circa 70 utenti • 250.000+ aziende • 750.000+ bilanci • 70.000.000+ voci di bilancio • 16.000+ call/mese • “Pluggato” a servizi di terze parti • Picchi di lavoro “temporali” (…la nuvola può darci una mano)
  • 5. Presentation Layer Come era… Service/Application Layer Domain Model Storage
  • 9. I problemi… • Logica (mal) sparpagliata • Contesti non definiti • Modello “fragile” e poco propenso alle evoluzioni • Un unico modello per la lettura e per la scrittura • Prestazioni • UI “generazionalista”
  • 10. DDD: brevi cenni • Use AGGREGATES as unit of consistency across your domain model • Protect your model with clearly defined BOUNDED CONTEXT (Eric Evans) BC 01 BC 02 BC 03
  • 11. DDD: brevi cenni • It’s really become clear to me in the last couple of years that we need a new building block and that is the Domain Events (Eric Evans) BC 01 BC 02 BC 03
  • 12. CQRS / ES: brevi cenni • Every method should either be a command that performs an action, or a query that returns data to the caller, but NOT BOTH (Bertrand Meyer)
  • 13. CQRS / ES: brevi cenni • A single model cannot be appropriate for reporting, searching and transactional behavior • State transition are an important part of our problem space and should be modeled within our domain (Greg Young, 2008)
  • 15. Presentation Layer Come è… Service Layer Read storage Domain Model Write storage
  • 16. Come sarà… Worker / Web Role Service Bus ACS AZURE ? Blob Storage MongoDb (PaaS or SaaS)
  • 17. Quando DDD/CQRS/ES fanno per me? Chiedilo al «tuo» UBIQUITOUS LANGUAGE (Alessandro Melchiori)
  • 18. Quando DDD/CQRS/ES fanno per me? Tackling Complexity in the Heart of Software