Building platforms is hard. Building platforms that scale is even harder. We will walk through applying principles that will open the up the doors for discovering microservices within our platforms. Ultimately we will learn that how we work is just as important as what we do.
3. PROPRIETARY AND CONFIDENTIAL
Overview
"microservice architectural style is an approach to developing a
single application as a suite of small services, each running in its
own process and communicating with lightweight mechanisms,
often an HTTP resource API. "
- Martin Fowler and James Lewis
What are Microservices?
4. PROPRIETARY AND CONFIDENTIAL
Overview
"These services are built around business capabilities and
independently deployable by fully automated deployment
machinery. There is a bare minimum of centralized management
of these services, which may be written in different programming
languages and use different data storage technologies."
- Martin Fowler and James Lewis
What are Microservices?
6. PROPRIETARY AND CONFIDENTIAL
The best architectures, requirements, and
designs emerge from self-organizing teams.
Overview
6
Loosely Coupled
Business people and developers must
work together daily throughout the
project.
Built Around Business
Simplicity--the art of maximizing the amount of
work not done--is essential.
Service Oriented
Deliver working software frequently, from
a couple of weeks to a couple of months,
with a preference to the shorter
timescale.
Decentralized Management
Agile Principles
8. PROPRIETARY AND CONFIDENTIAL
Think Bounded Context
8
Avoid Data Modeling First Approaches
• Usually starts with a set of stories or
specs
• Identifies things like nouns and verbs
• Creates data models for nouns with
the actions as properties/methods
• Works from data model to
define technical requirements such as
schema, backend queries, DTOs, etc
9. PROPRIETARY AND CONFIDENTIAL
Think Bounded Context
9
Avoid Data Modeling First Approaches
• Code becomes increasingly
coupled and intertwined
• Riskier deployments
• Challenges to scaling teams and
codebase
• Managing the complexity
becomes very difficult
12. PROPRIETARY AND CONFIDENTIAL
Product First
• Ubiquitous Language – common language used by the domain experts, product owners,
developers, etc to discuss the domain in terms of design.
• Bounded Context - "delimits the applicability of a particular model so that team members
have a clear and shared understanding of what has to be consistent and how it relates
to other contexts."
12
Domain Driven Design
13. PROPRIETARY AND CONFIDENTIAL
Product First
• Work with product owners, domain experts,
engineers, subject matter experts, etc to develop a
ubiquitous language
• Listen for how systems are described to get insight
into that language and bounded contexts
• Any bounded context is a candidate for a
microservice
• Bounded contexts can be divided into sub-domains
in which case there may be multiple microservices.
13
Domain Driven Design
14. PROPRIETARY AND CONFIDENTIAL
Product First
• Process discovery exercise that is designed
help discuss the flows, constraints, rules,
gaps, etc in a feature or business model.
• Best done with product owners, domain
experts, engineers, subject matter experts,
etc.
• You can use sticky notes and a wall to help
the group illustrate the domain model that is
being discussed
14
Event Storming
15. PROPRIETARY AND CONFIDENTIAL
Product First
•"As an online-store visitor, I should be able to remove an item from my cart".
• When the request hits the backend, it sounds like the database should be
updated for the user's cart, is that correct?
• Once that happens, what else should take place?
• Ok, so I understand the analytics service should be notified, how does that
happen?
15
Event Storming Example
16. PROPRIETARY AND CONFIDENTIAL
Product First
• Do we have the endpoint, request, and expected response for the request to
the analytics service?
• Ok, what else needs to happen? ( well, there's also a limit on what
items can be removed from a cart )
• So, we need to check the item that is going to be deleted, how do we know it
can be removed?
16
Event Storming Example
18. PROPRIETARY AND CONFIDENTIAL
Make Friends with Conway
"organizations which design systems ... are constrained to produce
designs which are copies of the communication structures of these
organizations."
- Melvin Conway
18
19. When teams are divided up by
discipline, Conway's law is far more
likely to work against you.
Make Friends with Conway
• Backend team takes too long to
respond to changes so the
frontend team compensates by
building complexity in the
frontend application.
• A database team implements a
host of sql functions to manage
CRUD operations for an
application so that the backend
team can just focus on the
application ( Etsy and
Sprouter, 2007)
19
20. PROPRIETARY AND CONFIDENTIAL
Make Friends with Conway
20
Working With You
• Teams will become more product/feature
focused than technology focused
• Composing a team of both backend and
database engineers would enable the two
disciplines to work together instead of
compensating for a lack of communication
• Cross-functional teams are positioned to
reduce waste by amplifying
communication, decreasing re-work, and less
idle time waiting.