AVOIDING SPEED BUMPS ON THE ROAD TO MICROSERVICES
Scott Shaw Head of Technology, ThoughtWorks Australia
1
AVOIDING SPEED BUMPS ON THE ROAD TO MICROSERVICES Scott Shaw - - PowerPoint PPT Presentation
AVOIDING SPEED BUMPS ON THE ROAD TO MICROSERVICES Scott Shaw Head of Technology, ThoughtWorks Australia 1 MICROSERVICE ENVY GOOGLE TRENDS DATA service oriented architecture microservices 2 THE SPEED BUMPS X 3 THE SPEED BUMPS X
Scott Shaw Head of Technology, ThoughtWorks Australia
1MICROSERVICE ENVY
2service oriented architecture microservices GOOGLE TRENDS DATA
X THE SPEED BUMPS
X THE SPEED BUMPS
DDD REST Automation Cloud DevOps Logging Monitoring Resilience Testing with CDCs Conway Postel
X
THE SPEED BUMPS
DDD REST Automation Cloud DevOps Logging Monitoring Resilience Testing with CDCs Conway Postel
X
THE SPEED BUMPS
DDD REST Automation Cloud DevOps Logging Monitoring Resilience Testing with CDCs Conway Postel
X
THE SPEED BUMPS
DDD REST Automation Cloud DevOps Logging Monitoring Resilience Testing with CDCs Conway Postel
SINGLE DATASTORE PRINCIPAL
5SINGLE DATASTORE PRINCIPAL
5SINGLE DATASTORE PRINCIPAL
5BUT AS A SYSTEM EVOLVES…
BUT AS A SYSTEM EVOLVES…
BUT AS A SYSTEM EVOLVES…
BUT AS A SYSTEM EVOLVES…
BUT AS A SYSTEM EVOLVES…
BUT AS A SYSTEM EVOLVES…
BUT AS A SYSTEM EVOLVES…
JIA YANG’S STORY
8JIA YANG’S STORY
8SIDEBAR: SERVICE COMPOSITION
9Customers in the EC tax regime
JOIN
Tax Regime Service
THE MONOLITHIC APPROACH
SIDEBAR: SERVICE COMPOSITION
10NAIVE SERVICE IMPLEMENTATION
geography customers tax
Countries in the EC Customers in the EC
Countries in the EC
SIDEBAR: SERVICE COMPOSITION
COMPOSED SERVICES
geography customers tax
Customers in the EC GET … ?country_list=UK,NL,SE...
GET Countries in the EC
SIDEBAR: SERVICE COMPOSITION
COMPOSED SERVICES
geography customers tax
Customers in the EC GET … ?filter=https://geo/countries?r=ec
Customers in the EC Countries in the EC
AGGREGATING DATA
12geography customers tax
Customers in the EC Countries in the EC
AGGREGATING DATA
12geography customers tax
How do we know if these states are consistent?
AGGREGATING DATA
12geography customers tax
How do we know if these states are consistent?
Events to rescue!
Reacts to event streams Changes in customer status Changes in EC Membership
AGGREGATING DATA
13geography customers tax
AGGREGATING DATA
13geography customers tax
GET https://integration-toolkit.com/customers/events
AGGREGATING DATA
13geography customers tax
GET https://integration-toolkit.com/customers/events
IMPLEMENTING EVENTS
14OPTION 1: CHUCK ‘EM IN THE DB
IMPLEMENTING EVENTS
15OPTION 2: HIPSTER BATCH Shared Storage (S3)
Geography Customer Tax
IMPLEMENTING EVENTS
16OPTION 3: SPECIAL-PURPOSE EVENT STORE
Event Store JS
Customers Geography
Event Subscription
IMPLEMENTING EVENTS
16OPTION 3: SPECIAL-PURPOSE EVENT STORE
Event Store JS
Customers Geography
Event Subscription “Projections”
DELEGATED ACCESS MANAGEMENT
18HMAC
SAML v2
OpenID Connect
ADFS
JWT
DELEGATED ACCESS MANAGEMENT
18HMAC
SAML v2
OpenID Connect
ADFS
JWT
FENDY’S STORY
19FENDY’S STORY
19THE OLD WORLD OF PERIMETER SECURITY
20cookie
token credentials token verification
Identity Provider End User Application Web Application
THE OLD WORLD OF PERIMETER SECURITY
20cookie
token credentials token verification
Identity Provider End User Application Web Application
stateless?
THE OLD WORLD OF PERIMETER SECURITY
20cookie
token credentials token verification
Identity Provider End User Application Web Application
stateless?
whose identity?
THE OLD WORLD OF PERIMETER SECURITY
20cookie
token credentials token verification
Identity Provider End User Application Web Application
token token
VARIOUS APPROACHES
VARIOUS APPROACHES
Ask these questions ...
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
strategy?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
strategy?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
strategy?
VARIOUS APPROACHES
Ask these questions ...
and authorisation?
strategy?
EXAMPLE OPENID CONNECT FLOW
22access code
OpenID Connect Provider Resource
access code
Another Resource
id token
{“iss":"op.example.com", "c_hash":"HK6E_P6Dh8Y93mRNtsDB1Q", "email_verified":"true", "sub":"10769150350006150715113082367", “azp”:”another_resource", “email":"sshaw@thoughtworks.com", “aud”:[”resource”, “another_resource”], "iat":1353601026, "exp":1353604926 }
access code id token
Resource Another Resource End User App
BEWARE PKI
23ssshh! secrets How to manage and distribute? keys
Also Need
MANAGING CHANGE
25DOES YOUR SYSTEM LOOK LIKE THIS?
MANAGING CHANGE
26MAYBE IT SHOULD LOOK LIKE THIS INSTEAD
MANAGING CHANGE
26MAYBE IT SHOULD LOOK LIKE THIS INSTEAD
JUICE!
RYAN’S STORY
27RYAN’S STORY
27BACK TO THE TAX EXAMPLE …
28geography customers tax
BACK TO THE TAX EXAMPLE …
28geography customers
tax
BACK TO THE TAX EXAMPLE …
28geography customers
tax
BACK TO THE TAX EXAMPLE …
28geography customers
tax
Assignment
BACK TO THE TAX EXAMPLE …
28geography customers
tax
Assignment Some logic from here Some logic from here And from here
BACK TO THE TAX EXAMPLE …
28geography customers
tax
Assignment Some logic from here Some logic from here And from here
But How?
HOW TO MANAGE THE CHANGE
291.DO NOTHING May be better than the chaos of not having clear ownership and accountability 2.ONE BIG VERSION CHANGE Version all your services, test them together, release them together
HOW TO MANAGE THE CHANGE
291.DO NOTHING May be better than the chaos of not having clear ownership and accountability 2.ONE BIG VERSION CHANGE Version all your services, test them together, release them together
MANAGING CHANGE
30geo cust tax assignment
MANAGING CHANGE
30geo cust tax assignment
Temp Team
MANAGING CHANGE
31geo cust tax assignment
MANAGING CHANGE
31geo cust tax assignment
Long-term ownership can’t be ambiguous
SUMMARY
321.MICROSERVICES More than a grab-bag of techniques and tools 2.MINDSET SHIFT State Perimeter Punctuated equilibrium Events Endpoints Continuous evolution
SUMMARY
321.MICROSERVICES More than a grab-bag of techniques and tools 2.MINDSET SHIFT State Perimeter Punctuated equilibrium Events Endpoints Continuous evolution
SUMMARY
321.MICROSERVICES More than a grab-bag of techniques and tools 2.MINDSET SHIFT State Perimeter Punctuated equilibrium Events Endpoints Continuous evolution
SUMMARY
321.MICROSERVICES More than a grab-bag of techniques and tools 2.MINDSET SHIFT State Perimeter Punctuated equilibrium Events Endpoints Continuous evolution
http://www.thoughtworks.com/radar sshaw@thoughtworks.com @scottwshaw