Learn about the essence of microservices technology as related to cloud computing architecture.
- [Instructor] So, let's talk about microservices. Microservices are a relatively new concept, but they're based on things that have been around for a long period of time. The ability to deal with aspects of an application to the concept of a service or a small component of the application we're able to leverage, and by the way, leverage that service from within many applications. So, microservices are really just another way to define types of services. Back in the service-oriented architecture days, we had coarse-grained services. Typically, they would do a thing that would automate a very macro process, a very coarse-grained process such as do a credit check.
Microservices are going to be a decomposition of these coarse-grained services. So, where we may have a service back in the traditional service-oriented architecture days, it did a credit check, a microservice may pull the Social Security number from a user interface, which is a small part of what a credit check service does. Reason we do that is because if we're leveraging more fine-grained services, services that do a discreet function, then we're able to more easily leverage those services from other applications because they have more utility because they don't necessarily do something macro such as doing a credit check, but they do provide you with the capability to pull a Social Security number directly from a user interface, which is something you're going to find more applicable in different applications.
So, they're more utilitarian, they're more reusable between different applications, between different systems. The idea is to stay low-level, and thus, make the services more usable. So, if you get into what microservices are as related to cloud, it's about building things that are going to be many hundred, sometimes many thousands of services that we're able to form and reform into applications and into systems. The microservices architecture as defined by James Lewis and Martin Fowler is really about the microservices style, which is an approach to developing a single application as a suite of small services, each running in its own process and communicating with a lightweight mechanism, often an HTTP resource API.
And they're built around business capabilities, they're independently deployable, and fully automated and deployable into different machinery and different systems. And at the end of the day, they're the bare minimum of centralized management of these services. So, you do not have to spend a lot of time managing these services centrally, they're very simple in what they do. And it may be written in different programming languages and use different data storage technologies. So, what, basically, this says is we're making small services, and we're not necessarily going to make these dependent on any particular type of technology, any particular type of programming language.
And so, we're able to make these small, very discreet independently managed services. They're going to have more utility than larger services or services that are more proprietary in nature, services that have to leverage a single programming language. So, in looking at microservices, we have services that exist are basically decomposed and very fine-grained services, and that's what microservices are. It's denoted in the name, microservices. And so, the idea is that we have, typically, monolithic systems, which we broke down into a service-oriented architecture, which means we broke them down into two or sometimes hundreds of services that are basically making up these legacy systems.
So, we're taking a legacy application, which is basically a single macro application that does lots of stuff and could be thousands and thousands of lines of code, and then breaking it down into reusable services that are going to part of a service-oriented architecture, and that's what you see in the middle. And then, breaking those down even further into microservices, which are going to have more utilitarian use. So, the idea is that we go from monolithic, meaning everything exists in a single main-line application and it's very difficult, if not impossible, to decouple those services directly from those legacy applications.
And then services into themselves, which are going to be coarse-grained services that could be part of the application, such as our example of doing a credit check or the ability to execute the purchase of a car. Those are examples of very complex, very large services, which we call coarse-grained services. And microservices are fine-grained services decomposing the coarse-grained services another level, and so they're doing things very discreet, particular things that are able to make up and build services. Keep this in mind that microservices are nothing more than a decomposition of traditional legacy application development down into service-oriented architecture, which we've been doing for about 20 years, and down into microservices, which are related to cloud because lots of different systems we build in cloud are going to be leveraging microservices.
Keep that in mind. So, how this exists in the SOA Meta Model is right there in the middle. So, we have services and microservices, which communicate with data services which talk to database abstractions which talk to the physical database which talk to a process orchestration layer above it, and then monitoring and event management. So, they're the center of the universe in terms of how your cloud architecture is going to work. And governance and security is going to be part of that, it's going to be systemic to everything you're looking at here, but in essence, what they're able to do is take data services, take process and orchestration, and then bring them down into very fine-grained services that we're able to orchestrate or we're able to put into an application that we call a composite application.
We're able to leverage them any number of ways. And so, in other words, it's a function that carries out a particular set of behaviors and may deal with a particular set of data, and it's reused across different systems, across different applications, is where you make your money in cloud computing.
Note: This course was revised for 2019.
- Microservices and containers
- Complex, disturbed, serverless, and composite architectures
- DevOps integration
- High-performance solutions