Suche senden
Hochladen
Design patterns you didn't know about
•
1 gefällt mir
•
2,914 views
D
Donald Belcham
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 61
Empfohlen
Design Patterns
Design Patterns
Lorna Mitchell
Quanlycanbo
Quanlycanbo
PHUONGVINH
Jason parsing
Jason parsing
parallelminder
Using Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your Data
MongoDB
Codeofdatabase
Codeofdatabase
koushikdewan
Net/http and the http.handler interface
Net/http and the http.handler interface
Joakim Gustin
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
Emmanuel Neri
Combatendo code smells em Java
Combatendo code smells em Java
Emmanuel Neri
Empfohlen
Design Patterns
Design Patterns
Lorna Mitchell
Quanlycanbo
Quanlycanbo
PHUONGVINH
Jason parsing
Jason parsing
parallelminder
Using Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your Data
MongoDB
Codeofdatabase
Codeofdatabase
koushikdewan
Net/http and the http.handler interface
Net/http and the http.handler interface
Joakim Gustin
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC
Emmanuel Neri
Combatendo code smells em Java
Combatendo code smells em Java
Emmanuel Neri
Writing Good Tests
Writing Good Tests
Matteo Baglini
#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdf
annucommunication1
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
tdc-globalcode
Testing javascript in the frontend
Testing javascript in the frontend
Frederic CABASSUT
Day 1
Day 1
Pat Zearfoss
#include stdio.h#include stdlib.h#include string.hstruct.pdf
#include stdio.h#include stdlib.h#include string.hstruct.pdf
anubhavnigam2608
Bad test, good test
Bad test, good test
Seb Rose
05 JavaScript #burningkeyboards
05 JavaScript #burningkeyboards
Denis Ristic
Web Optimization Summit: Coding for Performance
Web Optimization Summit: Coding for Performance
johndaviddalton
連邦の白いヤツ 「Objective-C」
連邦の白いヤツ 「Objective-C」
matuura_core
operating system ubuntu,Linux,Macpublic class SuperMarket { .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket { .pdf
arasanmobiles
TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NET
tdc-globalcode
Introduction to ECMAScript 2015
Introduction to ECMAScript 2015
Tomasz Dziuda
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)
Anders Jönsson
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
Juan Pablo
Ian 20150116 java script oop
Ian 20150116 java script oop
LearningTech
Improving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con Berlin
Iain Hull
Reliability and Reslience
Reliability and Reslience
Donald Belcham
Opportunities to Improve System Reliability and Resilience by Donald Belcham
Opportunities to Improve System Reliability and Resilience by Donald Belcham
.NET Conf UY
Introduction to Messaging
Introduction to Messaging
Donald Belcham
Advanced messaging patterns
Advanced messaging patterns
Donald Belcham
Microservices: The Nitty Gritty
Microservices: The Nitty Gritty
Donald Belcham
Weitere ähnliche Inhalte
Ähnlich wie Design patterns you didn't know about
Writing Good Tests
Writing Good Tests
Matteo Baglini
#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdf
annucommunication1
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
tdc-globalcode
Testing javascript in the frontend
Testing javascript in the frontend
Frederic CABASSUT
Day 1
Day 1
Pat Zearfoss
#include stdio.h#include stdlib.h#include string.hstruct.pdf
#include stdio.h#include stdlib.h#include string.hstruct.pdf
anubhavnigam2608
Bad test, good test
Bad test, good test
Seb Rose
05 JavaScript #burningkeyboards
05 JavaScript #burningkeyboards
Denis Ristic
Web Optimization Summit: Coding for Performance
Web Optimization Summit: Coding for Performance
johndaviddalton
連邦の白いヤツ 「Objective-C」
連邦の白いヤツ 「Objective-C」
matuura_core
operating system ubuntu,Linux,Macpublic class SuperMarket { .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket { .pdf
arasanmobiles
TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NET
tdc-globalcode
Introduction to ECMAScript 2015
Introduction to ECMAScript 2015
Tomasz Dziuda
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)
Anders Jönsson
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
Juan Pablo
Ian 20150116 java script oop
Ian 20150116 java script oop
LearningTech
Improving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con Berlin
Iain Hull
Reliability and Reslience
Reliability and Reslience
Donald Belcham
Opportunities to Improve System Reliability and Resilience by Donald Belcham
Opportunities to Improve System Reliability and Resilience by Donald Belcham
.NET Conf UY
Ähnlich wie Design patterns you didn't know about
(19)
Writing Good Tests
Writing Good Tests
#include iostream #includeData.h #includePerson.h#in.pdf
#include iostream #includeData.h #includePerson.h#in.pdf
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
Testing javascript in the frontend
Testing javascript in the frontend
Day 1
Day 1
#include stdio.h#include stdlib.h#include string.hstruct.pdf
#include stdio.h#include stdlib.h#include string.hstruct.pdf
Bad test, good test
Bad test, good test
05 JavaScript #burningkeyboards
05 JavaScript #burningkeyboards
Web Optimization Summit: Coding for Performance
Web Optimization Summit: Coding for Performance
連邦の白いヤツ 「Objective-C」
連邦の白いヤツ 「Objective-C」
operating system ubuntu,Linux,Macpublic class SuperMarket { .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket { .pdf
TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NET
Introduction to ECMAScript 2015
Introduction to ECMAScript 2015
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
Ian 20150116 java script oop
Ian 20150116 java script oop
Improving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con Berlin
Reliability and Reslience
Reliability and Reslience
Opportunities to Improve System Reliability and Resilience by Donald Belcham
Opportunities to Improve System Reliability and Resilience by Donald Belcham
Mehr von Donald Belcham
Introduction to Messaging
Introduction to Messaging
Donald Belcham
Advanced messaging patterns
Advanced messaging patterns
Donald Belcham
Microservices: The Nitty Gritty
Microservices: The Nitty Gritty
Donald Belcham
Microservices: A Gentle Introduction
Microservices: A Gentle Introduction
Donald Belcham
AOP & Patterns
AOP & Patterns
Donald Belcham
Intro To AOP
Intro To AOP
Donald Belcham
Source Control Abominations
Source Control Abominations
Donald Belcham
Is There Room for Craftsmanship in Software Development
Is There Room for Craftsmanship in Software Development
Donald Belcham
Reducing External Risk
Reducing External Risk
Donald Belcham
Performance Tuning in the Trenches
Performance Tuning in the Trenches
Donald Belcham
Reliability and Resilience
Reliability and Resilience
Donald Belcham
Introduction To AOP
Introduction To AOP
Donald Belcham
Programming Closer to the Iron
Programming Closer to the Iron
Donald Belcham
Taming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOP
Donald Belcham
Domain Driven Design Primer
Domain Driven Design Primer
Donald Belcham
Hacking Hardware
Hacking Hardware
Donald Belcham
Advanced AOP
Advanced AOP
Donald Belcham
The Dark Side of Code Metrics
The Dark Side of Code Metrics
Donald Belcham
Continuous Deployment
Continuous Deployment
Donald Belcham
Mehr von Donald Belcham
(19)
Introduction to Messaging
Introduction to Messaging
Advanced messaging patterns
Advanced messaging patterns
Microservices: The Nitty Gritty
Microservices: The Nitty Gritty
Microservices: A Gentle Introduction
Microservices: A Gentle Introduction
AOP & Patterns
AOP & Patterns
Intro To AOP
Intro To AOP
Source Control Abominations
Source Control Abominations
Is There Room for Craftsmanship in Software Development
Is There Room for Craftsmanship in Software Development
Reducing External Risk
Reducing External Risk
Performance Tuning in the Trenches
Performance Tuning in the Trenches
Reliability and Resilience
Reliability and Resilience
Introduction To AOP
Introduction To AOP
Programming Closer to the Iron
Programming Closer to the Iron
Taming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOP
Domain Driven Design Primer
Domain Driven Design Primer
Hacking Hardware
Hacking Hardware
Advanced AOP
Advanced AOP
The Dark Side of Code Metrics
The Dark Side of Code Metrics
Continuous Deployment
Continuous Deployment
Kürzlich hochgeladen
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
SynarionITSolutions
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
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 2024
Rafal Los
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
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
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
MIND CTI
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Kürzlich hochgeladen
(20)
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
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 2024
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 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...
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Design patterns you didn't know about
1.
and stuff
2.
tuple
3.
//Initialize customer and
invoice Initialize(customer, invoice);
4.
public void Initialize (Customer
customer, Invoice invoice) { customer.Name = “asdf”; invoice.Date = DateTime.Now; }
5.
Initialize(customer, invoice); //did something
happen to customer // and/or invoice?
6.
customer.Name = InitNameFrom(customer, invoice); invoice.Date
= InitDateFrom(customer, invoice);
7.
customer.Name = GetNameFrom(customer, invoice); invoice.Date
= GetDateFrom(customer, invoice);
8.
var results = Initialize(customer,
invoice); customer.Name = results.Item1; invoice.Date = results.Item2;
9.
public tuple<string, DateTime> Initialize(customer,
invoice) { return new Tuple<string, DateTime> (“asdf”, DateTime.Now); }
10.
tuple •Avoid side effects •Avoid
out parameters •multiple values without a specific type
11.
null object
12.
private ILogger _logger; public
MyClass(ILogger logger) { _logger = logger; } … if (_logger != null) { _logger.Debug( “it worked on my machine!”); }
13.
null checks for everyone!
14.
forget one and…
15.
public class NullLogger
: ILogger { public void Debug(string text) { //do sweet nothing } }
16.
private ILogger _logger
= new NullLogger(); public MyClass(ILogger logger) { _logger = logger; } … _logger.Debug( “it worked on my machine!”);
17.
null object •Can eliminate
null checks •Simple to implement
18.
Circuit Breaker
19.
20.
Retry
21.
YourApplication OutofProcess Dependency N times
22.
OutofProcess Dependency N times * Y clients
23.
= Denial of Service Attack
24.
Limit the # of
retries
25.
N * Y becomes 5
* Y
26.
Y is still a problem
27.
28.
Circuit Breaker
29.
30.
State Machine On ::
Off
31.
On Off when
not healthy
32.
Off On manually
33.
Get to software before
we cut you
34.
Healthy or Unhealthy OutofProcess Dependency
35.
State is independent of requestor OutofProcess Dependency
36.
YourApplication Can throttle itself
37.
YourApplication Has many independent external dependencies
38.
YourApplication Has a wait threshold
39.
Your Application External Dependency Circuit Breaker Threshold = 2 Pause
= 10ms Timeout = 30s State = Closed Request Request Failure (i.e. HTTP 500) Failure Count = 1 Pause 10ms Request Failure (i.e. HTTP 500) Failure Count = 2 State = Open OperationFailedException
40.
Your Application External Dependency Circuit Breaker Threshold = 2 Pause
= 10ms Timeout = 30s State = Open Request 30s has not passed CircuitBreakerOpenException Request 30s has not passed CircuitBreakerOpenException System can try to become healthy for 30s
41.
Your Application External Dependency Circuit Breaker Threshold = 2 Pause
= 10ms Timeout = 30s State = ½ Open Request Request Failure (i.e. HTTP 500) Failure Count = 2 State = Open OperationFailedException 30s has passed
42.
Your Application External Dependency Circuit Breaker Threshold = 2 Pause
= 10ms Timeout = 30s State = ½ Open Request Request Failure Count = 0 State = Closed Response 30s has passed Response
43.
Closed Open ½ Open
44.
½ Open is like
a manual reset
45.
Pause Timeout
46.
Pause between calls in the
loop
47.
Timeout before you can call
again
48.
Exceptions
49.
OperationFailed : AggregateException
50.
CircuitBreakerOpen : ApplicationException
51.
Don’t Loose Exception Info
52.
Always use InnerException(s)
53.
Your Application External Dependency Circuit Breaker Threshold = 3 State
= Closed Request Request Failure (i.e. HTTP 500) Failure Count = 1 Request Failure (i.e. HTTP 500) Failure Count = 2 Failure Count = 0 State = Closed Response Response Request ?
54.
Segregate Dependencies
55.
circuitBreaker(“database”) circuitBreaker(“weatherservice”)
56.
Dependency type, endpoint svc, endpoint
57.
Where?
58.
YourApplication OutofProcess Dependency CircuitBreaker Proxy
59.
Watch for Inception
60.
YourApplication WebService CircuitBreaker Proxy Database Repository CircuitBreaker
61.
circuit breaker •retry looping •slow
down attempts •good neighbour