SlideShare una empresa de Scribd logo
1 de 55
Descargar para leer sin conexión
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

Más contenido relacionado

Similar a 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
 

Similar a 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
 

Más de Dennis van der Stelt

Más 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
 

Último

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

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