Moving Forwards with Microservices
The brownfield microservices approach, migration strategies, and modularization techniques for existing systems. Learn how to identify bounded contexts, separate domains, and incrementally convert monolithic systems to microservices.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Module Overview Brownfield Microservices Greenfield Microservices Microservices Provisos
Brownfield Microservices Approach | Migration | Database Migration | Transactions | Reporting
Brownfield Microservices:Approach Existing system Monolithic system Organically grown Seems to large to split Shopping website Lacks microservices design principles Identify seams Separation that reflects domains Data Access Database Service Business Customer Identify bounded contexts Start modularising the bounded contexts Internal Support website Move code incrementally Tidy up a section per release Take your time Existing functionality needs to remain intact Run unit tests and integration tests to validate change Internet Keep reviewing Seams are future microservice boundaries
Brownfield Microservices:Approach Existing system Monolithic system Organically grown Accounts Service Seems to large to split Lacks microservices design principles AccountsDepartment Identify seams Separation that reflects domains Orders Service Identify bounded contexts OrdersDepartment Start modularising the bounded contexts Move code incrementally Tidy up a section per release Products Service Take your time StockDepartment Existing functionality needs to remain intact Run unit tests and integration tests to validate change Keep reviewing Seams are future microservice boundaries
Brownfield Microservices:Migration Code is organised into bounded contexts Code related to a business domain or function is in one place Clear boundaries with clear interfaces between each Convert bounded contextsinto microservices Accounts Start off with one Shopping website Use to get comfortable Orders Make it switchable Maintain two versions of the code Data Access How to prioritise what to split? Service Promotions Database Customer By risk By technology Inventory By dependencies Internal Support website Incremental approach Products Integrating with the monolithic Monitor both for impact Monitor operations that talk to microservices Internet Review and improve infrastructure Incrementally the monolithic will be converted
Brownfield Microservices:Migration Code is organised into bounded contexts Code related to a business domain or function is in one place Message Broker Accounts Service Central Monitoring Clear boundaries with clear interfaces between each Convert bounded contextsinto microservices Start of with one Data Access Central Logging Use to get comfortable Accounts Accounts Make it switchable Shopping website Maintain two versions of the code Orders How to prioritise what to split? By risk Service Promotions Database Customer By technology Data Access By dependencies Inventory Internal Support website Incremental approach Integrating with the monolithic Products Monitor both for impact Monitor operations that talk to microservices Internet Review and improve infrastructure Incrementally the monolithic will be converted
Brownfield Microservices:Migration Code is organised into bounded contexts Central Monitoring Central Logging Code related to a business domain or function is in one place Clear boundaries with clear interfaces between each Convert bounded contextsinto microservices Accounts Service Start of with one Use to get comfortable Shopping website Promotions Service Make it switchable Maintain two versions of the code How to prioritise what to split? Orders Service By risk By technology By dependencies Internal Support website Inventory Service Incremental approach Customer Integrating with the monolithic Products Service Monitor both for impact Monitor operations that talk to microservices Review and improve infrastructure API Message Broker Internet Incrementally the monolithic will be converted Gateway
Brownfield Microservices: DatabaseMigration Avoid shared databases Message Broker Accounts Service Central Monitoring Split databases using seams Relate tables to code seams Supporting the existing application Data Access Central Logging Accounts Accounts Data layerthat connects to multiple database Tables that link across seams Orders API calls that can fetch that data for a relationship Refactordatabase into multiple databases Service Promotions Database Data referential integrity Data Access Static data tables Inventory Shared data Products
Brownfield Microservices: DatabaseMigration Avoid shared databases Central Monitoring Central Logging Split databases using seams Relate tables to code seams Accounts Service Supporting the existing application Shopping website Data layerthat connects to multiple database Promotions Service Tables that link across seams API calls that can fetch that data for a relationship Orders Service Refactordatabase into multiple databases Internal Support website Data referential integrity Inventory Service Customer Static data tables Products Service Shared data API Message Broker Internet Gateway
Brownfield Microservices:Transactions Transactions ensure data integrity 3 Transactions are simple in monolithic applications Accounts Service Transactions spanning microservices are complex Shopping website Complex to observe 2 Promotions Service Complex to problem solve Complex to rollback Options for failed transactions Transaction Manager Try again later Abort entire transaction PlaceOrder 1 Use a transaction manager Internal Support website Orders Service Two phase commit Disadvantage of transaction manager Client Reliance on transaction manager 4 Products Service Delay in processing Potential bottleneck Complex to implement Message Broker API Internet Gateway Distributed transaction compatibility Completed message for the monolith
Brownfield Microservices:Transactions Transactions ensure data integrity Message Broker Accounts Service Central Monitoring Transactions are simple in monolithic applications Transactions spanning microservices are complex Complex to observe Complex to problem solve Data Access Central Logging Accounts Accounts Complex to rollback Options for failed transactions Try again later Orders Abort entire transaction Use a transaction manager Service Promotions Two phase commit Database Disadvantage of transaction manager Data Access Reliance on transaction manager Inventory Delay in processing Potential bottleneck Complex to implement Products Distributed transaction compatibility Completed message for the monolith
Brownfield Microservices:Reporting Microservices complicate reporting Data split across microservices Accounts Service Orders Service Products Service No central database Joining data across databases Slowerreporting Complicate report development Possible solutions Report Service calls for report data Data dumps Consolidation environment
Brownfield Microservices:Reporting Microservices complicate reporting Data split across microservices Accounts Service Orders Service Products Service No central database Joining data across databases Slowerreporting Complicate report development Reporting Service Possible solutions Service calls for report data Report Data dumps Consolidation environment
Brownfield Microservices:Reporting Microservices complicate reporting Data split across microservices Accounts Service Orders Service Products Service No central database Joining data across databases Slowerreporting Reporting Database Complicate report development Possible solutions Reporting Service Service calls for report data Data dumps Report Consolidation environment
Greenfield Microservices Introduction | Approach
Greenfield Microservices:Introduction New project Evolving requirements Domain Experts Business domain Not fully understood Getting domain experts involved System boundaries will evolve Teams experience New System First microservice Experienced with microservices Existing system integration Monolithic system Established microservices architecture Push for change Changes to apply microservice principles DevTeam
Greenfield Microservices:Approach Start off with monolithic design High level Accounts Evolving seams Develop areas into modules Boundaries startto become clearer Orders Refine and refactor design Split further when required Promotions Modules become services Shareable code libraries promote to service Inventory Review microservice principles at each stage Products Prioritise by Minimal viable product Customer needs and demand
Microservices Provisos Accepting initial expense Longer development times Improved Inrastructure Skillingup Staff Cost and training for tools and new skills Skilling up for distributed systems Accounts Service Handling distributed transactions Handling reporting Postage Service Additional testing resource Longer development time Culture change Latency and performance testing Testing for resilience Orders Service Improving infrastructure Security Stock Service Performance Reliance Overhead to mange microservices Products Service Cloud technologies Culture change Tools to testand manage Continued monitoring andlogging
Module Summary Brownfield Microservices Greenfield Microservices Microservices Provisos