SlideShare une entreprise Scribd logo
1  sur  55
Télécharger pour lire hors ligne
Dennis van der Stelt
of distributed systems
Dennis van der Stelt
Software Architect
http://dennis.bloggingabout.net/
dennis@bloggingabout.net
NServiceBus Community Champ
PRINCIPLES
@dvdstelt
#sdnevent
Dennis van der Stelt
YOUR PRESENTER
Dennis van der Stelt
http://dennis.bloggingabout.net/
Software Architect
Professional Services
Provides coaching & training
About Dennis
Innovative software architect
Almost 20 years of experience in development of
distributed systems. Has a continuous drive to
learn and improve knowledge in different
architectural styles, including quality in software
development. Highly motivated to share his
knowledge via articles, presentations and his
blog.
Awards
NServiceBus Champ
Typemock MVP
Certified Trainer
• Presentations
• Software & Architecture audits
• SOA & Microservices advice
• Unit Testing training
• NServiceBus training
Presentations
October 15th at Blaak Selectie / Betabit
Reliable systems using messaging
Dennis van der Stelt
AGENDA
Dennis van der Stelt
A monolithic design is characterized by such tight coupling
among modules that they really have no independent existence.
monolithic
Dennis van der Stelt
MONOLITHIC DESIGN
How does my clean code become a big ball of mud?
Database
Dennis van der Stelt
MONOLITHIC DESIGN
How does my clean code become a big ball of mud?
Database
Dennis van der Stelt
Dennis van der Stelt
What’s your problem, dude?
Dennis van der Stelt
PROBLEM STATEMENT
Layering
Problem #1
Dennis van der Stelt
Dennis van der Stelt
lightweight servicebus
Dennis van der Stelt
PROBLEM STATEMENT
“little computers
passing messages”
Problem #2
alan kay http://bit.ly/alankay-oo
reduce
coupling
Dennis van der Stelt
SpatialTemporalPlatform
coupling aspects
Dennis van der Stelt
TEMPORAL
Store Front End Shipping Service
Dennis van der Stelt
TEMPORAL
Store Front End Shipping ServiceShipping Service
Dennis van der Stelt
TEMPORAL
Store Front End Shipping ServiceOrder Queue
Dennis van der Stelt
TEMPORAL
Store Front End Shipping ServiceOrder Queue
Dennis van der Stelt
TEMPORAL
Store Front End Shipping ServiceOrder Queue
Dennis van der Stelt
Messaging
 Reduces spatial coupling
 Solves platform coupling
 Asynchronous for temporal coupling
Dennis van der Stelt
CAP Theorem
Eric Brewer, PODC Conference 2000
Dennis van der Stelt
CAP THEOREM
You can only pick 2
Dennis van der Stelt
CAP THEOREM
You can only pick 2
centralized
system
partition tolerantconsistencyavailability
Dennis van der Stelt
CAP THEOREM
You can only pick 2
centralized
system
partition tolerantconsistencyavailability
Dennis van der Stelt
CAP THEOREM
You can only pick 2
centralized
system
partition tolerantconsistencyavailability
distributed
system
partition tolerantconsistencyavailability
Dennis van der Stelt
CAP THEOREM
You can only pick 2
centralized
system
partition tolerantconsistencyavailability
distributed
system
partition tolerantconsistencyavailability
when there’s network partition,
which do you sacrifice?
Dennis van der Stelt
Match the business perspective
Dennis van der Stelt
Dennis van der Stelt
Dennis van der Stelt
Dennis van der Stelt
But I can’t drop consistency!
Dennis van der Stelt
Basically Available
BASE
What is BASE?
Soft state
Eventually consistent
Dennis van der Stelt
Eventual Consistency
Because 100% consistency isn’t the only option
Dennis van der Stelt
Dennis van der Stelt
Eventual Consistency
Dennis van der Stelt
Eventual Consistency
Dennis van der Stelt
Eventual Consistency
your “enterprise” is already eventual consistent with reality
Dennis van der Stelt
Eventual Consistency
your “enterprise” is already eventual consistent with reality
Dennis van der Stelt
“Allow things to be inconsistent and find ways to
compensate for mistakes, versus trying to prevent
mistakes altogether.”
EVENTUAL CONSISTENCY
Eric Brewer
VP of Infrastructure at Google, Professor at UC Berkeley
Dennis van der Stelt
Some ideas on messaging
Dennis van der Stelt
100% synchronized
that‘s eventual consistency.
Udi Dahanin 2010
Dennis van der Stelt
Distributed Transactions
Are they as evil as you think? Perhaps even more?
Dennis van der Stelt
Who uses distributed transactions?
Dennis van der Stelt
using (var scope = new TransactionScope()))
{
var queue = new
MessageQueue(@".Private$Customers");
var message = queue.Receive();
var con = new SqlConnection();
var cmd = new SqlCommand("update customers ...");
cmd.ExecuteNonQuery();
}
DISTRIBUTED TRANSACTIONS
Microsoft Distributed Transaction Coordinator (MSDTC)
Code
Dennis van der Stelt
using (var scope = new TransactionScope()))
{
var queue = new
MessageQueue(@".Private$Customers");
var message = queue.Receive();
var con = new SqlConnection();
var cmd = new SqlCommand("update customers ...");
cmd.ExecuteNonQuery();
}
DISTRIBUTED TRANSACTIONS
Microsoft Distributed Transaction Coordinator (MSDTC)
Code
MSDTC
Dennis van der Stelt
Dennis van der Stelt
Distributed Transactions
Dennis van der Stelt49
Idempotency
Once and only once delivery is hard!
Dennis van der Stelt
Dennis van der Stelt
IDEM POTENCY
Solving the distributed transactionissues
Sender
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
IDEM POTENCY
Solving the distributed transactionissues
Sender
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
IDEM POTENCY
Solving the distributed transactionissues
Sender
Event
Subscriber
{5EDC4993-AB01-4F17-A238-71C4521F750F}
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
IDEM POTENCY
Solving the distributed transactionissues
Sender
Event
Subscriber
{5EDC4993-AB01-4F17-A238-71C4521F750F}
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
Dennis van der Stelt
find me.
http://dennis.bloggingabout.net
dvdstelt@outlook.com

Contenu connexe

Similaire à Distributed Systems principles

How to fail or succeed with desktop virtualization and workspace mobility
How to fail or succeed with desktop virtualization and workspace mobilityHow to fail or succeed with desktop virtualization and workspace mobility
How to fail or succeed with desktop virtualization and workspace mobilityDenis Gundarev
 
Phreebird Suite 1.0: Introducing the Domain Key Infrastructure
Phreebird Suite 1.0:  Introducing the Domain Key InfrastructurePhreebird Suite 1.0:  Introducing the Domain Key Infrastructure
Phreebird Suite 1.0: Introducing the Domain Key InfrastructureDan Kaminsky
 
Change your architecture during deployment
Change your architecture during deploymentChange your architecture during deployment
Change your architecture during deploymentDennis van der Stelt
 
Voyss Cloud
Voyss CloudVoyss Cloud
Voyss Cloudpswaim
 
Deploying Unified Communications with Lync on the easiest, most secure platform
Deploying Unified Communications with Lync on the easiest, most secure platformDeploying Unified Communications with Lync on the easiest, most secure platform
Deploying Unified Communications with Lync on the easiest, most secure platformDell World
 
Presentation citrix desktop virtualization
Presentation   citrix desktop virtualizationPresentation   citrix desktop virtualization
Presentation citrix desktop virtualizationxKinAnx
 
Trade Show Disc Work
Trade Show Disc WorkTrade Show Disc Work
Trade Show Disc WorkBrian Tort
 
ESET: Delivering Benefits to Enterprises
ESET: Delivering Benefits to EnterprisesESET: Delivering Benefits to Enterprises
ESET: Delivering Benefits to EnterprisesESET
 
Innovations that simplify desktop virtualization
Innovations that simplify desktop virtualization Innovations that simplify desktop virtualization
Innovations that simplify desktop virtualization Dell World
 
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco MenezesNextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco MenezesOutSystems
 
Vdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisionsVdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisionsConcentrated Technology
 
Citrix en Nutanix: de kracht van de combinatie
Citrix en Nutanix: de kracht van de combinatieCitrix en Nutanix: de kracht van de combinatie
Citrix en Nutanix: de kracht van de combinatieICT-Partners
 
IT Pros and The Cloud
IT Pros and The CloudIT Pros and The Cloud
IT Pros and The CloudStephen Rose
 
How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...
How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...
How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...Peter Daalmans
 
101 Presentation Sample
101 Presentation Sample101 Presentation Sample
101 Presentation SampleDataVault
 

Similaire à Distributed Systems principles (20)

DNA Cloud Backup
DNA Cloud BackupDNA Cloud Backup
DNA Cloud Backup
 
How to fail or succeed with desktop virtualization and workspace mobility
How to fail or succeed with desktop virtualization and workspace mobilityHow to fail or succeed with desktop virtualization and workspace mobility
How to fail or succeed with desktop virtualization and workspace mobility
 
Phreebird Suite 1.0: Introducing the Domain Key Infrastructure
Phreebird Suite 1.0:  Introducing the Domain Key InfrastructurePhreebird Suite 1.0:  Introducing the Domain Key Infrastructure
Phreebird Suite 1.0: Introducing the Domain Key Infrastructure
 
Change your architecture during deployment
Change your architecture during deploymentChange your architecture during deployment
Change your architecture during deployment
 
Voyss Cloud
Voyss CloudVoyss Cloud
Voyss Cloud
 
Porta ovunque il tuo desktop
Porta ovunque il tuo desktopPorta ovunque il tuo desktop
Porta ovunque il tuo desktop
 
Deploying Unified Communications with Lync on the easiest, most secure platform
Deploying Unified Communications with Lync on the easiest, most secure platformDeploying Unified Communications with Lync on the easiest, most secure platform
Deploying Unified Communications with Lync on the easiest, most secure platform
 
Death of the batch job
Death of the batch jobDeath of the batch job
Death of the batch job
 
Presentation citrix desktop virtualization
Presentation   citrix desktop virtualizationPresentation   citrix desktop virtualization
Presentation citrix desktop virtualization
 
A Xen Case Study
A Xen Case StudyA Xen Case Study
A Xen Case Study
 
Trade Show Disc Work
Trade Show Disc WorkTrade Show Disc Work
Trade Show Disc Work
 
ESET: Delivering Benefits to Enterprises
ESET: Delivering Benefits to EnterprisesESET: Delivering Benefits to Enterprises
ESET: Delivering Benefits to Enterprises
 
Innovations that simplify desktop virtualization
Innovations that simplify desktop virtualization Innovations that simplify desktop virtualization
Innovations that simplify desktop virtualization
 
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco MenezesNextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
 
Vdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisionsVdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisions
 
Citrix en Nutanix: de kracht van de combinatie
Citrix en Nutanix: de kracht van de combinatieCitrix en Nutanix: de kracht van de combinatie
Citrix en Nutanix: de kracht van de combinatie
 
IT Pros and The Cloud
IT Pros and The CloudIT Pros and The Cloud
IT Pros and The Cloud
 
How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...
How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...
How to Extend the App Model to Support Your User-Centric XenDesktop in the Da...
 
Why is Core DX the Best DDS?
Why is Core DX the Best DDS?Why is Core DX the Best DDS?
Why is Core DX the Best DDS?
 
101 Presentation Sample
101 Presentation Sample101 Presentation Sample
101 Presentation Sample
 

Plus de Dennis van der Stelt

Plus de Dennis van der Stelt (10)

Dealing with eventual consistency
Dealing with eventual consistencyDealing with eventual consistency
Dealing with eventual consistency
 
Dealing with eventual consistency
Dealing with eventual consistencyDealing with eventual consistency
Dealing with eventual consistency
 
Duplicating data or replicating data in Micro Services
Duplicating data or replicating data in Micro ServicesDuplicating data or replicating data in Micro Services
Duplicating data or replicating data in Micro Services
 
Silverlight & WCF RIA
Silverlight & WCF RIASilverlight & WCF RIA
Silverlight & WCF RIA
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
AppFabric Velocity
AppFabric VelocityAppFabric Velocity
AppFabric Velocity
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
App fabric introduction
App fabric introductionApp fabric introduction
App fabric introduction
 
SOLID Principles part 2
SOLID Principles part 2SOLID Principles part 2
SOLID Principles part 2
 
SOLID Principles part 1
SOLID Principles part 1SOLID Principles part 1
SOLID Principles part 1
 

Dernier

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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
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
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
[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
 

Dernier (20)

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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
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
 
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...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
[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
 

Distributed Systems principles

  • 1. Dennis van der Stelt of distributed systems Dennis van der Stelt Software Architect http://dennis.bloggingabout.net/ dennis@bloggingabout.net NServiceBus Community Champ PRINCIPLES @dvdstelt #sdnevent
  • 2. Dennis van der Stelt YOUR PRESENTER Dennis van der Stelt http://dennis.bloggingabout.net/ Software Architect Professional Services Provides coaching & training About Dennis Innovative software architect Almost 20 years of experience in development of distributed systems. Has a continuous drive to learn and improve knowledge in different architectural styles, including quality in software development. Highly motivated to share his knowledge via articles, presentations and his blog. Awards NServiceBus Champ Typemock MVP Certified Trainer • Presentations • Software & Architecture audits • SOA & Microservices advice • Unit Testing training • NServiceBus training Presentations October 15th at Blaak Selectie / Betabit Reliable systems using messaging
  • 3. Dennis van der Stelt AGENDA
  • 4. Dennis van der Stelt A monolithic design is characterized by such tight coupling among modules that they really have no independent existence. monolithic
  • 5. Dennis van der Stelt MONOLITHIC DESIGN How does my clean code become a big ball of mud? Database
  • 6. Dennis van der Stelt MONOLITHIC DESIGN How does my clean code become a big ball of mud? Database
  • 8. Dennis van der Stelt What’s your problem, dude?
  • 9. Dennis van der Stelt PROBLEM STATEMENT Layering Problem #1
  • 10. Dennis van der Stelt
  • 11. Dennis van der Stelt lightweight servicebus
  • 12. Dennis van der Stelt PROBLEM STATEMENT “little computers passing messages” Problem #2 alan kay http://bit.ly/alankay-oo
  • 14. Dennis van der Stelt SpatialTemporalPlatform coupling aspects
  • 15. Dennis van der Stelt TEMPORAL Store Front End Shipping Service
  • 16. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceShipping Service
  • 17. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceOrder Queue
  • 18. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceOrder Queue
  • 19. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceOrder Queue
  • 20. Dennis van der Stelt Messaging  Reduces spatial coupling  Solves platform coupling  Asynchronous for temporal coupling
  • 21. Dennis van der Stelt CAP Theorem Eric Brewer, PODC Conference 2000
  • 22. Dennis van der Stelt CAP THEOREM You can only pick 2
  • 23. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability
  • 24. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability
  • 25. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability distributed system partition tolerantconsistencyavailability
  • 26. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability distributed system partition tolerantconsistencyavailability when there’s network partition, which do you sacrifice?
  • 27. Dennis van der Stelt Match the business perspective
  • 28. Dennis van der Stelt
  • 29. Dennis van der Stelt
  • 30. Dennis van der Stelt
  • 31. Dennis van der Stelt But I can’t drop consistency!
  • 32. Dennis van der Stelt Basically Available BASE What is BASE? Soft state Eventually consistent
  • 33. Dennis van der Stelt Eventual Consistency Because 100% consistency isn’t the only option
  • 34. Dennis van der Stelt
  • 35. Dennis van der Stelt Eventual Consistency
  • 36. Dennis van der Stelt Eventual Consistency
  • 37. Dennis van der Stelt Eventual Consistency your “enterprise” is already eventual consistent with reality
  • 38. Dennis van der Stelt Eventual Consistency your “enterprise” is already eventual consistent with reality
  • 39. Dennis van der Stelt “Allow things to be inconsistent and find ways to compensate for mistakes, versus trying to prevent mistakes altogether.” EVENTUAL CONSISTENCY Eric Brewer VP of Infrastructure at Google, Professor at UC Berkeley
  • 40. Dennis van der Stelt Some ideas on messaging
  • 41. Dennis van der Stelt 100% synchronized that‘s eventual consistency. Udi Dahanin 2010
  • 42. Dennis van der Stelt Distributed Transactions Are they as evil as you think? Perhaps even more?
  • 43. Dennis van der Stelt Who uses distributed transactions?
  • 44. Dennis van der Stelt using (var scope = new TransactionScope())) { var queue = new MessageQueue(@".Private$Customers"); var message = queue.Receive(); var con = new SqlConnection(); var cmd = new SqlCommand("update customers ..."); cmd.ExecuteNonQuery(); } DISTRIBUTED TRANSACTIONS Microsoft Distributed Transaction Coordinator (MSDTC) Code
  • 45. Dennis van der Stelt using (var scope = new TransactionScope())) { var queue = new MessageQueue(@".Private$Customers"); var message = queue.Receive(); var con = new SqlConnection(); var cmd = new SqlCommand("update customers ..."); cmd.ExecuteNonQuery(); } DISTRIBUTED TRANSACTIONS Microsoft Distributed Transaction Coordinator (MSDTC) Code MSDTC
  • 46. Dennis van der Stelt
  • 47. Dennis van der Stelt Distributed Transactions
  • 48. Dennis van der Stelt49 Idempotency Once and only once delivery is hard!
  • 49. Dennis van der Stelt
  • 50. Dennis van der Stelt IDEM POTENCY Solving the distributed transactionissues Sender {0C836F44-6587-416E-B97A-5615615600D5}
  • 51. Dennis van der Stelt IDEM POTENCY Solving the distributed transactionissues Sender {0C836F44-6587-416E-B97A-5615615600D5}
  • 52. Dennis van der Stelt IDEM POTENCY Solving the distributed transactionissues Sender Event Subscriber {5EDC4993-AB01-4F17-A238-71C4521F750F} {0C836F44-6587-416E-B97A-5615615600D5}
  • 53. Dennis van der Stelt IDEM POTENCY Solving the distributed transactionissues Sender Event Subscriber {5EDC4993-AB01-4F17-A238-71C4521F750F} {0C836F44-6587-416E-B97A-5615615600D5}
  • 54. Dennis van der Stelt
  • 55. Dennis van der Stelt find me. http://dennis.bloggingabout.net dvdstelt@outlook.com