This document discusses strategies for migrating a monolithic application to microservices. It begins with an overview of decomposing a monolith and implementing new features as microservices. It then provides an example of extracting the delivery module from a monolithic food delivery application into its own delivery microservice. The example outlines the steps of splitting the code, extracting the relevant database tables, defining and deploying the new delivery service, integrating it with the monolith, and removing the old code. Finally, it discusses implementing a delayed delivery service as another example.
Decompose your monolith: strategies for migrating to microservices (Tide)Chris Richardson
This is a presentation that I gave at Tide.co, London - January 2020
A typical mission-critical enterprise application is a large, complex monolith developed by large team. Software delivery is usually slow, and the team struggles to keep up with the demands of the business. Consequently, many enterprise applications are good candidates to be migrated to the microservice architecture. But how do you know whether it makes sense to migrate to microservices? And, how to get there? In this presentation, I describe when you should consider migrating to microservices. You will learn strategies for migrating a monolith application to a microservice architecture. I explain how to implement new functionality as services. You will learn how to incrementally break apart a monolith one service at a time.
A pattern language for microservices - June 2021 Chris Richardson
The microservice architecture is growing in popularity. It is an architectural style that structures an application as a set of loosely coupled services that are organized around business capabilities. Its goal is to enable the continuous delivery of large, complex applications. However, the microservice architecture is not a silver bullet and it has some significant drawbacks.
The goal of the microservices pattern language is to enable software developers to apply the microservice architecture effectively. It is a collection of patterns that solve architecture, design, development and operational problems. In this talk, I’ll provide an overview of the microservice architecture and describe the motivations for the pattern language. You will learn about the key patterns in the pattern language.
Developing applications with a microservice architecture (SVforum, microservi...Chris Richardson
Here is the version of my microservices talk that that I gave on September 17th at the SVforum Cloud SIG/Microservices meetup.
To learn more see http://microservices.io and http://plainoldobjects.com
Airbnb, From Monolith to Microservices: How to Scale Your Architecture, Futur...New Relic
Hear from Melanie Cebula, Software Engineer at Airbnb, on how they utilize microservices to scale their architecture at FutureStack17 NYC.
See the video here: https://youtu.be/N1BWMW9NEQc
Be sure to subscribe and follow New Relic at:
https://twitter.com/NewRelic
https://www.facebook.com/NewRelic
https://www.youtube.com/NewRelicInc
A common microservice architecture anti-pattern is more the merrier. It occurs when an organization team builds an excessively fine-grained architecture, e.g. one service-per-developer. In this talk, you will learn about the criteria that you should consider when deciding service granularity. I'll discuss the downsides of a fine-grained microservice architecture. You will learn how sometimes the solution to a design problem is simply a JAR file.
Decompose your monolith: strategies for migrating to microservices (Tide)Chris Richardson
This is a presentation that I gave at Tide.co, London - January 2020
A typical mission-critical enterprise application is a large, complex monolith developed by large team. Software delivery is usually slow, and the team struggles to keep up with the demands of the business. Consequently, many enterprise applications are good candidates to be migrated to the microservice architecture. But how do you know whether it makes sense to migrate to microservices? And, how to get there? In this presentation, I describe when you should consider migrating to microservices. You will learn strategies for migrating a monolith application to a microservice architecture. I explain how to implement new functionality as services. You will learn how to incrementally break apart a monolith one service at a time.
A pattern language for microservices - June 2021 Chris Richardson
The microservice architecture is growing in popularity. It is an architectural style that structures an application as a set of loosely coupled services that are organized around business capabilities. Its goal is to enable the continuous delivery of large, complex applications. However, the microservice architecture is not a silver bullet and it has some significant drawbacks.
The goal of the microservices pattern language is to enable software developers to apply the microservice architecture effectively. It is a collection of patterns that solve architecture, design, development and operational problems. In this talk, I’ll provide an overview of the microservice architecture and describe the motivations for the pattern language. You will learn about the key patterns in the pattern language.
Developing applications with a microservice architecture (SVforum, microservi...Chris Richardson
Here is the version of my microservices talk that that I gave on September 17th at the SVforum Cloud SIG/Microservices meetup.
To learn more see http://microservices.io and http://plainoldobjects.com
Airbnb, From Monolith to Microservices: How to Scale Your Architecture, Futur...New Relic
Hear from Melanie Cebula, Software Engineer at Airbnb, on how they utilize microservices to scale their architecture at FutureStack17 NYC.
See the video here: https://youtu.be/N1BWMW9NEQc
Be sure to subscribe and follow New Relic at:
https://twitter.com/NewRelic
https://www.facebook.com/NewRelic
https://www.youtube.com/NewRelicInc
A common microservice architecture anti-pattern is more the merrier. It occurs when an organization team builds an excessively fine-grained architecture, e.g. one service-per-developer. In this talk, you will learn about the criteria that you should consider when deciding service granularity. I'll discuss the downsides of a fine-grained microservice architecture. You will learn how sometimes the solution to a design problem is simply a JAR file.
This slide deck explores the impact of MSA on API strategies and designs and the possible changes in API design and deployment, API security, control and monitoring, and CI/CD.
Watch recording: https://wso2.com/library/webinars/2018/09/apis-in-a-microservice-architecture
Decompose your monolith: Six principles for refactoring a monolith to microse...Chris Richardson
This was a talk I gave at the CTO virtual summit on July 28th. It describes 6 principles for refactoring to a microservice architecture.
1. Make the most of your monolith
2. Adopt microservices for the right reasons
3. Migrate incrementally
4. Begin with the end in mind
5. Migrate high-value modules first
6. Success is improved velocity and reliability
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailogjuljo
Full day workshop about Microservices Architectures, from the basis to advanced topics like Service Discovery, Load Balancing, Fault Tolerance and Centralized Logging.
Many technologies are involved, like Spring Cloud Netflix, Docker, Cloud Foundry and ELK.
A separate deck describes all the lab exercises.
SOA, service-oriented architectures, burst on the scene in the new millennium as the latest technology to support application growth. In concert with the Web, SOA ushered in new paradigms for structuring enterprise applications.
At the Forward Internet Group in London, we are implementing SOA in unusual ways. Rather than a few, businessrelated services being implemented per the original vision, we have developed systems made of myriads of very small, usually shortlived services.
In this workshop, we will start by exploring the evolution of SOA implementations by the speaker. In particular, lessons learned from each implementation will be discussed, and reapplication of these lessons on the next implementation. Challenges (and even failures) will be explicitly identified.
We will arrive at a model of the current systems: An environment of very small services that are loosely coupled into a complex system. We explore the demise of acceptance tests in this complex environment, and the clever replacement of business metrics in their stead.
Finally, we will conclude with the surprising programmer development process impacts of this architecture. Indeed, bedrock principles of Agile have been rendered unnecessary, something that equally surprised us. (Presented at Agile India 2013)
Irfan Baqui, Senior Engineer at LunchBadger, breaks down the important role of the API Gateway in Microservices. Additionally, Irfan covers how to get started with Express Gateway, an open source API Gateway built entirely on Express.js. Originally presented at the San Francisco Node Meetup.
Some problems with monolithic architecture, the microservice's best practices and their drawbacks. How build microservices? How to prepare your Operations teams for microservices?
The presentation from our online webinar "Design patterns for microservice architecture".
Full video from webinar available here: https://www.youtube.com/watch?v=826aAmG06KM
If you’re a CTO or a Lead Developer and you’re planning to design service-oriented architecture, it’s definitely a webinar tailored to your needs. Adrian Zmenda, our Lead Dev, will explain:
- when microservice architecture is a safe bet and what are some good alternatives
- what are the pros and cons of the most popular design patterns (API Gateway, Backend for Frontend and more)
- how to ensure that the communication between services is done right and what to do in case of connection issues
- why we’ve decided to use a monorepo (monolithic repository)
- what we’ve learned from using the remote procedure call framework gRPC
- how to monitor the efficiency of individual services and whole SOA-based systems.
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
The microservice architecture functionally decomposes an application into a set of services. Each service has its own private database that’s only accessible indirectly through the services API. Consequently, implementing queries and transactions that span multiple services is challenging.
In this presentation, you will learn how to solve these distributed data management challenges using asynchronous messaging. Chris will share with you how to implement transactions using sagas, which are sequences of local transactions. You will learn how to coordinate sagas using either events or command messages. Chris will also explore how to implement queries using Command Query Responsibility Segregation (CQRS), which uses events to maintain easily queried replicas.
Any team that has made the jump from building monoliths to building microservices knows the complexities you must overcome to build a system that is functional and maintainable. Building a microservice architecture that is low latency and only communicates using REST APIs is even more tricky, with high latency for requests being a common concern. This talk explains how you can use events as the backbone of your microservice architecture and build an efficient, event-driven system. It covers how to get started with designing your microservice architecture and the key requirements any system needs to fulfil. It also introduces the different patterns you will encounter in event-driven architectures and the advantages and disadvantages of these choices. Finally it explains why Apache Kafka is a great choice for event-driven microservices.
Dapr - A 10x Developer Framework for Any LanguageBilgin Ibryam
Explore the basics of the Dapr project and why it is a 10x developer tool that emerged at the right time, what concrete benefits it brings to developers, operations, and architects.
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...Chris Richardson
A typical mission-critical enterprise application is a large, complex monolith developed by a large team. Software delivery is usually slow, and the team struggles to keep up with the demands of the business. Consequently, many enterprise applications are good candidates to be migrated to the microservice architecture. But how do you know whether it makes sense to migrate to microservices and how to get there?
This session describes when you should consider migrating to microservices. You will learn strategies for migrating a monolith application to a microservice architecture. The presentation explains how to implement new functionality as services, and you will also learn how to incrementally break apart a monolith, one service at a time.
SVCC Microservices: Decomposing Applications for Testability and Deployability Chris Richardson
Successful applications have a habit of growing. What’s more, the rate of growth increases over time because the development team typically gets larger. Eventually, the application will become extremely large and the organization ends up in monolithic hell. All aspects of development, testing and deployment are slow and painful. It’s impossible for the developers to keep up with the demands of the business. And, to make matters worse the application uses a technology stack that is increasingly obsolete. The way to escape monolithic hell is to migrate to the microservice architecture.
In this talk, you will learn about the essential characteristics of microservices. I describe the benefits and drawbacks of the microservice architecture and when it makes sense to use it. You will learn about the design problems you will encounter when using microservices. I describe how to solve this problems by applying the microservices pattern language. You will learn how the microservice architecture accelerates the delivery of large, complex applications.
Given at Silicon Valley Code Camp 2018
This slide deck explores the impact of MSA on API strategies and designs and the possible changes in API design and deployment, API security, control and monitoring, and CI/CD.
Watch recording: https://wso2.com/library/webinars/2018/09/apis-in-a-microservice-architecture
Decompose your monolith: Six principles for refactoring a monolith to microse...Chris Richardson
This was a talk I gave at the CTO virtual summit on July 28th. It describes 6 principles for refactoring to a microservice architecture.
1. Make the most of your monolith
2. Adopt microservices for the right reasons
3. Migrate incrementally
4. Begin with the end in mind
5. Migrate high-value modules first
6. Success is improved velocity and reliability
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailogjuljo
Full day workshop about Microservices Architectures, from the basis to advanced topics like Service Discovery, Load Balancing, Fault Tolerance and Centralized Logging.
Many technologies are involved, like Spring Cloud Netflix, Docker, Cloud Foundry and ELK.
A separate deck describes all the lab exercises.
SOA, service-oriented architectures, burst on the scene in the new millennium as the latest technology to support application growth. In concert with the Web, SOA ushered in new paradigms for structuring enterprise applications.
At the Forward Internet Group in London, we are implementing SOA in unusual ways. Rather than a few, businessrelated services being implemented per the original vision, we have developed systems made of myriads of very small, usually shortlived services.
In this workshop, we will start by exploring the evolution of SOA implementations by the speaker. In particular, lessons learned from each implementation will be discussed, and reapplication of these lessons on the next implementation. Challenges (and even failures) will be explicitly identified.
We will arrive at a model of the current systems: An environment of very small services that are loosely coupled into a complex system. We explore the demise of acceptance tests in this complex environment, and the clever replacement of business metrics in their stead.
Finally, we will conclude with the surprising programmer development process impacts of this architecture. Indeed, bedrock principles of Agile have been rendered unnecessary, something that equally surprised us. (Presented at Agile India 2013)
Irfan Baqui, Senior Engineer at LunchBadger, breaks down the important role of the API Gateway in Microservices. Additionally, Irfan covers how to get started with Express Gateway, an open source API Gateway built entirely on Express.js. Originally presented at the San Francisco Node Meetup.
Some problems with monolithic architecture, the microservice's best practices and their drawbacks. How build microservices? How to prepare your Operations teams for microservices?
The presentation from our online webinar "Design patterns for microservice architecture".
Full video from webinar available here: https://www.youtube.com/watch?v=826aAmG06KM
If you’re a CTO or a Lead Developer and you’re planning to design service-oriented architecture, it’s definitely a webinar tailored to your needs. Adrian Zmenda, our Lead Dev, will explain:
- when microservice architecture is a safe bet and what are some good alternatives
- what are the pros and cons of the most popular design patterns (API Gateway, Backend for Frontend and more)
- how to ensure that the communication between services is done right and what to do in case of connection issues
- why we’ve decided to use a monorepo (monolithic repository)
- what we’ve learned from using the remote procedure call framework gRPC
- how to monitor the efficiency of individual services and whole SOA-based systems.
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
The microservice architecture functionally decomposes an application into a set of services. Each service has its own private database that’s only accessible indirectly through the services API. Consequently, implementing queries and transactions that span multiple services is challenging.
In this presentation, you will learn how to solve these distributed data management challenges using asynchronous messaging. Chris will share with you how to implement transactions using sagas, which are sequences of local transactions. You will learn how to coordinate sagas using either events or command messages. Chris will also explore how to implement queries using Command Query Responsibility Segregation (CQRS), which uses events to maintain easily queried replicas.
Any team that has made the jump from building monoliths to building microservices knows the complexities you must overcome to build a system that is functional and maintainable. Building a microservice architecture that is low latency and only communicates using REST APIs is even more tricky, with high latency for requests being a common concern. This talk explains how you can use events as the backbone of your microservice architecture and build an efficient, event-driven system. It covers how to get started with designing your microservice architecture and the key requirements any system needs to fulfil. It also introduces the different patterns you will encounter in event-driven architectures and the advantages and disadvantages of these choices. Finally it explains why Apache Kafka is a great choice for event-driven microservices.
Dapr - A 10x Developer Framework for Any LanguageBilgin Ibryam
Explore the basics of the Dapr project and why it is a 10x developer tool that emerged at the right time, what concrete benefits it brings to developers, operations, and architects.
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...Chris Richardson
A typical mission-critical enterprise application is a large, complex monolith developed by a large team. Software delivery is usually slow, and the team struggles to keep up with the demands of the business. Consequently, many enterprise applications are good candidates to be migrated to the microservice architecture. But how do you know whether it makes sense to migrate to microservices and how to get there?
This session describes when you should consider migrating to microservices. You will learn strategies for migrating a monolith application to a microservice architecture. The presentation explains how to implement new functionality as services, and you will also learn how to incrementally break apart a monolith, one service at a time.
SVCC Microservices: Decomposing Applications for Testability and Deployability Chris Richardson
Successful applications have a habit of growing. What’s more, the rate of growth increases over time because the development team typically gets larger. Eventually, the application will become extremely large and the organization ends up in monolithic hell. All aspects of development, testing and deployment are slow and painful. It’s impossible for the developers to keep up with the demands of the business. And, to make matters worse the application uses a technology stack that is increasingly obsolete. The way to escape monolithic hell is to migrate to the microservice architecture.
In this talk, you will learn about the essential characteristics of microservices. I describe the benefits and drawbacks of the microservice architecture and when it makes sense to use it. You will learn about the design problems you will encounter when using microservices. I describe how to solve this problems by applying the microservices pattern language. You will learn how the microservice architecture accelerates the delivery of large, complex applications.
Given at Silicon Valley Code Camp 2018
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesChris Richardson
The microservice architecture is becoming increasing important. But what is it exactly? Why should you care about microservices? And, what do you need to do to ensure that your organization uses the microservice architecture successfully? In this talk, I’ll answer these and other questions using shapes as visual metaphors. You will learn about the motivations for the microservice architecture and why simply adopting microservices is insufficient. I describe essential characteristics of microservices, You will learn how a successful microservice architecture consist of loosely coupled services with stable APIs that communicate asynchronous. I will cover strategies for effectively testing microservices.
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...Chris Richardson
YOW! Perth 2019 presentation
The microservice architecture is becoming increasing important. But what is it exactly? Why should you care about microservices? And, what do you need to do to ensure that your organization uses the microservice architecture successfully? In this talk, I’ll answer these and other questions using shapes as visual metaphors. You will learn about the motivations for the microservice architecture and why simply adopting microservices is insufficient. I describe essential characteristics of microservices, You will learn how a successful microservice architecture consist of loosely coupled services with stable APIs that communicate asynchronous. I will cover strategies for effectively testing microservices.
Kong Summit 2018 - Microservices: decomposing applications for testability an...Chris Richardson
In this presentation, I describe the essential characteristics of the microservice architecture. You will learn about the benefits and drawbacks of the microservice architecture and when it makes sense to use it. I discuss how the microservice architecture is not a silver bullet. You will learn about the microservice pattern language, which is a collection of patterns that solve architecture and design issues that you will encounter when using microservices.
The microservice architecture is becoming increasingly important. But what is it exactly? Why should you care about microservices? And, what do you need to do to ensure that your organization uses the microservice architecture successfully? In this talk, I’ll answer these and other questions. You will learn about the motivations for the microservice architecture and why simply adopting microservices is insufficient. I describe essential characteristics of microservices, You will learn how a successful microservice architecture consists of loosely coupled services with stable APIs that communicate asynchronously.
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...Chris Richardson
This is a talk I gave at DDD SoCal.
1. Make the most of your monolith
2. Adopt microservices for the right reasons
3. It’s not just architecture
4. Get the support of the business
5. Migrate incrementally
6. Know your starting point
7. Begin with the end in mind
8. Migrate high-value modules first
9. Success is improved velocity and reliability
10. If it hurts, don’t do it
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...Chris Richardson
This is a talk I gave at YOW! London 2022.
Let's imagine that you are responsible for an aging monolithic application that's critical to your business. Sadly, getting changes into production is a painful ordeal that regularly causes outages. And to make matters worse, the application's technology stack is growing increasingly obsolete. Neither the business nor the developers are happy. You need to modernize your application and have read about the benefits of microservices. But is the microservice architecture a good choice for your application?
In this presentation, I describe the dark energy and dark matter forces (a.k.a. concerns) that you must consider when deciding between the monolithic and microservice architectural styles. You will learn about how well each architectural style resolves each of these forces. I describe how to evaluate the relative importance of each of these forces to your application. You will learn how to use the results of this evaluation to decide whether to migrate to the microservice architecture.
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Chris Richardson
DevOps and Continuous deployment (CD), which are a set of practices for the rapid, frequent, and reliable delivery of software, are central to any digital transformation effort. DevOps/CD require your application to have a testable and deployable architecture. As a result, a large, complex, and monolithic legacy application is typically an obstacle to the adoption of DevOps/CD. You must use the microservice architecture, a.k.a. microservices. In this webinar, you will learn about the importance of having a testable and deployable architecture. We describe the microservice architecture along with its benefits, and how it enables DevOps/CD. You will also learn about the drawbacks of the microservice architecture. We describe strategies for incrementally refactoring a legacy monolithic application into microservices.
This is a keynote I gave at the SATURN 2017 in Denver:
https://www.sei.cmu.edu/saturn/2017/
The microservice architecture is becoming increasingly popular. However, frequent references to using “a microservice to solve a problem” suggest that the concept is not universally well understood.
In this talk we define the microservice architecture as an architectural style and explain what that actually means. You will learn why the architecture that you pick for your application matters. We describe how the primary goal of the microservice architecture is to enable continuous delivery/deployment and how it achieves that.
You will learn how to solve key challenges with decomposing an application into microservices. We describe why there is no such thing as a microservice!
The Reality of Managing Microservices in Your CD PipelineDevOps.com
As we shift from monolithic software development practices to microservices, our well-designed CD pipeline will need to change. Microservices are small functions, deployed independently and linked via APIs at run-time. While these differences seem minor, they actually have a large impact on your overall CD structure. Think hundreds of workflows, small of any builds and the loss of a monolithic 'application.'
Join Tracy Ragan, CEO of DeployHub and Brendan O'Leary, Developer Evangelist at GitLab, to learn more.
It's never too early to start the conversation.
Microservices are an essential enabler of agility but developing and deploying them is a challenge. In order for microservices to be loosely coupled,each service must have its own datastore. This makes it difficult to maintain data consistency across services.
Deploying microservices is also a complex problem since an application typically consists of 10s or 100s of services, written in a variety of languages and frameworks. In this presentation, you will learn how to solve these problems by using an event-driven architecture to maintain data consistency and by using Docker to simplify deployment.
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Docker, Inc.
Microservices are an essential enabler of agility but developing and deploying them is a challenge. In order for microservices to be loosely coupled,each service must have its own datastore. This makes it difficult to maintain data consistency across services.
Deploying microservices is also a complex problem since an application typically consists of 10s or 100s of services, written in a variety of languages and frameworks.
In this presentation, you will learn how to solve these problems by using an event-driven architecture to maintain data consistency and by using Docker to simplify deployment.
#JaxLondon keynote: Developing applications with a microservice architectureChris Richardson
The micro-service architecture, which structures an application as a set of small, narrowly focused, independently deployable services, is becoming an increasingly popular way to build applications. This approach avoids many of the problems of a monolithic architecture. It simplifies deployment and let’s you create highly scalable and available applications. In this keynote we describe the micro-service architecture and how to use it to build complex applications. You will learn how techniques such as Command Query Responsibility Segregation (CQRS) and Event Sourcing address the key challenges of developing applications with this architecture. We will also cover some of the various frameworks such as Spring Boot that you can use to implement micro-services.
Decomposing applications for deployability and scalability(SpringSource webinar)Chris Richardson
Today, there are several trends that are forcing application architectures to evolve. Users expect a rich, interactive and dynamic user experience on a wide variety of clients including mobile devices. Applications must be highly scalable, highly available and run on cloud environments. Organizations often want to frequently roll out updates, even multiple times a day. Consequently, it’s no longer adequate to develop simple, monolithic web applications that serve up HTML to desktop browsers.
In this talk we describe the limitations of a monolithic architecture. You will learn how to use the scale cube to decompose your application into a set of narrowly focused, independently deployable back-end services and an HTML 5 client. We will also discuss the role of technologies such as Spring and AMQP brokers. You will learn how a modern PaaS such as Cloud Foundry simplifies the development and deployment of this style of application.
There is no such thing as a microservice! (oracle code nyc)Chris Richardson
This is a keynote I gave at Oracle Code 2017 in New York:
https://developer.oracle.com/code/newyork
The microservice architecture is becoming increasingly popular. However, frequent references to using “a microservice to solve a problem” suggest that the concept is not universally well understood.
In this talk we define the microservice architecture as an architectural style and explain what that actually means. You will learn why the architecture that you pick for your application matters. We describe how the primary goal of the microservice architecture is to enable continuous delivery/deployment and how it achieves that.
You will learn how to solve key challenges with decomposing an application into microservices. We describe why there is no such thing as a microservice!
Developing applications with a microservice architecture (svcc)Chris Richardson
The micro-service architecture, which structures an application as a set of small, narrowly focused, independently deployable services, is becoming an increasingly popular way to build applications. This approach avoids many of the problems of a monolithic architecture. It simplifies deployment and let’s you create highly scalable and available applications. In this talk we describe the micro-service architecture and how to use it to build complex applications. You will learn how techniques such as Command Query Responsibility Segregation (CQRS) and Event Sourcing address the key challenges of developing applications with this architecture. We will also cover some of the various frameworks such as NodeJS and Spring Boot that you can use to implement micro-services.
Dark Energy, Dark Matter and the Microservices Patterns?!Chris Richardson
Dark matter and dark energy are mysterious concepts from astrophysics that are used to explain observations of distant stars and galaxies. The Microservices pattern language - a collection of patterns that solve architecture, design, development, and operational problems — enables software developers to use the microservice architecture effectively. But how could there possibly be a connection between microservices and these esoteric concepts from astrophysics?
In this presentation, I describe how dark energy and dark matter are excellent metaphors for the competing forces (a.k.a. concerns) that must be resolved by the microservices pattern language. You will learn that dark energy, which is an anti-gravity, is a metaphor for the repulsive forces that encourage decomposition into services. I describe how dark matter, which is an invisible matter that has a gravitational effect, is a metaphor for the attractive forces that resist decomposition and encourage the use of a monolithic architecture. You will learn how to use the dark energy and dark matter forces as guide when designing services and operations.
Similar to #DevNexus202 Decompose your monolith (20)
Dark energy, dark matter and microservice architecture collaboration patternsChris Richardson
Dark energy and dark matter are useful metaphors for the repulsive forces, which encourage decomposition into services, and the attractive forces, which resist decomposition. You must balance these conflicting forces when defining a microservice architecture including when designing system operations (a.k.a. requests) that span services.
In this talk, I describe the dark energy and dark matter forces. You will learn how to design system operations that span services using microservice architecture collaboration patterns: Saga, Command-side replica, API composition, and CQRS patterns. I describe how each of these patterns resolve the dark energy and dark matter forces differently.
It sounds dull but good architecture documentation is essential. Especially when you are actively trying to improve your architecture.
For example, I spend a lot time helping clients modernize their software architecture. More often than I like, I’m presented with a vague and lifeless collection of boxes and lines. As a result, it’s sometimes difficult to discuss the architecture in a meaningful and productive way. In this presentation, I’ll describe techniques for creating minimal yet effective documentation for your application’s microservice architecture. In particular, you will learn how documenting scenarios can bring your architecture to life.
Using patterns and pattern languages to make better architectural decisions Chris Richardson
This is a presentation that gave at the O'Reilly Software Architecture Superstream: Software Architecture Patterns.
The talk's focus is the microservices pattern language.
However, it also shows how thinking with the pattern mindset - context/problem/forces/solution/consequences - leads to better technically decisions.
The microservices architecture offers tremendous benefits, but it’s not a silver bullet. It also has some significant drawbacks. The microservices pattern language—a collection of patterns that solve architecture, design, development, and operational problems—enables software developers to apply the microservices architecture effectively. I provide an overview of the microservices architecture and examines the motivations for the pattern language, then takes you through the key patterns in the pattern language.
Rapid, reliable, frequent and sustainable software development requires an architecture that is loosely coupled and modular.
Teams need to be able complete their work with minimal coordination and communication with other teams.
They also need to be able keep the software’s technology stack up to date.
However, the microservice architecture isn’t always the only way to satisfy these requirements.
Yet, neither is the monolithic architecture.
In this talk, I describe loose coupling and modularity and why they are is essential.
You will learn about three architectural patterns: traditional monolith, modular monolith and microservices.
I describe the benefits, drawbacks and issues of each pattern and how well it supports rapid, reliable, frequent and sustainable development.
You will learn some heuristics for selecting the appropriate pattern for your application.
Events to the rescue: solving distributed data problems in a microservice arc...Chris Richardson
To deliver a large complex application rapidly, frequently and reliably, you often must use the microservice architecture.
The microservice architecture is an architectural style that structures the application as a collection of loosely coupled services.
One challenge with using microservices is that in order to be loosely coupled each service has its own private database.
As a result, implementing transactions and queries that span services is no longer straightforward.
In this presentation, you will learn how event-driven microservices address this challenge.
I describe how to use sagas, which is an asynchronous messaging-based pattern, to implement transactions that span services.
You will learn how to implement queries that span services using the CQRS pattern, which maintain easily queryable replicas using events.
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureChris Richardson
Delivering large, complex software rapidly, frequently and reliably requires a loosely coupled organization. DevOps teams should rarely need to communicate and coordinate in order to get work done. Conway's law states that an organization and the architecture that it develops mirror one another. Hence, a loosely coupled organization requires a loosely coupled architecture.
In this presentation, you will learn about design-time coupling in a microservice architecture and why it's essential to minimize it. I describe how to design service APIs to reduce coupling. You will learn how to minimize design-time coupling by applying a version of the DRY principle. I describe how key microservices patterns potentially result in tight design time coupling and how to avoid it.
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Chris Richardson
In order to explain certain astronomical observations, physicists created the mysterious concepts of dark energy and dark matter.
Dark energy is a repulsive force.
It’s an anti-gravity that is forcing matter apart and accelerating the expansion of the universe.
Dark matter has the opposite attraction effect.
Although it’s invisible, dark matter has a gravitational effect on stars and galaxies.
In this presentation, you will learn how these metaphors apply to the microservice architecture.
I describe how there are multiple repulsive forces that drive the decomposition of your application into services.
You will learn, however, that there are also multiple attractive forces that resist decomposition and bind software elements together.
I describe how as an architect you must find a way to balance these opposing forces.
Skillsmatter CloudNative eXchange 2020
The microservice architecture is a key part of cloud native.
An essential principle of the microservice architecture is loose coupling.
If you ignore this principle and develop tightly coupled services the result will mostly likely be yet another "microservices failure story”.
Your application will be brittle and have all of disadvantages of both the monolithic and microservice architectures.
In this talk you will learn about the different kinds of coupling and how to design loosely coupled microservices.
I describe how to minimize design time and increase the productivity of your DevOps teams.
You will learn how how to reduce runtime coupling and improve availability.
I describe how to improve availability by minimizing the coupling caused by your infrastructure.
The primary goal of the microservice architecture is to enable the rapid, reliable delivery of software with DevOps. One of the pillars of DevOps is automated testing, yet many organizations attempt to adopt microservices while still doing manual testing. What’s more, the microservice architecture has its own distinctive automated testing challenges.
This presentation describes how to descend the testing pyramid and replace slow, brittle, end-to-end tests with faster, more reliable tests for individual services. You will learn how to write tests that ensure that service APIs evolve while preserving backward compatibility. You’ll learn how, by running these tests in a deployment pipeline, you will fully benefit from microservices.
MicroCPH - Managing data consistency in a microservice architecture using SagasChris Richardson
The services in a microservice architecture must be loosely coupled and so cannot share database tables. What’s more, two-phase commit (aka a distributed transaction) is not a viable option for modern applications. Consequently, a microservices application must use the Saga pattern, which maintains data consistency using a series of local transactions.
In this presentation, you will learn how sagas work and how they differ from traditional transactions. We describe how to use sagas to develop business logic in a microservices application. You will learn effective techniques for orchestrating sagas and how to use messaging for reliability. We will describe the design of a saga framework for Java and show a sample application.
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Chris Richardson
A typical mission-critical enterprise application is a large, complex monolith developed by large team. The velocity of software delivery is usually slow, and the team struggles to keep up with the demands of the business. Consequently, many enterprise applications are good candidates to be migrated to the microservice architecture. As you might expect, migrating to microservices requires an enterprise to tackle numerous technology-related challenges. But enterprises often encounter obstacles that have less to do with technology and more to do with strategy, process, and organization.
In this talk I describe the essential characteristics of the microservice architecture.You will learn about its benefits and its drawbacks. I describe several anti-patterns of microservices adoption that he’s observed while working with clients around the world. You’ll learn the challenges that enterprises often face and how to overcome them as well as how to avoid the potholes when escaping monolithic hell.
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesChris Richardson
The microservice architecture functionally decomposes an application into a set of services. Each service has its own private database that’s only accessible indirectly through the services API. Consequently, implementing queries and transactions that span multiple services is challenging.
In this presentation, you will learn how to solve these distributed data management challenges using asynchronous messaging. I describe how to implement transactions using sagas, which are sequences of local transactions, coordinated using messages. You will learn how to implement queries using Command Query Responsibility Segregation (CQRS), which uses events to maintain replicas. I describe how to use event sourcing, which is an event-centric approach to business logic and persistence, in a microservice architecture.
Mucon: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
The microservice architecture functionally decomposes an application into a set of services. Each service has its own private database that’s only accessible indirectly through the services API. Consequently, implementing queries and transactions that span multiple services is challenging. In this presentation, you will learn how to solve these distributed data management challenges using asynchronous messaging. Chris will share with you how to implement transactions using sagas, which are sequences of local transactions. You will learn how to coordinate sagas using either events or command messages. Chris will also explore how to implement queries using Command Query Responsibility Segregation (CQRS), which uses events to maintain easily queried replicas.
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...Chris Richardson
A typical mission-critical enterprise application is a large, complex monolith developed by large team. The velocity of software delivery is usually slow, and the team struggles to keep up with the demands of the business. Consequently, many enterprise applications are good candidates to be migrated to the microservice architecture. As you might expect, migrating to microservices requires an enterprise to tackle numerous technology-related challenges. But enterprises often encounter obstacles that have less to do with technology and more to do with strategy, process, and organization.
Chris Richardson details several anti-patterns of microservices adoption that he’s observed while working with clients around the world. You’ll learn the challenges that enterprises often face and how to overcome them as well as how to avoid the potholes when escaping monolithic hell.
Your Digital Assistant.
Making complex approach simple. Straightforward process saves time. No more waiting to connect with people that matter to you. Safety first is not a cliché - Securely protect information in cloud storage to prevent any third party from accessing data.
Would you rather make your visitors feel burdened by making them wait? Or choose VizMan for a stress-free experience? VizMan is an automated visitor management system that works for any industries not limited to factories, societies, government institutes, and warehouses. A new age contactless way of logging information of visitors, employees, packages, and vehicles. VizMan is a digital logbook so it deters unnecessary use of paper or space since there is no requirement of bundles of registers that is left to collect dust in a corner of a room. Visitor’s essential details, helps in scheduling meetings for visitors and employees, and assists in supervising the attendance of the employees. With VizMan, visitors don’t need to wait for hours in long queues. VizMan handles visitors with the value they deserve because we know time is important to you.
Feasible Features
One Subscription, Four Modules – Admin, Employee, Receptionist, and Gatekeeper ensures confidentiality and prevents data from being manipulated
User Friendly – can be easily used on Android, iOS, and Web Interface
Multiple Accessibility – Log in through any device from any place at any time
One app for all industries – a Visitor Management System that works for any organisation.
Stress-free Sign-up
Visitor is registered and checked-in by the Receptionist
Host gets a notification, where they opt to Approve the meeting
Host notifies the Receptionist of the end of the meeting
Visitor is checked-out by the Receptionist
Host enters notes and remarks of the meeting
Customizable Components
Scheduling Meetings – Host can invite visitors for meetings and also approve, reject and reschedule meetings
Single/Bulk invites – Invitations can be sent individually to a visitor or collectively to many visitors
VIP Visitors – Additional security of data for VIP visitors to avoid misuse of information
Courier Management – Keeps a check on deliveries like commodities being delivered in and out of establishments
Alerts & Notifications – Get notified on SMS, email, and application
Parking Management – Manage availability of parking space
Individual log-in – Every user has their own log-in id
Visitor/Meeting Analytics – Evaluate notes and remarks of the meeting stored in the system
Visitor Management System is a secure and user friendly database manager that records, filters, tracks the visitors to your organization.
"Secure Your Premises with VizMan (VMS) – Get It Now"
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Why React Native as a Strategic Advantage for Startup Innovation.pdfayushiqss
Do you know that React Native is being increasingly adopted by startups as well as big companies in the mobile app development industry? Big names like Facebook, Instagram, and Pinterest have already integrated this robust open-source framework.
In fact, according to a report by Statista, the number of React Native developers has been steadily increasing over the years, reaching an estimated 1.9 million by the end of 2024. This means that the demand for this framework in the job market has been growing making it a valuable skill.
But what makes React Native so popular for mobile application development? It offers excellent cross-platform capabilities among other benefits. This way, with React Native, developers can write code once and run it on both iOS and Android devices thus saving time and resources leading to shorter development cycles hence faster time-to-market for your app.
Let’s take the example of a startup, which wanted to release their app on both iOS and Android at once. Through the use of React Native they managed to create an app and bring it into the market within a very short period. This helped them gain an advantage over their competitors because they had access to a large user base who were able to generate revenue quickly for them.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
6. @crichardson
Agenda
Why microservices?
Overview of refactoring a monolith
Implementing new features as services
Extracting modules into services
Example: extracting the Delivery Service
Example: implementing the Delayed Delivery Service
7. @crichardson
+
Marketplace is volatile, uncertain, complex
and ambiguous
+
Businesses must innovate faster
Deliver software rapidly, frequently and reliably
Software
9. The microservice architecture is
an architectural style
that structures an application as a
set of services*
Each microservice is:
• highly maintainable and testable
• loosely coupled
• independently deployable
• organized around business capabilities
• owned by a small team
*Start with one service per team until it becomes a problem
10. @crichardson
Process: Lean + DevOps/Continuous Delivery & Deployment
Organization: Small,
autonomous,
product teams
Architecture:
microservices
Testability
Deployability
Modularity
Modularity
Evolvability
Maintainability
Rapidly, frequently
and reliably delivery of
changes to long-lived
applications
11. @crichardson
Agenda
Why microservices?
Overview of refactoring a monolith
Implementing new features as services
Extracting modules into services
Example: extracting the Delivery Service
Example: implementing the Delayed Delivery Service
14. @crichardson
Make the most of the
monolithic architecture
The monolithic architecture is not an anti-pattern
If software delivery is slow
Optimize development process
Improve deployment pipeline = more automation
Improve team autonomy
Modularize the monolith
Eliminate hand-offs and create cross functional teams
If technology stack is obsolete modernize to a new monolith
…
15. @crichardson
If and only if that is
insufficient* then consider
migrating to microservices
*Large, complex applications developed by a
(usually) large team that need to be delivered
rapidly, frequently, and reliably
16. @crichardson
How do you decompose your
big, scary monolithic application?
Monolith
Service?
Microservice architecture
Service
Service
Service
18. @crichardson
According to Randy Shoup:
“As Martin Fowler likes to say, the only
thing a Big Bang rewrite guarantees is a
Big Bang!”
Via @randyshoup
25. @crichardson
Measuring success
Success != Number of Microservices
Improved metrics:
Reduced lead time
Increased deployment frequency
Reduced changed failure rate
Improvements in other -ilities
…
Anti-pattern:
Microservices as the goal
26. @crichardson
Repeat extracting
services until:
• Eliminated the
monolith
• Solved software
delivery problems
• Higher priority work
Monolith
Time
Monolith
Service
Monolith
Service
Service
Monolith
Service
Service
Service
Service
…. Monolith
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
Service
….
Strangler application
The strangler application grows larger over time
The monolith shrinks over time
Years
27. @crichardson
What to extract?
Have the ideal microservice architecture in mind
Limited timeboxed architecture definition effort
But be prepared to revise as you learn more
Start with the modules that would give you the greatest return
on investment (ROI)
28. Cost vs. Benefit of extraction
Benefit
Solves a significant
problem
Velocity frequently
updated
Scalability Conflicting
resource requirements
…
Cost
Cost of changing the
monolith and adapting/
rewriting module
Difficulty in decoupling/
breaking dependencies
Need to participate in
sagas/compensating
transactions
29. @crichardson
Cost of decoupling: ∝ # inbound dependencies
FTGO
<<module>>
Module A
<<module>>
Module B
<<module>>
Module C
Ext. API
Ext. API
Ext. API
Easy
Difficult
0
1
2
Dependencies can determine ordering
31. @crichardson
Extracting a service: cost vs.
Benefit
Benefit of extraction
Ease of extraction
High
HighLow
Low
Module B
Module A
Module CModule D
Module E
33. @crichardson
Agenda
Why microservices?
Overview of refactoring a monolith
Implementing new features as services
Extracting modules into services
Example: extracting the Delivery Service
Example: implementing the Delayed Delivery Service
34. @crichardson
Let’s imagine you want to implement
a significant new feature….
The Law of Holes:
"if you find yourself in a hole, stop digging"
(https://en.m.wikipedia.org/wiki/Law_of_holes)
Stop making the monolith larger!
35. @crichardson
Implement new functionality as a
service
Monolith Service
Data integration glue
API Gateway
Request
Monolithic
database
Service
database
Code in service/monolith
that enables service to
access monolith’s data
Pristine
new
service
36. @crichardson
Service Monolith data integration glue:
API invocation
Monolith Service
Monolithic
database
Service
database
Invokes
Command/
Query
37. @crichardson
Service Monolith data integration glue:
replicate data for reading
Monolith Service
Monolithic
database
Service
database
Application events
DB replicationTables Replica
CDC Events
38. @crichardson
Service Monolith data
access options
Option Benefits Drawbacks
API call to
monolith
Simple
Works for writes and reads
Doesn’t efficiently support
complex queries
Replicate
data to
service
Supports complex queries
Only for reads
Cost/complexity of replication
39. @crichardson
Data replication options
Option Benefits Drawbacks
Application events
Easy to publish meaningful events
Decoupled
Requires code changes in monolith
Eventual consistency
Change data capture
CRUD Events
No code changes in monolith
Decoupled
Publishing non-CRUD event is tricky
Eventual consistency
Triggers that publish
CRUD events
Simple
No code changes in monolith
Decoupled
Triggers = yuck
Publishing non-CRUD event is tricky
Eventual consistency
Triggers that update
target DB
Simple
No code changes in monolith
ACID consistency
Triggers = yuck
Coupled to target DB
Other DB replication
mechanism, e.g. OGG
Simple
No code changes in monolith
Coupled to target DB
Eventual consistency
40. @crichardson
Agenda
Why microservices?
Overview of refactoring a monolith
Implementing new features as services
Extracting modules into services
Example: extracting the Delivery Service
Example: implementing the Delayed Delivery Service
42. @crichardson
Define a two way “remotable”
interface
Monolithic database
Module’s tables
Module
Untangle
dependencies
Monolith
Ext. API
Modifying the
monolith is
tricky
43. @crichardson
Incrementally modify monolith
to invoke module via new API*
Module
Module
All writes - module/service owns its data
Ideally all reads - but can replicate changes back
*Branch by abstraction pattern
44. @crichardson
Transform the database schema
ORDER_ID STATE … DELIVERY_STATE COURIER_ID
… … … … …
ORDER_ID STATE … STATE COURIER_ID
… … … … …
ID
…
ORDERS table
ORDERS table DELIVERY table
Extract delivery service
Delivery management
45. @crichardson
Replicating data to reduce scope of
refactoring
ORDER_ID STATE … DELIVERY_STATE COURIER_ID
… … … … …
ORDER_ID STATE … STATE COURIER_ID
… … … … …
ID
…
COURIER_ID
…
ORDERS table
ORDERS table DELIVERY table
Replicate back
Read-only replica Extract delivery service
47. @crichardson
Agenda
Why microservices?
Overview of refactoring a monolith
Implementing new features as services
Extracting modules into services
Example: extracting the Delivery Service
Example: implementing the Delayed Delivery Service
48. @crichardson
AS-IS architecture
FTGO
<<module>>
Order and Delivery Management
<<entity>>
Order
ORDER_ID STATE … DELIVERY_STATE COURIER_ID
… … … … …
Consumer
Courier
ORDER table
noteAvailable()
notePickedUp
noteDelivered()
…
Tangled code
and data
Want to
extract
52. @crichardson
AS-IS TO-BE: Overview of
extracting the Delivery Service
1. Split the code: convert delivery management code into a
module within the monolith
2.Split the database: define separate DB schema for delivery
management within the monolith
3.Define and deploy Delivery Service
4.Use the Delivery Service
5.Remove old code from monolith
Commit and deploy changes after each step
56. @crichardson
Defining the DELIVERY table
create table ftgo_delivery.delivery (…)
select …subset of columns…
from ftgo.orders
where assigned_courier_id is not null;
CREATE TRIGGER assigned_courier_id_updated
AFTER UPDATE
ON delivery
FOR EACH ROW
BEGIN
UPDATE ftgo.orders
SET assigned_courier_id = NEW.assigned_courier_id
where id = NEW.id;
END;;
Replicate assigned_courier back to ORDERS table
57. @crichardson
Delivery Service schemaFTGO schema
But it’s not just the DELIVERY table
COURIER
id
name
availability
COURIER
id
name
availability
…
COURIER_
ACTIONS
…
COURIER_
ACTIONS
….
RESTAURANT
id
name
address
RESTAURANT
id
name
address
…
Sync
58. @crichardson
Replicating the RESTAURANT
table
create table ftgo_delivery.restaurants
select …subset of columns…
from ftgo.restaurants
CREATE TRIGGER restaurant_created AFTER INSERT
ON ftgo.restaurants
FOR EACH ROW
BEGIN
INSERT INTO ftgo_delivery_service.restaurants(…)
…
61. @crichardson
Integration using asynchronous messaging
Delivery
Service
Delivery
Service
schedule()
reschedule()
cancel()
Delivery
Controller
Order
Service
FTGO
Order Controller
Delivery
Service
Proxy
schedule()
…
Command
Handlers
Schedule
command
message
Message
channel
63. @crichardson
Agenda
Why microservices?
Overview of refactoring a monolith
Implementing new features as services
Extracting modules into services
Example: extracting the Delivery Service
Example: implementing the Delayed Delivery Service
64. @crichardson
FTGO Delayed delivery service
As a workaround for a mediocre
courier scheduling algorithm
that is taking too long to fix……
Improve customer satisfaction
by proactively notifying
customers (and customer
experience) that their order
won’t be delivered on time
65. FTGO Delayed delivery service
Periodically looks for
orders that won’t be
delivered on time
Not picked up and
restaurant closed
Courier delayed
…
Notifies consumer
and CRM system
getDelayedOrders()
Notification
Service
CRM system
Send
apology
notification
create case
REST
API
???
Delayed Order Service
«stereotype»
Order
«entity»
Restaurant
«entity»
OpeningHours
«entity»
Notification
API gateway
«repository»
Customer
ContactInfo
Repository
Monolith
???
REST
API
«Service»
DelayedDelivery
Service
Integration glue
Need to design
66. @crichardson
Delayed delivery service: data
integration strategies
Usage How
Orders
“complex” query to
determine whether
delivery will be
delayed
ReplicateRestaurants
Courier
Consumers
Contact info for
notifications
Query via API
67. @crichardson
Summary
The microservice architecture enables the rapid, frequent and
reliable delivery of changes to long-lived applications
Incrementally migrate to microservices when you have
outgrown your monolith
Implement new features as services
Extract modules into service
Prioritize extracting modules that give the greatest benefit