SlideShare a Scribd company logo
1 of 68
Download to read offline
OLIST ARCHITECTURE
Merchants
Online & Offline
BEFORE…
OLISTVERSION ONE (AKAV1)
AngularJS
OLISTVERSION ONE (AKAV1)
AngularJS
COMPLEX!
MONOLITHIC
MONOLITHIC
No Scalability
MONOLITHIC
No Scalability
No Reliability
MONOLITHIC
No Scalability
No Reliability
No Safety
THEN…
LET'S WRITE A NEWVERSION
REQUIREMENTS
SIMPLICITY
SCALABILITY
RESILIENCE
MODULARITY
SAFETY
PREMISSE
• No matter if a system is internal or external, it eventually…
• … goes offline…
• … crashes…
• … or change their behaviour without notice.
A NEW ARCHITECTURE
MICROSERVICES
MICROSERVICES or SOA?
MICROSERVICES or SOA?
IMPLEMENTATION MODELS
COMMUNICATIONVIA API
A
P
I
A
P
I
G
a
t
e
w
a
y
A
P
I
A
P
I
HTTP Requests
COMMUNICATIONVIA API
• RESTful communication between
services
• Synchronous Service Calls
• Strict dependency between services
A
P
I
A
P
I
G
a
t
e
w
a
y
A
P
I
A
P
I
HTTP Requests
COMMUNICATIONVIA API
• RESTful communication between
services
• Synchronous Service Calls
• Strict dependency between services
A
P
I
A
P
I
G
a
t
e
w
a
y
A
P
I
A
P
I
HTTP Requests
COMMUNICATIONVIA API
• RESTful communication between
services
• Synchronous Service Calls
• Strict dependency between services
A
P
I
A
P
I
G
a
t
e
w
a
y
A
P
I
A
P
I
HTTP Requests
COMMUNICATIONVIA API
• RESTful communication between
services
• Synchronous Service Calls
• Strict dependency between services
A
P
I
A
P
I
G
a
t
e
w
a
y
A
P
I
A
P
I
HTTP Requests
COMMUNICATIONVIA API
• RESTful communication between
services
• Synchronous Service Calls
• Strict dependency between services
• No resilience
• No safety* (eg. data loss on request
failures)
A
P
I
A
P
I
G
a
t
e
w
a
y
A
P
I
A
P
I
HTTP Requests
Workers
ASYNCTASK EXECUTION
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Workers
ASYNCTASK EXECUTION
• Asynchronous Procedure Calls
• Queue based task execution
• Client must knows about their
dependents (I've to change API every
time I need to add a new task)
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Workers
ASYNCTASK EXECUTION
• Asynchronous Procedure Calls
• Queue based task execution
• Client must knows about their
dependents (I've to change API every
time I need to add a new task)
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Workers
ASYNCTASK EXECUTION
• Asynchronous Procedure Calls
• Queue based task execution
• Client must knows about their
dependents (I've to change API every
time I need to add a new task)
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Workers
ASYNCTASK EXECUTION
• Asynchronous Procedure Calls
• Queue based task execution
• Client must knows about their
dependents (I've to change API every
time I need to add a new task)
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Workers
ASYNCTASK EXECUTION
• Asynchronous Procedure Calls
• Queue based task execution
• Client must knows about their
dependents (I've to change API every
time I need to add a new task)
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Task #4
call task #4
Workers
ASYNCTASK EXECUTION
• Asynchronous Procedure Calls
• Queue based task execution
• Client must knows about their
dependents (I've to change API every
time I need to add a new task)
• No decoupling ➡ No modularity
• No safety* (eg. data loss on
deployment failures)
A
P
I
Task #1
Task #2
Task #3
call task #1
call task #2
call task #3
Task #4
call task #4
MESSAGE EVENTTRIGGERING
Event
A
P
I
Service
Consumer
Service
Consumer
Service
Consumer
queues
MESSAGE EVENTTRIGGERING
• Action Event triggering
• Queue based message event handling
• Event as messages
Event
A
P
I
Service
Consumer
Service
Consumer
Service
Consumer
queues
MESSAGE EVENTTRIGGERING
• Action Event triggering
• Queue based message event handling
• Event as messages
Event
A
P
I
Service
Consumer
Service
Consumer
Service
Consumer
queues
MESSAGE EVENTTRIGGERING
• Action Event triggering
• Queue based message event handling
• Event as messages
Event
A
P
I
Service
Consumer
Service
Consumer
Service
Consumer
queues
MESSAGE EVENTTRIGGERING
• Action Event triggering
• Queue based message event handling
• Event as messages
• It works!
Event
A
P
I
Service
Consumer
Service
Consumer
Service
Consumer
queues
BASIC BUILDING BLOCKS
MESSAGES
• Also known as Resource in REST
context
• Follow a contract (schema)
• Can be enveloped with metadata (eg.
SNS/SQS metadata)
GLOBALTOPICS
• Publisher in PubSub Pattern
• Global topics for message publication
• Topics belong to the system (or
architecture) and not to a (micro)service
• We use AWS SNS
• Kafka was not available on our hosting
provider (Heroku) at the time we
choose SNS
SERVICE QUEUES
• Subscribers in PubSub Pattern
• Queues subscribe topics
• One queue belong exclusively to one
(micro)service
• We use AWS SQS
• SQS can be used as a SNS subscriber
API
• Main Data Entry Point
• DataValidation
• Data Persistence
• Workflow Management (eg. status and state
machine)
• EventTriggering
• Idempotency handling (eg. discard duplicated
requests returning a HTTP 304 Not Modified)
• Python 3, Django REST Framework
A
P
I
WEBHOOK
• Data Entry Point
• No Data Persistence
• Proxy HTTP ➡ SNS
• EventTriggering
• Python 3, Django REST Framework
W
e
b
h
o
o
k
SERVICE
• Event Handling / Message Processing
• Business Logic
• Some service could trigger some events but it's
not so usual
• ServiceTypes:
• Dequeuer - process messages from one queue
• Broker - process messages from multiple
queues
• Python 3, Loafer / Asyncio
API #1 Event #1
Service
JOB
• Scheduled Job
• No Persistence
• EventTriggering
• Python 3, etc.
Job
⏲
CLIENT
• Web or Mobile Applications
• No Persistence (or basic persistence)
• Web presentation of APIs' resources
• Python 3, Django
W
e
b
A
p
p
A
P
I
LIBRARIES
• Common Libraries — common utilities for APIs and Services (eg.
event triggering/topic publishing)
• Client Libraries — libraries to connect our APIs
• Auth Library — library to handle authentication basics
• Open Source Libraries — useful libraries for community (eg. correios)
TOOLS
• Legacy Data Migrator — tool that connects in all databases and
provides a small framework for data migration. It uses Kenneth Reiz's
records library. It was initially used to migrate data from the old
version of our application.
• Toolbelt — tool that provide basic management commands to
interact with our APIs, partner APIs and to make ease to manage
SQS queues or trigger some events in SNSTopics.
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
WORKING SAMPLE

posting list and shipping label generation
Webapp
Fulfillment

API
http

request
topic
trigger

event
queue
plp
generating
service
Internal
Carrier

API
topic
queue
plp-closing-service
External
Service
success
queue
• generate pdf
• upload pdf to s3
• set tracking code and
pdf url at fulfillment-api
DEVELOPMENT
REMOTETEAM
DEVELOPMENTTOOLS
• Github - code management
• CircleCI - continuous integration
• vim / PyCharm / SublimeText / etc - development
COMMUNICATIONTOOLS
• JIRA - project management
• Confluence - documentation
• Google Apps - Mail, Calendar, Docs
• Slack - chat and monitoring integrations
• Mumble - voice conference
• tmux, ngrok, vim (and mumble) - pair programming
DEPLOYMENT
• Hosted on Heroku PaaS (our secret weapon!)
• Easy deployment, configuration management, log handling, etc
• Heroku PostgreSQL Database
• Easy deployment, easy configuration and setup, easy backup,
replica and foreign data wrappers
• Other services and tools
• Logentries, Sentry and New Relic
CHALLENGES
• It's hard to make evolution of message/resource contracts between
services
• All sequential process must be splitted over multiple (small) services
• Denormalization of data can easily lead to problems of data consistency if
we do not take certain precautions
• Information needed for one API must be replicated through services
and stored locally
• Data migration or refactoring in several services requires the
development of an specific application

More Related Content

What's hot

Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Brooklyn Zelenka
 
Trends and development practices in Serverless architectures
Trends and development practices in Serverless architecturesTrends and development practices in Serverless architectures
Trends and development practices in Serverless architecturesDiUS
 
GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsVáclav Šír
 
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...Natan Silnitsky
 
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)Roes Wibowo
 
Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011leo lapworth
 
Modern Tools for API Testing, Debugging and Monitoring
Modern Tools for API Testing, Debugging and MonitoringModern Tools for API Testing, Debugging and Monitoring
Modern Tools for API Testing, Debugging and MonitoringNeil Mansilla
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkBukhori Aqid
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksPhill Sparks
 
All Aboard for Laravel 5.1
All Aboard for Laravel 5.1All Aboard for Laravel 5.1
All Aboard for Laravel 5.1Jason McCreary
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesJeff Potts
 
SendGrid Delivered API Workshop
SendGrid Delivered API WorkshopSendGrid Delivered API Workshop
SendGrid Delivered API WorkshopBrandon West
 
Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1Damian Legawiec
 
PHP7.1 New Features & Performance
PHP7.1 New Features & PerformancePHP7.1 New Features & Performance
PHP7.1 New Features & PerformanceXinchen Hui
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swaggerscolestock
 
Exactly Once Delivery with Kafka - JOTB2020 Mini Session
Exactly Once Delivery with Kafka - JOTB2020 Mini SessionExactly Once Delivery with Kafka - JOTB2020 Mini Session
Exactly Once Delivery with Kafka - JOTB2020 Mini SessionNatan Silnitsky
 
Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Chris Tankersley
 
Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)Rudy De Busscher
 
No REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIsNo REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIsC4Media
 

What's hot (20)

Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)
 
Trends and development practices in Serverless architectures
Trends and development practices in Serverless architecturesTrends and development practices in Serverless architectures
Trends and development practices in Serverless architectures
 
GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'ts
 
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
 
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
 
Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011
 
Modern Tools for API Testing, Debugging and Monitoring
Modern Tools for API Testing, Debugging and MonitoringModern Tools for API Testing, Debugging and Monitoring
Modern Tools for API Testing, Debugging and Monitoring
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP framework
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
 
All Aboard for Laravel 5.1
All Aboard for Laravel 5.1All Aboard for Laravel 5.1
All Aboard for Laravel 5.1
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL Templates
 
SendGrid Delivered API Workshop
SendGrid Delivered API WorkshopSendGrid Delivered API Workshop
SendGrid Delivered API Workshop
 
Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1
 
PHP7.1 New Features & Performance
PHP7.1 New Features & PerformancePHP7.1 New Features & Performance
PHP7.1 New Features & Performance
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swagger
 
Exactly Once Delivery with Kafka - JOTB2020 Mini Session
Exactly Once Delivery with Kafka - JOTB2020 Mini SessionExactly Once Delivery with Kafka - JOTB2020 Mini Session
Exactly Once Delivery with Kafka - JOTB2020 Mini Session
 
Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)
 
Building a chatbot – step by step
Building a chatbot – step by stepBuilding a chatbot – step by step
Building a chatbot – step by step
 
Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)Transactions in micro-services (fall 2019)
Transactions in micro-services (fall 2019)
 
No REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIsNo REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIs
 

Similar to Plataforma distribuída de Microserviços ou, como a Olist funciona

API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisisChristian Posta
 
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...SmartBear
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and PracticesLaunchAny
 
Dances with bits - industrial data analytics made easy!
Dances with bits - industrial data analytics made easy!Dances with bits - industrial data analytics made easy!
Dances with bits - industrial data analytics made easy!Julian Feinauer
 
AI made easy with Flink AI Flow
AI made easy with Flink AI FlowAI made easy with Flink AI Flow
AI made easy with Flink AI FlowJiangjie Qin
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesMatt Turner
 
Web development basics (Part-5)
Web development basics (Part-5)Web development basics (Part-5)
Web development basics (Part-5)Rajat Pratap Singh
 
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr MalykFwdays
 
Monolithic to Microservices Migration Journey of iyzico with Spring Cloud
Monolithic to Microservices Migration Journey of iyzico with Spring CloudMonolithic to Microservices Migration Journey of iyzico with Spring Cloud
Monolithic to Microservices Migration Journey of iyzico with Spring CloudMustafa Can Tekir
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux Neotys
 
Monolithic to microservices migration journey with spring cloud
Monolithic to microservices migration journey with spring cloudMonolithic to microservices migration journey with spring cloud
Monolithic to microservices migration journey with spring cloudzeynelkocak
 
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...apidays
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScriptJustin Wendlandt
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureToru Kawamura
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
AWS Serverless API Management - Meetup
AWS Serverless API Management - MeetupAWS Serverless API Management - Meetup
AWS Serverless API Management - MeetupSamuel Vandecasteele
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureJeremy Likness
 
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architectureDevoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architectureBen Wilcock
 
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
Inside Kafka Streams—Monitoring Comcast’s Outside Plant Inside Kafka Streams—Monitoring Comcast’s Outside Plant
Inside Kafka Streams—Monitoring Comcast’s Outside Plant confluent
 
Crafting Consumable APIs
Crafting Consumable APIsCrafting Consumable APIs
Crafting Consumable APIsWSO2
 

Similar to Plataforma distribuída de Microserviços ou, como a Olist funciona (20)

API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
 
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
Dances with bits - industrial data analytics made easy!
Dances with bits - industrial data analytics made easy!Dances with bits - industrial data analytics made easy!
Dances with bits - industrial data analytics made easy!
 
AI made easy with Flink AI Flow
AI made easy with Flink AI FlowAI made easy with Flink AI Flow
AI made easy with Flink AI Flow
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 
Web development basics (Part-5)
Web development basics (Part-5)Web development basics (Part-5)
Web development basics (Part-5)
 
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
 
Monolithic to Microservices Migration Journey of iyzico with Spring Cloud
Monolithic to Microservices Migration Journey of iyzico with Spring CloudMonolithic to Microservices Migration Journey of iyzico with Spring Cloud
Monolithic to Microservices Migration Journey of iyzico with Spring Cloud
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux
 
Monolithic to microservices migration journey with spring cloud
Monolithic to microservices migration journey with spring cloudMonolithic to microservices migration journey with spring cloud
Monolithic to microservices migration journey with spring cloud
 
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
AWS Serverless API Management - Meetup
AWS Serverless API Management - MeetupAWS Serverless API Management - Meetup
AWS Serverless API Management - Meetup
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with Azure
 
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architectureDevoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
 
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
Inside Kafka Streams—Monitoring Comcast’s Outside Plant Inside Kafka Streams—Monitoring Comcast’s Outside Plant
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
 
Crafting Consumable APIs
Crafting Consumable APIsCrafting Consumable APIs
Crafting Consumable APIs
 

More from Osvaldo Santana Neto

Contruindo um Framework Web de Brinquedo só com Python
Contruindo um Framework Web de Brinquedo só com PythonContruindo um Framework Web de Brinquedo só com Python
Contruindo um Framework Web de Brinquedo só com PythonOsvaldo Santana Neto
 
Dave Thomas - Agile is Dead (GOTO 2015)
Dave Thomas - Agile is Dead (GOTO 2015)Dave Thomas - Agile is Dead (GOTO 2015)
Dave Thomas - Agile is Dead (GOTO 2015)Osvaldo Santana Neto
 
Como funciona um time remoto de desenvolvimento - Caipyra 2018
Como funciona um time remoto de desenvolvimento - Caipyra 2018Como funciona um time remoto de desenvolvimento - Caipyra 2018
Como funciona um time remoto de desenvolvimento - Caipyra 2018Osvaldo Santana Neto
 
Escalando times através do trabalho remoto
Escalando times através do trabalho remotoEscalando times através do trabalho remoto
Escalando times através do trabalho remotoOsvaldo Santana Neto
 
Real Life Hackers @ PechaKucha 20x20
Real Life Hackers @ PechaKucha 20x20Real Life Hackers @ PechaKucha 20x20
Real Life Hackers @ PechaKucha 20x20Osvaldo Santana Neto
 
De Zero à Web com Python e Django
De Zero à Web com Python e DjangoDe Zero à Web com Python e Django
De Zero à Web com Python e DjangoOsvaldo Santana Neto
 
Entendiendo Unicode (Facundo Batista)
Entendiendo Unicode (Facundo Batista)Entendiendo Unicode (Facundo Batista)
Entendiendo Unicode (Facundo Batista)Osvaldo Santana Neto
 
Como me tornei um empreendedor pythonista
Como me tornei um empreendedor pythonistaComo me tornei um empreendedor pythonista
Como me tornei um empreendedor pythonistaOsvaldo Santana Neto
 
Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)
Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)
Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)Osvaldo Santana Neto
 
Ludeos - Venda seu conteúdo online (how it works)
Ludeos - Venda seu conteúdo online (how it works)Ludeos - Venda seu conteúdo online (how it works)
Ludeos - Venda seu conteúdo online (how it works)Osvaldo Santana Neto
 
App Engine: aplicações escaláveis em poucas horas
App Engine: aplicações escaláveis em poucas horasApp Engine: aplicações escaláveis em poucas horas
App Engine: aplicações escaláveis em poucas horasOsvaldo Santana Neto
 
Desenvolvimento RAD com Python (Fenasoft)
Desenvolvimento RAD com Python (Fenasoft)Desenvolvimento RAD com Python (Fenasoft)
Desenvolvimento RAD com Python (Fenasoft)Osvaldo Santana Neto
 

More from Osvaldo Santana Neto (20)

Basic Brainf*ck
Basic Brainf*ckBasic Brainf*ck
Basic Brainf*ck
 
Contruindo um Framework Web de Brinquedo só com Python
Contruindo um Framework Web de Brinquedo só com PythonContruindo um Framework Web de Brinquedo só com Python
Contruindo um Framework Web de Brinquedo só com Python
 
A Web é uma API
A Web é uma APIA Web é uma API
A Web é uma API
 
Dave Thomas - Agile is Dead (GOTO 2015)
Dave Thomas - Agile is Dead (GOTO 2015)Dave Thomas - Agile is Dead (GOTO 2015)
Dave Thomas - Agile is Dead (GOTO 2015)
 
Advanced Brainf*ck
Advanced Brainf*ckAdvanced Brainf*ck
Advanced Brainf*ck
 
Corrigindo Bugs no CPython
Corrigindo Bugs no CPythonCorrigindo Bugs no CPython
Corrigindo Bugs no CPython
 
Como funciona um time remoto de desenvolvimento - Caipyra 2018
Como funciona um time remoto de desenvolvimento - Caipyra 2018Como funciona um time remoto de desenvolvimento - Caipyra 2018
Como funciona um time remoto de desenvolvimento - Caipyra 2018
 
Escalando times através do trabalho remoto
Escalando times através do trabalho remotoEscalando times através do trabalho remoto
Escalando times através do trabalho remoto
 
Real Life Hackers @ PechaKucha 20x20
Real Life Hackers @ PechaKucha 20x20Real Life Hackers @ PechaKucha 20x20
Real Life Hackers @ PechaKucha 20x20
 
De Zero à Web com Python e Django
De Zero à Web com Python e DjangoDe Zero à Web com Python e Django
De Zero à Web com Python e Django
 
TDD com Python (Completo)
TDD com Python (Completo)TDD com Python (Completo)
TDD com Python (Completo)
 
Curso de Python e Django
Curso de Python e DjangoCurso de Python e Django
Curso de Python e Django
 
Entendiendo Unicode (Facundo Batista)
Entendiendo Unicode (Facundo Batista)Entendiendo Unicode (Facundo Batista)
Entendiendo Unicode (Facundo Batista)
 
Como me tornei um empreendedor pythonista
Como me tornei um empreendedor pythonistaComo me tornei um empreendedor pythonista
Como me tornei um empreendedor pythonista
 
TDD com Python
TDD com PythonTDD com Python
TDD com Python
 
Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)
Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)
Matando (ou quase) Unicode(De|En)codeErrors (lightning talk)
 
Ludeos - Venda seu conteúdo online (how it works)
Ludeos - Venda seu conteúdo online (how it works)Ludeos - Venda seu conteúdo online (how it works)
Ludeos - Venda seu conteúdo online (how it works)
 
App Engine: aplicações escaláveis em poucas horas
App Engine: aplicações escaláveis em poucas horasApp Engine: aplicações escaláveis em poucas horas
App Engine: aplicações escaláveis em poucas horas
 
Programação RAD com Python
Programação RAD com PythonProgramação RAD com Python
Programação RAD com Python
 
Desenvolvimento RAD com Python (Fenasoft)
Desenvolvimento RAD com Python (Fenasoft)Desenvolvimento RAD com Python (Fenasoft)
Desenvolvimento RAD com Python (Fenasoft)
 

Recently uploaded

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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
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
 
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
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
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
 
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
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
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
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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.
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
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
 
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
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
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
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 

Plataforma distribuída de Microserviços ou, como a Olist funciona

  • 11. LET'S WRITE A NEWVERSION
  • 18. PREMISSE • No matter if a system is internal or external, it eventually… • … goes offline… • … crashes… • … or change their behaviour without notice.
  • 25. COMMUNICATIONVIA API • RESTful communication between services • Synchronous Service Calls • Strict dependency between services A P I A P I G a t e w a y A P I A P I HTTP Requests
  • 26. COMMUNICATIONVIA API • RESTful communication between services • Synchronous Service Calls • Strict dependency between services A P I A P I G a t e w a y A P I A P I HTTP Requests
  • 27. COMMUNICATIONVIA API • RESTful communication between services • Synchronous Service Calls • Strict dependency between services A P I A P I G a t e w a y A P I A P I HTTP Requests
  • 28. COMMUNICATIONVIA API • RESTful communication between services • Synchronous Service Calls • Strict dependency between services A P I A P I G a t e w a y A P I A P I HTTP Requests
  • 29. COMMUNICATIONVIA API • RESTful communication between services • Synchronous Service Calls • Strict dependency between services • No resilience • No safety* (eg. data loss on request failures) A P I A P I G a t e w a y A P I A P I HTTP Requests
  • 30. Workers ASYNCTASK EXECUTION A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3
  • 31. Workers ASYNCTASK EXECUTION • Asynchronous Procedure Calls • Queue based task execution • Client must knows about their dependents (I've to change API every time I need to add a new task) A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3
  • 32. Workers ASYNCTASK EXECUTION • Asynchronous Procedure Calls • Queue based task execution • Client must knows about their dependents (I've to change API every time I need to add a new task) A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3
  • 33. Workers ASYNCTASK EXECUTION • Asynchronous Procedure Calls • Queue based task execution • Client must knows about their dependents (I've to change API every time I need to add a new task) A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3
  • 34. Workers ASYNCTASK EXECUTION • Asynchronous Procedure Calls • Queue based task execution • Client must knows about their dependents (I've to change API every time I need to add a new task) A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3
  • 35. Workers ASYNCTASK EXECUTION • Asynchronous Procedure Calls • Queue based task execution • Client must knows about their dependents (I've to change API every time I need to add a new task) A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3 Task #4 call task #4
  • 36. Workers ASYNCTASK EXECUTION • Asynchronous Procedure Calls • Queue based task execution • Client must knows about their dependents (I've to change API every time I need to add a new task) • No decoupling ➡ No modularity • No safety* (eg. data loss on deployment failures) A P I Task #1 Task #2 Task #3 call task #1 call task #2 call task #3 Task #4 call task #4
  • 38. MESSAGE EVENTTRIGGERING • Action Event triggering • Queue based message event handling • Event as messages Event A P I Service Consumer Service Consumer Service Consumer queues
  • 39. MESSAGE EVENTTRIGGERING • Action Event triggering • Queue based message event handling • Event as messages Event A P I Service Consumer Service Consumer Service Consumer queues
  • 40. MESSAGE EVENTTRIGGERING • Action Event triggering • Queue based message event handling • Event as messages Event A P I Service Consumer Service Consumer Service Consumer queues
  • 41. MESSAGE EVENTTRIGGERING • Action Event triggering • Queue based message event handling • Event as messages • It works! Event A P I Service Consumer Service Consumer Service Consumer queues
  • 43. MESSAGES • Also known as Resource in REST context • Follow a contract (schema) • Can be enveloped with metadata (eg. SNS/SQS metadata)
  • 44. GLOBALTOPICS • Publisher in PubSub Pattern • Global topics for message publication • Topics belong to the system (or architecture) and not to a (micro)service • We use AWS SNS • Kafka was not available on our hosting provider (Heroku) at the time we choose SNS
  • 45. SERVICE QUEUES • Subscribers in PubSub Pattern • Queues subscribe topics • One queue belong exclusively to one (micro)service • We use AWS SQS • SQS can be used as a SNS subscriber
  • 46. API • Main Data Entry Point • DataValidation • Data Persistence • Workflow Management (eg. status and state machine) • EventTriggering • Idempotency handling (eg. discard duplicated requests returning a HTTP 304 Not Modified) • Python 3, Django REST Framework A P I
  • 47. WEBHOOK • Data Entry Point • No Data Persistence • Proxy HTTP ➡ SNS • EventTriggering • Python 3, Django REST Framework W e b h o o k
  • 48. SERVICE • Event Handling / Message Processing • Business Logic • Some service could trigger some events but it's not so usual • ServiceTypes: • Dequeuer - process messages from one queue • Broker - process messages from multiple queues • Python 3, Loafer / Asyncio API #1 Event #1 Service
  • 49. JOB • Scheduled Job • No Persistence • EventTriggering • Python 3, etc. Job ⏲
  • 50. CLIENT • Web or Mobile Applications • No Persistence (or basic persistence) • Web presentation of APIs' resources • Python 3, Django W e b A p p A P I
  • 51. LIBRARIES • Common Libraries — common utilities for APIs and Services (eg. event triggering/topic publishing) • Client Libraries — libraries to connect our APIs • Auth Library — library to handle authentication basics • Open Source Libraries — useful libraries for community (eg. correios)
  • 52. TOOLS • Legacy Data Migrator — tool that connects in all databases and provides a small framework for data migration. It uses Kenneth Reiz's records library. It was initially used to migrate data from the old version of our application. • Toolbelt — tool that provide basic management commands to interact with our APIs, partner APIs and to make ease to manage SQS queues or trigger some events in SNSTopics.
  • 53. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 54. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 55. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 56. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 57. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 58. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 59. WORKING SAMPLE
 posting list and shipping label generation Webapp Fulfillment
 API http
 request topic trigger
 event queue plp generating service Internal Carrier
 API topic queue plp-closing-service External Service success queue • generate pdf • upload pdf to s3 • set tracking code and pdf url at fulfillment-api
  • 62. DEVELOPMENTTOOLS • Github - code management • CircleCI - continuous integration • vim / PyCharm / SublimeText / etc - development
  • 63. COMMUNICATIONTOOLS • JIRA - project management • Confluence - documentation • Google Apps - Mail, Calendar, Docs • Slack - chat and monitoring integrations • Mumble - voice conference • tmux, ngrok, vim (and mumble) - pair programming
  • 65.
  • 66. • Hosted on Heroku PaaS (our secret weapon!) • Easy deployment, configuration management, log handling, etc • Heroku PostgreSQL Database • Easy deployment, easy configuration and setup, easy backup, replica and foreign data wrappers • Other services and tools • Logentries, Sentry and New Relic
  • 68. • It's hard to make evolution of message/resource contracts between services • All sequential process must be splitted over multiple (small) services • Denormalization of data can easily lead to problems of data consistency if we do not take certain precautions • Information needed for one API must be replicated through services and stored locally • Data migration or refactoring in several services requires the development of an specific application