SlideShare uma empresa Scribd logo
Compilação de Lições Aprendidas
Versão APIX 2018
ELEMAR JR | falecom@elemarjr.com
MICROSSERVIÇOS:
BOAS PRÁTICAS DO CAMPO
DE BATALHA
São as
cicatrizes
que contam a
história
do guerreiro.
#0 EVIDENCIE A ARQUITETURA!
Componentes +
Responsabilidades +
Relacionamentos
Estratégia
ARQUITETURA DE SOFTWARE
#1 FOQUE NOS OBJETIVOS DO
NEGÓCIO!
Complexidade
do Domínio
Complexidade
do Legado
Complexidade
da Solução
Técnica
Complexidade
do Software
Complexidade
do Domínio
Complexidade
do Legado
Complexidade
da Solução
Técnica
Complexidade
do Software
Complexidade
Essencial
Complexidade
Acidental
Complexidade
do Domínio
Complexidade
do Legado
Complexidade
da Solução
Técnica
Complexidade
do Software
Complexidade
Essencial
Complexidade
Acidental
Complexidade
do Domínio
Complexidade
do Legado
Complexidade
da Solução
Técnica
Complexidade
do Software
Complexidade
Essencial
Complexidade
Acidental
LEMBRETE: Complexidade é CUSTO!
Capacidade
de manter o
Sistema
Estável
Resposta
Rápida para
Demandas
do Negócio
#2 NÃO REINVENTE A RODA.
http://bit.ly/elemarjr-fiefdom
DESACOPLAMENTO
#2 Não fragmente demais. COMECE
COM OS BOUNDED CONTEXTS!
#3 PROCESSOS> DADOS
#4 NÃO COMPARTILHE BANCOS DE
DADOS!
Sales Support
Sales Support
Sales Support
Sales Support
Sales Support
Sales Support
Shopping Cart
#4.1 NÃO COMPARTILHE BANCOS DE
DADOS - USE SAGAS!
Sales FinancialLogistic Delivery
Criar o Pedido Separar Produto Efetivar Cobrança Iniciar Entrega
Sales FinancialLogistic Delivery
Criar o Pedido Separar Produto Efetivar Cobrança Iniciar Entrega
TRANSAÇÃO
Sales FinancialLogistic Delivery
Criar o Pedido Separar Produto Efetivar Cobrança Iniciar Entrega
TRANSAÇÃO
Devolver DinheiroDevolver ProdutoCancelar PedidoAção
Compensatória
Sales FinancialLogistic Delivery
Criar o Pedido Separar Produto Efetivar Cobrança Iniciar Entrega
Devolver DinheiroDevolver ProdutoCancelar PedidoAção
Compensatória
SAGA
Sales FinancialLogistic Delivery
Criar o Pedido Separar Produto Efetivar Cobrança Iniciar Entrega
SAGA
Devolver DinheiroDevolver ProdutoCancelar PedidoAção
Compensatória
SAGA MANAGER
#5 IDENTIDADE! IDENTIDADE!
Sales Support
Shopping CartIdentidade
#6 SEJA CONSISTENTE!
Sales Support
Shopping CartIdentidade
API GATEWAY
WEB MOBILE
#6 PREOCUPE-SE COM
DISPONIBILIDADE!
Sales Support
Shopping CartIdentidade
API GATEWAY
WEB MOBILE
Sales Support
Shopping CartIdentidade
API GATEWAY
WEB MOBILE
99%
99%
Sales Support
Shopping CartIdentidade
API GATEWAY
WEB MOBILE
99%
99%
98%
Sales Support
Shopping CartIdentidade
API GATEWAY
WEB MOBILE
99%
99%
99%
Sales Support
Shopping CartIdentidade
API GATEWAY
WEB MOBILE
API GATEWAY
WEB MOBILE
Identidade
Sales
Shopping
Cart
Support
Shopping
Cart
LB
#7 BUSQUE ABSTRAÇÕES SIMPLES
App Core
(Domain)
WebAPI
Queue Subscriber
Domain Events
Publisher
PersistenceAgent
OtherService
Integration
http://bit.ly/elemarjr-mais-4-recomendacoes
#8 DOCUMENTE CONSISTENTEMENTE
App Core
(Domain)
WebAPI
Queue Subscriber
Domain Events
Publisher
PersistenceAgent
OtherService
Integration
OpenAPISpec
http://bit.ly/elemarjr-falhas
#9 CONTAINERS! CONTAINERS!
http://bit.ly/elemarjr-mais-4-recomendacoes
#10 PREPARE-SE PARA FALHAS!
Sales
Shopping
CartShopping
Cart
X
What If?
Sales
Shopping
CartShopping
Cart
X
What If?
Retry!
Consumer ProducerCircuit breaker
Closed
Open
Half-Open
Sucesso
Uma Tentativa Bem Sucedida
Fail Fast
Falha
Sucesso
Falha
Sales
Shopping
CartShopping
Cart
X
What If?
http://bit.ly/elemarjr-consumir-microsservicos
http://bit.ly/elemarjr-consumir-microsservicos
http://bit.ly/elemarjr-consumir-microsservicos
http://bit.ly/elemarjr-consumir-microsservicos
http://bit.ly/elemarjr-saude-microsservicos
http://bit.ly/elemarjr-saude-microsservicos
#11 ...
DESACOPLAMENTO
Compilação de Lições Aprendidas
Versão APIX 2018
ELEMAR JR | falecom@elemarjr.com
MICROSSERVIÇOS:
BOAS PRÁTICAS DO CAMPO
DE BATALHA

Mais conteúdo relacionado

Destaque

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
 

Destaque (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Microsserviços - Lições Aprendidas, Padrões e Práticas