Blithe Rocher OSCON
May 18, 2016
`
MICROSERVICES WAR STORIES
WHY ARE MICROSERVICES
SO POPULAR?
INDEPENDENT DEPLOYMENT & SCALABILITY
1REASON
COMPARTMENTALIZE TEAMS & RESPONSIBILITIES
2REASON
TECHNICAL DESIGN FREEDOM
3REASON
FAULT TOLERANCE
4REASON
MAKING MISTAKES & LEARNING FROM THEM
Experience
SUPPORTING NEW CONTENT TYPE
1STORY
Story
STORY: Supporting New Content Type
STORY: Supporting New Content Type
STORY: Supporting New Content Type
CONTENT-TYPE: TEXT/HTML
☹
STORY: Supporting New Content Type
STORY: Supporting New Content Type
STORY: Supporting New Content Type
STORY: Supporting New Content Type
PROBLEM?
STORY: Supporting New Content Type
REMEDIES
REMOVING A FEATURE FLAG
2STORY
Story
UI Authorization Service
STORY: Removing Feature Flags
DELETING CODEYay!
STORY: Removing Feature Flags
PROBLEM?
STORY: Removing Feature Flags
REMEDIES
STORY: Removing Feature Flags
TIGHTLY COUPLED SERVICES
3STORY
Story
STORY: Tightly Coupled Services
Microservice
A
Database
Microservice
B
STORY: Tightly Coupled Services
ALL THE WAY DOWNHeadaches
STORY: Tightly Coupled Services
PRODUCTION
STORY: Tightly Coupled Services
Microservice
A
Database
Microservice
B
STORY: Tightly Coupled Services
Microservice
A
Database
Microservice
B
STORY: Tightly Coupled Services
Microservice
A
Database
Microservice
B
STORY: Tightly Coupled Services
DEVELOPMENT
STORY: Tightly Coupled Services
SERVICES NOT ISOLATED, ALL NEED TO BE RUNNING
STORY: Tightly Coupled Services
Microservice
A
Database
Microservice
B
STORY: Tightly Coupled Services
AUTOMATED TESTING
STORY: Tightly Coupled Services
Microservice
A
Database
Microservice
B
STORY: Tightly Coupled Services
VCR RECORDINGSolution?
STORY: Tightly Coupled Services
API Responses - 1992
STORY: Tightly Coupled Services
VCR GEM
STORY: Tightly Coupled Services
STORY: Tightly Coupled Services
PROBLEM?
STORY: Tightly Coupled Services
REMEDIES
STORY: Tightly Coupled Services
STORY: Tightly Coupled Services
STORY: Tightly Coupled Services
BUNDLE EXEC RAKE TEST:REAL
STORY: Tightly Coupled Services
BUNDLE EXEC RAKE TEST:MOCK
STRING VS INTEGER
4STORY
Story
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
ONE ENDPOINT TO RULE THEM ALL
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
STORY: String vs. Integer
PROBLEM?
STORY: String vs. Integer
REMEDIES
STORY: String vs. Integer
SUMMARY & TAKE AWAYS
THANKS!Questions?
@Blithe