I prepare this slides in 2016, my plan was to show it for internal use. But it never happens since I already resign. :) So I posted here just for my references, some slides maybe outdated. Thanks.
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
How to move from Monolith to Microservice
1. Prepared by @saflimbenly -2016Prepared by @saflimbenly -2016
Monolith to
Microservices
How to implement Application Modernization in 2016
2. Prepared by @saflimbenly -2016
Monolith
● Simple to test
● Simple to deploy
● Scale by multiple copies
● ACID (Atomicity,
Consistency, Isolation,
Durability)
● Complex
● Slow down development
● Scale problem
● Reliability (memory leak, db
lock)
● Hiring
3. Prepared by @saflimbenly -2016
Microservices
Split the application into smaller and
interconnected services.
● Develop, Deploy, Scale Independently
● Domain-driven Design (Core / Process Service)
● Event-driven Data Management
● DB schema per service (loose coupling)
● Inter-process Communication (RPC, message
Driven API)
● Determine the service size (How big is 1 service?)
● Distributed system (what IPC has to be used?)
● Partitioned DB architecture (ERD of the application)
● Testing, Deploy, Manage
● Change multiple Service (complex business
process)
5. Prepared by @saflimbenly -2016
Microservices Principle
● Each Microservices Has Its Own Build
● Business Logic is Stateless
● Data Layer is Cached
● Separate Data Source
● Independently Deployable
● Fully Contained
6. Prepared by @saflimbenly -2016
Microservices Best Practice
● Design for Automation
(Continuous Delivery)
● Design for Failure
○ Service load balancing
○ Automation scaling
○ Retry on failure
○ Circuit breaker
○ Bulkhead
○ Timeouts
● Design for Data Separation
● Design for Integrity
○ Transaction
○ Read-Write
○ Event-driven Design
○ Transaction IDs
● Design for Performance
○ Load test
○ Technology
○ API Gateway & LB
○ Cache
8. Prepared by @saflimbenly -2016
Strategy 1 - Stop Digging
● The Law of Holes
● Anti-corruption Layer
● Domain-Driven Design
9. Prepared by @saflimbenly -2016
Strategy 2 - Split Frontend and Backend
● Presentation Layer
● Business Logic Layer
● Data-Access Layer
● Using latest technology without
hurting current stack
● Only provide API call from
Backend
10. Prepared by @saflimbenly -2016
Strategy 3 - Extract Services
● Prioritize which
module to convert
● Paying “technical
debt” one service at
the time.
Step 1
12. Prepared by @saflimbenly -2016
Architecture Overview
● One Service One Data Source
● Implement DDD
● Using CQRS / Event Sourcing
pattern
● Each service component can be
one containers
● API Gateway handle : request
routing, composition, service
discovery.
13. Prepared by @saflimbenly -2016
How We Are Going To Do It
● Agile Scrum/Kanban
● Team can be change on each sprint/project.
● Every member can have a chance to involve in this
process, depends on knowledge they have in particular
module.
14. Prepared by @saflimbenly -2016
API Gateway (In Progress)
- Request routing
- Composition
- Protocol Transaction
- Not “One-Size-Fit-All” but “One-Call-Serve-
All”
- Service Invocation
- Service Discovery
- Mismatch
- Different protocols
- Refactor
15. Prepared by @saflimbenly -2016
Event-driven Data Management (In Progress)
- NoSQL
- ElasticSearch
- Neo4j
- Geo-location
Preserve Atomicity
- Publishing Event using Local Transaction
- Mining a Database Transaction Log
- Event Sourcing
- Implement business transaction that
maintain consistency across multiple
services
- Implement query to retrieve data from
multiple services
16. Prepared by @saflimbenly -2016
Cross-cutting Concerns (In Progress)
● Security
● Logging
● Health Checks
● Integration Testing