6/14/2018
1
MICHELE LEROUX BUSTAMANTE
CIO, Cloud / Security Architect
Solliance.net
@michelebusta
Message-Based
Microservices
Architectures –
driven by Docker
Backend Web APIs
Browser
Java
Script
Server Pages BFF APIs
Backend
Processing
Mobile
Apps
Mobile APIs Partner APIsShared APIs
Partner Apps
API Gateway
Data
6/14/2018
2
It’s already complicated
Backend Web APIs
Browser
Java
Script
Server Pages BFF APIs
Backend
Processing
Mobile
Apps
Mobile APIs Partner APIsShared APIs
Partner Apps
API Gateway
6/14/2018
3
Backend Web APIs
Browser
Java
Script
Server Pages BFF APIs
Backend
Processing
Mobile
Apps
Mobile APIs Partner APIsShared APIs
Partner Apps
API Gateway
6/14/2018
4
Backend Web APIs
Browser
Java
Script
Server Pages BFF APIs
Backend
Processing
Mobile
Apps
Mobile APIs Partner APIsShared APIs
Partner Apps
API Gateway
Another release?
6/14/2018
5
Backend Web APIs
Browser
Java
Script
Server Pages BFF APIs
Backend
Processing
Mobile
Apps
Mobile APIs Partner APIsShared APIs
Partner Apps
API Gateway
6/14/2018
6
Distributed Data…
not a new problem…
Enterprise Architect view of SOA
Business
Data
BusinessBusiness
DataData
Services ServicesServices
Data
Access
Data
Access
Data
Access
CRM CMSERP
6/14/2018
7
Business
Data
BusinessBusiness
DataData
Services ServicesServices
Data
Access
Data
Access
Data
Access
CRM CMSERP Integration
Enterprise Architect view of SOA
Data Sync
Your interface
sucks!
From Big SOA ... to Little SOA
Business
Data
BusinessBusiness
DataData
Service ServiceService
Business
Data
BusinessBusiness
DataData
Service ServiceService
Integration Application
Data
Access
Data
Access
Data
Access
Data
Access
Data
Access
Data
Access
This!
6/14/2018
8
Business
Data
BusinessBusiness
DataData
Service ServiceService
Client
Data
Access
Data
Access
Data
Access
Data
Service
Data
Service
Data
Service
Enter…Data Services
Also, this!
Business
Data
BusinessBusiness
DataData
Service ServiceService
Client
Data
Access
Data
Access
Data
Access
Data
Service
Data
Service
Data
Service
Enter…Data Services
Also, this!
Data DataData
Data
Access
Data
Access
Data
Access
6/14/2018
9
Solving distributed data issue
• 2 Phase Commit (2PC)
• Compensating operations
• Eventual consistency
• Other...
Embrace eventual consistency
6/14/2018
10
Data DataData
Service ServiceService
Client
eventually consistent views
Microservices And Eventual Consistency
Data DataData
Service ServiceService
Client
Aggregate
Data
Reporting
Service
Reporting
Client
projecting to aggregate store
Microservices And Eventual Consistency
6/14/2018
11
Design without data constraints
Identifying Business Domains
Customer
Management
Product
Catalogue
Shopping
Cart
Recommendations
Supply Chain
Management
Order
Fulfillment
Identity
Management
Payment
Identity
Management
6/14/2018
12
Identity Management Domain
User
Self-Service
User
Management
User
Single Sign-On
User
Permissions
Login
Security protocols
…
Create users
Activate / deactivate users
…
Register account
Forgot password
…
Permissions per app
…
User
Permissions
User
Profile
Profile, accounts
…
Identity Management Domain
User
Self-Service
User
Management
User
Single Sign-On
User
Permissions
Login
Security protocols
…
Create users
Activate / deactivate users
…
Register account
Forgot password
…
Permissions per app
…
User
Permissions
User
Profile
Profile, accounts
…
Users
Profile
Permissions
6/14/2018
13
Identity Management Domain
User
Self-Service
User
Management
User
Single Sign-On
User
Permissions
Login
Security protocols
…
Create users
Activate / deactivate users
…
Register account
Forgot password
…
Permissions per app
…
User
Permissions
User
Profile
Profile, accounts
…
Users
Profile
Permissions
IdentityServer
Web
Config API User API
UsersConfig
User
Management
Web
Config
Web
User
Self-Service
Web
Shared Services
6/14/2018
14
IdentityServer
Web
Config API User API
UsersConfig
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Shared Aggregates
Config
Runtime
API
User
Runtime
API
UsersConfig
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Isolated Services / Data
Config
Runtime
API
User
Runtime
API
UsersConfigConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
6/14/2018
15
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Isolated Services / Data
Config
Runtime
API
User
Runtime
API
UsersConfigConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
OPTIMIZED
READS
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Isolated Services / Data
Config
Runtime
API
User
Runtime
API
UsersConfigConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
INTERNAL
CONFIG
CONTROLS
MULTI
TENANT
CUSTOMER
ASKS
SIMPLICITY
AND
REDUCED
SUPPORT
6/14/2018
16
Achievement unlocked…
every service owns its data
Now what?
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Eventual consistency
Config
Runtime
API
User
Runtime
API
Users DB
Config
DBConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
Add App
Remove App
Register
Confirm Email
6/14/2018
17
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Eventual consistency
Config
Runtime
API
User
Runtime
API
Users DB
Config
DBConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
Deactivate User
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Eventual consistency
Config
Runtime
API
User
Runtime
API
Users DB
Config
DBConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
User Locked Out
6/14/2018
18
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Message based solution
Config
Runtime
API
User
Runtime
API
Users DB
Config
DBConfig
Config
Runtime
User
Runtime Users
User
Self-
Service
IdentityServer
Web
User
Management
Web
Config
Web
User
Self-Service
Web
Config
Management
API
User
Management
API
User
Self-Service
API
Message based solution
Config
Runtime
API
User
Runtime
API
Topics
6/14/2018
19
Projecting data
Config
Runtime
API
Config
Management
API
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector
Config
DB
Config Config
Runtime
User
Runtime
Users
User
Self-
Service
Projecting data
Config
Runtime
API
Config
Management
API
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector
Config
Config
Runtime
User
Runtime
Users
User
Self-
Service
AppAdded
AppRemoved
6/14/2018
20
Projecting data
Config
Runtime
API
Config
Management
API
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector
Config
Runtime
User
Runtime
Users
User
Self-
Service
AppAdded
AppRemoved
UserRegistered
Users
User
Self-
Service
Projecting data
Config
Runtime
API
Config
Management
API
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector
Config
Runtime
User
Runtime
Users
User
Self-
Service
AppAdded
AppRemoved
UserRegistered
Users
User
Self-
Service
EmailConfirmed
PasswordSet
UserActivated
User
Runtime
6/14/2018
21
Projecting data
Config
Runtime
API
Config
Management
API
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector
Config
Runtime
User
Runtime
Users
User
Self-
Service
AppAdded
AppRemoved
UserRegistered
Users
EmailConfirmed
PasswordSet
UserActivated
Locked Out Deactivate User
User
Runtime
History / Audit
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector Projector
Config
DB
Audit History
User
Runtime
Users
User
Self-
Service
6/14/2018
22
From design, to technology stack
Cloud Technology Stack
Web AppsWeb AppsWeb Apps
Web AppsWeb AppsWeb APIs
docker stack deploy
Data
Protection
Caching Logging Messaging Data
Docker
Enterprise
Edition
6/14/2018
23
Local Technology Stack
PG Admin
Postgre
SQL
KafkaELKRedisWeb AppsWeb AppsWeb Apps
Web AppsWeb AppsWeb APIs
Source
Source
Source
docker-compose up
Data
Protection
Caching Logging Messaging Data
Containers
DEMO
6/14/2018
24
Manageability
User
Runtime
API
User
Management
API
User
Self-Service
API
Topics
Projector Projector Projector Projector Projector
Config
DB
Audit History
User
Runtime
Users
User
Self-
Service
API
Messages
Topic
Projector
Data
API
Messages
Topic
Projector
Data
API
Messages
Topic
Projector
Data
Projector
Data
Projector
Data
Topic Topic
Is this a lot of work?
6/14/2018
25

Message based microservices architectures driven with docker