MONOLITHIC ARCHITECTURE
Image
Processing
API
Image
Searcher
File
Storage
Slide 9
Slide 9 text
MINIMUM TWO SERVERS
BEHIND ELB
Load
Balancer
Slide 10
Slide 10 text
CLOUD VS BARE METAL
Slide 11
Slide 11 text
EXPENSIVE
Slide 12
Slide 12 text
NOT REALTIME
Slide 13
Slide 13 text
NOT PERSONALIZABLE
Slide 14
Slide 14 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 15
Slide 15 text
GOTHAM
Slide 16
Slide 16 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 17
Slide 17 text
JOKER
• Convert client’s catalog into
one common MAD Format
• Normalization of fields and
metadata
• Can process batch and
streaming data
• Major cause of chaos in the
system
Slide 18
Slide 18 text
GORDON
• Routes the product
metadata to the right micro
services
• Is it a new product? or
update to an existing
product?
• Streaming data from AWS
SQS
Slide 19
Slide 19 text
WONDER WOMAN
• Not a microservice, But a
tool used to generate rules
for the catalog
• Rules are send to the Image
Processing microservice
• Works on Samples of data
and not entire dataset
Slide 20
Slide 20 text
WATCHTOWER
• Central Source of Truth for
all metadata
• Backed by an RDBMS
Database (Postgresql)
• Input via SQS and REST API
• Output via REST API
Slide 21
Slide 21 text
INGESTION
Gordon
Joker
Joker
Joker
Wonder
Woman
Watchtower
Next Stage
Slide 22
Slide 22 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 23
Slide 23 text
NIGHTWING
• Computer Vision and Deep
Learning Models
• Convert Image to high
dimensional vectors
• Tag image with visual
attributes
• Computer Intensive
Slide 24
Slide 24 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 25
Slide 25 text
BATMAN
• Custom very fast Vector
Indexer and Search Engine
• Stores everything in
memory
• Two sub-parts: Indexer and
Searcher
• Store binary information
about image in DynamoDB
Slide 26
Slide 26 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 27
Slide 27 text
SUPERMAN
• User behaviour based
recommendation
• Multiple products like
Collaborative filtering, Cross
Product recommendation
• Records every user event
data and stores in a data
warehouse
Slide 28
Slide 28 text
TWO FACE
• Individual User level
Personalization
• Shows a different “face” to
each user
• Dynamic and realtime
Slide 29
Slide 29 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 30
Slide 30 text
FLASH
• Very fast data structure
storage - redis instance
• User session level history,
Product Availability, etc.
• Fast access, but non-
expirable
Slide 31
Slide 31 text
GCPD
• “Global Cache for Products
Digested”
• Rough first level of cache
for the results
Slide 32
Slide 32 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Slide 33
Slide 33 text
ROBIN
• API Gateway for all our
products
• Combines data from other
micro services like Batman,
Two Face, Watchtower,
Superman, etc and returns
JSON Response
Slide 34
Slide 34 text
API
Data
Store
Ingestion
Image
Processing
Image
Searcher
User
Event
Personalization
Engine
Joker, Gordon,
Wonder Woman
Nightwing Batman
Robin
Watchtower,
GCPD, Flash
Superman, Two Face
Slide 35
Slide 35 text
LESSONS WE LEARNT
Slide 36
Slide 36 text
START WITH A MONOLITH.
CHIP OFF PIECES AND BUILD
THE MICROSERVICES.
Lesson 0
Slide 37
Slide 37 text
–Melvin Conway
“… organizations which design systems ... are
constrained to produce designs which are copies of
the communication structures of these organizations."
Slide 38
Slide 38 text
DEPLOY HETEROGENOUS
MICROSERVICES IN A
SINGLE SERVER
Lesson 1
Slide 39
Slide 39 text
Compute Optimized Server Memory Optimized Server
Nightwing Batman
Robin Robin Robin
Joker Joker Joker
Gordon
Watch
tower
Watch
tower
Joker