SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
Dennis van der Stelt
of distributed systems
Dennis van der Stelt
http://dennis.bloggingabout.net/
dennis@bloggingabout.net
Software Engineer at Particular Software
PRINCIPLES
Dennis van der Stelt
AGENDA
Dennis van der Stelt
Dennis van der Stelt
“A distributed system is a software
system in which components located
on networked computers
communicate and coordinate their
actions by passing messages.”
what is a distributed system
Wikipedia
Dennis van der Stelt
Working distributed…
Dennis van der Stelt
How hard can it be?
Dennis van der Stelt
FALLACIES OF DISTRIBUTED COMPUTING
PeterDeutsch& othersat Sun Microsystems, 1994
Latency is zero02
Topology doesn’t change05
There is one administrator06
The network is reliable01
Bandwidth is infinite03 Transport cost is zero07
The network is secure04 The network is homogeneous08
Dennis van der Stelt
Free eBook: Dr. Harvey and
the 8 Fallacies of Distributed
Computing
Dennis van der Stelt
The network is reliable
Dennis van der Stelt
STORE AND FORWARD WITH MSMQ
Store locally and pass ontotheinfrastructure
SQL Server
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 DistributedTransactionCoordinator(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 DistributedTransactionCoordinator(MSDTC)
Code
MSDTC
Dennis van der Stelt
Dennis van der Stelt
Distributed Transactions
Dennis van der Stelt
DISTRIBUTED TRANSACTIONS
The source of a lot of pain
RM
RM
RM
RM
RM
RM
RM
“Serializable is the highest isolation level. It makes sure that data that
anything you have a lock on, is locked for reading by others.”
Peter Bailis
Dennis van der Stelt
STORE AND FORWARD WITH MSMQ
Store locally and pass ontotheinfrastructure
SQL Server
Dennis van der Stelt
Handle(CreateClaimCommand msg)
{
dbContext.Claims.Add(Mapper.Map<Claim>(msg));
dbContext.SaveChanges();
Bus.Publish(new ClaimCreatedEvent());
}
DISTRIBUTED TRANSACTIONS WITH NSERVICEBUS
Microsoft DistributedTransactionCoordinator(MSDTC)
Code
Sends email to
customer
Dennis van der Stelt
Dennis van der Stelt
NOSQL
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
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
100% synchronized
that‘s eventual consistency.
Udi Dahanin 2010
Dennis van der Stelt45
Idempotence
Once and only once delivery is hard!
Dennis van der Stelt
Dennis van der Stelt
IDEMPOTENCE
Solving the distributedtransactionissues
Sender
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
IDEMPOTENCE
Solving the distributedtransactionissues
Sender
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
IDEMPOTENCE
Solving the distributedtransactionissues
Sender
Event
Subscriber
{5EDC4993-AB01-4F17-A238-71C4521F750F}
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
IDEMPOTENCE
Solving the distributedtransactionissues
Sender
Event
Subscriber
{5EDC4993-AB01-4F17-A238-71C4521F750F}
{0C836F44-6587-416E-B97A-5615615600D5}
Dennis van der Stelt
Distributed Systems Principles
 8 Fallacies of distributed computing
 (Distributed) Transactions
 CAP Theorem & Eventual consistency
 Idempotence & outbox pattern
Dennis van der Stelt
Free eBook: Dr. Harvey and
the 8 Fallacies of Distributed
Computing
http://go.particular.net/ndclondon16
Dennis van der Stelt
find me.
http://dennis.bloggingabout.net
dvdstelt@outlook.com

Mais conteúdo relacionado

Destaque

Mciro Services & Zookeeper
Mciro Services & ZookeeperMciro Services & Zookeeper
Mciro Services & ZookeeperDeepak Singhal
 
Zookeeper at the bigdata roundtable
Zookeeper at the bigdata roundtableZookeeper at the bigdata roundtable
Zookeeper at the bigdata roundtableTobias Schlottke
 
基于Zookeeper的配置信息存储方案的设计与实现
基于Zookeeper的配置信息存储方案的设计与实现基于Zookeeper的配置信息存储方案的设计与实现
基于Zookeeper的配置信息存储方案的设计与实现billowqiu
 
Zookeeper
ZookeeperZookeeper
Zookeeperltsllc
 
zookeeper-internals
zookeeper-internalszookeeper-internals
zookeeper-internalsLiu Shaohui
 
Apache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayApache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayAndrei Savu
 
ZooKeeper Partitioning - A project report
ZooKeeper Partitioning - A project reportZooKeeper Partitioning - A project report
ZooKeeper Partitioning - A project reportpramodbiligiri
 
Jcconf 2016 zookeeper
Jcconf 2016 zookeeperJcconf 2016 zookeeper
Jcconf 2016 zookeeperMatt Ho
 
Zookeeper In Action
Zookeeper In ActionZookeeper In Action
Zookeeper In Actionjuvenxu
 
Zoo keeper in the wild
Zoo keeper in the wildZoo keeper in the wild
Zoo keeper in the wilddatamantra
 
使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡Lawrence Huang
 
Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架Cabin WJ
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeperknowbigdata
 
Introduction to apache zoo keeper
Introduction to apache zoo keeper Introduction to apache zoo keeper
Introduction to apache zoo keeper Omid Vahdaty
 
Zookeeper In Simple Words
Zookeeper In Simple WordsZookeeper In Simple Words
Zookeeper In Simple WordsFuqiang Wang
 
The Distributed & Decentralized Cloud
The Distributed & Decentralized CloudThe Distributed & Decentralized Cloud
The Distributed & Decentralized CloudMargaret Dawson
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012mumrah
 

Destaque (20)

Zookeeper
ZookeeperZookeeper
Zookeeper
 
Mciro Services & Zookeeper
Mciro Services & ZookeeperMciro Services & Zookeeper
Mciro Services & Zookeeper
 
Zookeeper at the bigdata roundtable
Zookeeper at the bigdata roundtableZookeeper at the bigdata roundtable
Zookeeper at the bigdata roundtable
 
基于Zookeeper的配置信息存储方案的设计与实现
基于Zookeeper的配置信息存储方案的设计与实现基于Zookeeper的配置信息存储方案的设计与实现
基于Zookeeper的配置信息存储方案的设计与实现
 
Zookeeper
ZookeeperZookeeper
Zookeeper
 
zookeeper-internals
zookeeper-internalszookeeper-internals
zookeeper-internals
 
ZooKeeper Futures
ZooKeeper FuturesZooKeeper Futures
ZooKeeper Futures
 
Apache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayApache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesday
 
ZooKeeper Partitioning - A project report
ZooKeeper Partitioning - A project reportZooKeeper Partitioning - A project report
ZooKeeper Partitioning - A project report
 
Jcconf 2016 zookeeper
Jcconf 2016 zookeeperJcconf 2016 zookeeper
Jcconf 2016 zookeeper
 
Zookeeper In Action
Zookeeper In ActionZookeeper In Action
Zookeeper In Action
 
Zookeeper
ZookeeperZookeeper
Zookeeper
 
Zoo keeper in the wild
Zoo keeper in the wildZoo keeper in the wild
Zoo keeper in the wild
 
使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡
 
Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 
Introduction to apache zoo keeper
Introduction to apache zoo keeper Introduction to apache zoo keeper
Introduction to apache zoo keeper
 
Zookeeper In Simple Words
Zookeeper In Simple WordsZookeeper In Simple Words
Zookeeper In Simple Words
 
The Distributed & Decentralized Cloud
The Distributed & Decentralized CloudThe Distributed & Decentralized Cloud
The Distributed & Decentralized Cloud
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012
 

Semelhante a Distributed Systems Principles

Distributed computing for new bloods
Distributed computing for new bloodsDistributed computing for new bloods
Distributed computing for new bloodsRaymond Tay
 
Intro to Distributed Database Management System
Intro to Distributed Database Management SystemIntro to Distributed Database Management System
Intro to Distributed Database Management SystemAli Raza
 
Real Security in a Virtual Environment
Real Security in a Virtual EnvironmentReal Security in a Virtual Environment
Real Security in a Virtual EnvironmentMattias Geniar
 
Layer-2 after “The Merge”
Layer-2 after “The Merge”Layer-2 after “The Merge”
Layer-2 after “The Merge”Jiyun Kim
 
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
 
Michalesoft dds-diskless-education-problem-benefits-2012
Michalesoft dds-diskless-education-problem-benefits-2012Michalesoft dds-diskless-education-problem-benefits-2012
Michalesoft dds-diskless-education-problem-benefits-2012damiendds
 
Lecture 1-introduction to distributed computing.pptx
Lecture 1-introduction to distributed computing.pptxLecture 1-introduction to distributed computing.pptx
Lecture 1-introduction to distributed computing.pptxssusere05ec21
 
The Power of Determinism in Database Systems
The Power of Determinism in Database SystemsThe Power of Determinism in Database Systems
The Power of Determinism in Database SystemsDaniel Abadi
 
Dok Talks #122 - Operationalizing a Data Infrastructure Stack on Kubernetes
Dok Talks #122 - Operationalizing a Data Infrastructure Stack on KubernetesDok Talks #122 - Operationalizing a Data Infrastructure Stack on Kubernetes
Dok Talks #122 - Operationalizing a Data Infrastructure Stack on KubernetesDoKC
 
Cs 704 d set4distributedcomputing-1funda
Cs 704 d set4distributedcomputing-1fundaCs 704 d set4distributedcomputing-1funda
Cs 704 d set4distributedcomputing-1fundaDebasis Das
 

Semelhante a Distributed Systems Principles (17)

DNA Cloud Backup
DNA Cloud BackupDNA Cloud Backup
DNA Cloud Backup
 
Chap 01v2
Chap 01v2Chap 01v2
Chap 01v2
 
Distributed computing for new bloods
Distributed computing for new bloodsDistributed computing for new bloods
Distributed computing for new bloods
 
SDN Abstractions
SDN AbstractionsSDN Abstractions
SDN Abstractions
 
Intro to Distributed Database Management System
Intro to Distributed Database Management SystemIntro to Distributed Database Management System
Intro to Distributed Database Management System
 
Interview Questions
Interview QuestionsInterview Questions
Interview Questions
 
A Xen Case Study
A Xen Case StudyA Xen Case Study
A Xen Case Study
 
MSB-Distributed systems goals
MSB-Distributed systems goalsMSB-Distributed systems goals
MSB-Distributed systems goals
 
Real Security in a Virtual Environment
Real Security in a Virtual EnvironmentReal Security in a Virtual Environment
Real Security in a Virtual Environment
 
Layer-2 after “The Merge”
Layer-2 after “The Merge”Layer-2 after “The Merge”
Layer-2 after “The Merge”
 
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
 
Michalesoft dds-diskless-education-problem-benefits-2012
Michalesoft dds-diskless-education-problem-benefits-2012Michalesoft dds-diskless-education-problem-benefits-2012
Michalesoft dds-diskless-education-problem-benefits-2012
 
Lecture 1-introduction to distributed computing.pptx
Lecture 1-introduction to distributed computing.pptxLecture 1-introduction to distributed computing.pptx
Lecture 1-introduction to distributed computing.pptx
 
The Power of Determinism in Database Systems
The Power of Determinism in Database SystemsThe Power of Determinism in Database Systems
The Power of Determinism in Database Systems
 
Dok Talks #122 - Operationalizing a Data Infrastructure Stack on Kubernetes
Dok Talks #122 - Operationalizing a Data Infrastructure Stack on KubernetesDok Talks #122 - Operationalizing a Data Infrastructure Stack on Kubernetes
Dok Talks #122 - Operationalizing a Data Infrastructure Stack on Kubernetes
 
Dsm presentation (english)
Dsm presentation (english)Dsm presentation (english)
Dsm presentation (english)
 
Cs 704 d set4distributedcomputing-1funda
Cs 704 d set4distributedcomputing-1fundaCs 704 d set4distributedcomputing-1funda
Cs 704 d set4distributedcomputing-1funda
 

Mais de Dennis van der Stelt

Mais de Dennis van der Stelt (10)

Change your architecture during deployment
Change your architecture during deploymentChange your architecture during deployment
Change your architecture during deployment
 
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 1
SOLID Principles part 1SOLID Principles part 1
SOLID Principles part 1
 

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Distributed Systems Principles

  • 1. Dennis van der Stelt of distributed systems Dennis van der Stelt http://dennis.bloggingabout.net/ dennis@bloggingabout.net Software Engineer at Particular Software PRINCIPLES
  • 2. Dennis van der Stelt AGENDA
  • 4. Dennis van der Stelt “A distributed system is a software system in which components located on networked computers communicate and coordinate their actions by passing messages.” what is a distributed system Wikipedia
  • 5. Dennis van der Stelt Working distributed…
  • 6. Dennis van der Stelt How hard can it be?
  • 7. Dennis van der Stelt FALLACIES OF DISTRIBUTED COMPUTING PeterDeutsch& othersat Sun Microsystems, 1994 Latency is zero02 Topology doesn’t change05 There is one administrator06 The network is reliable01 Bandwidth is infinite03 Transport cost is zero07 The network is secure04 The network is homogeneous08
  • 8. Dennis van der Stelt Free eBook: Dr. Harvey and the 8 Fallacies of Distributed Computing
  • 9. Dennis van der Stelt The network is reliable
  • 10. Dennis van der Stelt STORE AND FORWARD WITH MSMQ Store locally and pass ontotheinfrastructure SQL Server
  • 11. 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 DistributedTransactionCoordinator(MSDTC) Code
  • 12. 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 DistributedTransactionCoordinator(MSDTC) Code MSDTC
  • 13. Dennis van der Stelt
  • 14. Dennis van der Stelt Distributed Transactions
  • 15. Dennis van der Stelt DISTRIBUTED TRANSACTIONS The source of a lot of pain RM RM RM RM RM RM RM “Serializable is the highest isolation level. It makes sure that data that anything you have a lock on, is locked for reading by others.” Peter Bailis
  • 16. Dennis van der Stelt STORE AND FORWARD WITH MSMQ Store locally and pass ontotheinfrastructure SQL Server
  • 17. Dennis van der Stelt Handle(CreateClaimCommand msg) { dbContext.Claims.Add(Mapper.Map<Claim>(msg)); dbContext.SaveChanges(); Bus.Publish(new ClaimCreatedEvent()); } DISTRIBUTED TRANSACTIONS WITH NSERVICEBUS Microsoft DistributedTransactionCoordinator(MSDTC) Code Sends email to customer
  • 18. Dennis van der Stelt
  • 19. Dennis van der Stelt NOSQL
  • 20. Dennis van der Stelt CAP Theorem Eric Brewer, PODC Conference 2000
  • 21. Dennis van der Stelt CAP THEOREM You can only pick 2
  • 22. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability
  • 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 distributed system partition tolerantconsistencyavailability
  • 25. 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?
  • 26. Dennis van der Stelt Match the business perspective
  • 27. Dennis van der Stelt
  • 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 100% synchronized that‘s eventual consistency. Udi Dahanin 2010
  • 41. Dennis van der Stelt45 Idempotence Once and only once delivery is hard!
  • 42. Dennis van der Stelt
  • 43. Dennis van der Stelt IDEMPOTENCE Solving the distributedtransactionissues Sender {0C836F44-6587-416E-B97A-5615615600D5}
  • 44. Dennis van der Stelt IDEMPOTENCE Solving the distributedtransactionissues Sender {0C836F44-6587-416E-B97A-5615615600D5}
  • 45. Dennis van der Stelt IDEMPOTENCE Solving the distributedtransactionissues Sender Event Subscriber {5EDC4993-AB01-4F17-A238-71C4521F750F} {0C836F44-6587-416E-B97A-5615615600D5}
  • 46. Dennis van der Stelt IDEMPOTENCE Solving the distributedtransactionissues Sender Event Subscriber {5EDC4993-AB01-4F17-A238-71C4521F750F} {0C836F44-6587-416E-B97A-5615615600D5}
  • 47. Dennis van der Stelt Distributed Systems Principles  8 Fallacies of distributed computing  (Distributed) Transactions  CAP Theorem & Eventual consistency  Idempotence & outbox pattern
  • 48. Dennis van der Stelt Free eBook: Dr. Harvey and the 8 Fallacies of Distributed Computing http://go.particular.net/ndclondon16
  • 49. Dennis van der Stelt find me. http://dennis.bloggingabout.net dvdstelt@outlook.com