Date post: | 07-Jan-2017 |
Category: |
Engineering |
Upload: | tom-huynh |
View: | 75 times |
Download: | 2 times |
Agenda
O What is distributed system?
O CAP theorem
O Fallacies of Distributed system
O Some distributed design problems and solutions
O CQRS & Event Sourcing
O Enterprise Service Bus
O Publisher/Subscriber pattern
O Demo pub/sub pattern in AngularJS SPA
O QA
What is Distributed System?
N1 N2
N3 N4
LAN/WAN Fiber, cable, satellite, etc
CAP theorem
O Consistency
O Availability
O Partition Tolerance
1
4
2
3
Can have ONLY maximum 2 promises at same time
CAP theorem - Proof
1 2
Fallacies of Distributed system
O Network is reliable.
O Latency is zero.
O Bandwidth in infinite.
O Network is secure.
O Topology does not change.
O There is one administrator.
O Transport cost is zero.
O Network is homogeneous.
CAP Theorem - Fallacies
O Network not reliable
O Latency is zero
O Bandwidth is infinite
O Network is secure
O Topology doesn’t change
O 1 administrator
O Transport cost is zero
O Network is homogeneous
O Consistency
O Availability
O Partition Tolerance
CAP Theorem - Fallacies
Agenda
O What is distributed system?
O CAP theorem
O Fallacies of Distributed system
O Some distributed design problems and solutions
O CQRS & Event Sourcing
O Enterprise Service Bus
O Publisher/Subscriber pattern
O Demo pub/sub pattern in AngularJS SPA
O QA
CQRS
O A pattern
O Not an architecture
O Not an architectural style
O Not a principle
O Command Query Responsibility Segregation
O Domain applicable
CQRS - Durability (Cont.)
CQRS - Scaling (Cont.)
Event Sourcing
Enterprise Service Bus
ESB – 2 kinds
O Decentralized
O Independently configurable services
O Collaboration among teams
O Services make all decisions
O NServiceBus
O MassTransit
O Rhino Service Bus
O BrokeredO Single point of config
O Single governing body
O Middleware makes some decisions
O TIBCO
O BizTalk
O Web Sphere
Publisher/Subscriber pattern
O Problem:
O How an application send messages to other applications that are interested in receiving the messages without knowing the identities of the receivers?
O Tight coupling of sender and receiver applications
O Solution: P/SSender
Receiver 2
Receiver 1
Publisher/Subscriber pattern
Publisher
Event 1
Event 2
SubScriber1
SubScriber1
SubScriber1
Pub/sub demo
O AngularJS
O Controllers
Root scope
Scope 2Scope 1
Scope 4Scope 3
Reference
O Farm Credit Service of America knowledge base.
O Presentations of Michael L Perry, Dino Esposito, Greg Young, etc.
Q&A