What went wrong for my clients in the past 6 years trying to implement Microservice Architectures? This is a retrospective, a list of things we must to avoid to gainable with this kind of software architecture.
32. shared database2
CAUSES:
• database used for software customization
(combinatorial number of feature)
• Database normalization
• database owns business logic
• false need of strong consistency
33. shared database2
prevention:
• one (more?) database(s?) per microservice
• denormalize your data model
("Do not try and bend the spoon, that's impossible.
Instead, only try to realize the truth... there is no
spoon")
36. shared database2
TREATMENT:
• partition database
they can be
two logical
database on a
physical one
they can even
be the same
locical
database but
every service
has its own
tables
38. shared database2
TREATMENT:
• events + projections (create read models)
read models can be used to "replicate" data
owned by a service "A" so that they can be
*READ* from a service "B"
EVENTSREAD
MODELS
41. distributed monolith3
PREVENTion:
• postel's law
• Asynchronous communication
• circuit breakers, bulkheads, ...
"Be conservative in
what you send, be
liberal in what you
accepT"