I’m sure we’ve all heard that fancy new term bouncing around all over the web and spilling from the mouths of our executive overlords on a regular basis, but what is it really? Another dive into the darkness of SOA, more ESBs, something fancy sounding, but really just idealistic? No my friends, it is none of these things. It’s something far better that a) can be attained, and b) will help your organization and applications thrive and flourish. We’ll go through a quick primer and help you get to a minimum understanding of Microservices and where to go next!
The Current State of Things
So let’s dive right in and talk about the current state of things as they typically are today. I frequently speak with folks that are just now pursuing the SOA model or are continuing to stack their applications together in one fantastic Jenga-style monolithic architecture that’s just waiting for one bug to bring the whole system to it’s knees. This is the current state folks and it’s not a good thing and microservice architectures are one way we’re going to get out of this monolithic mess we started.
Digital Transformation and Microservices
“Digital transformation”. Yet another great buzzword on the lips of our friends in marketing and another passed down from on high to so many developers in so many industries. Fortunately, this one isn’t so bad and has a great result if we can achieve true digital transformation and embrace the new strategies of microservices, containers, service discovery (not the horrible SOA registries that make you cry at night), and agile development. Microservices help us break down our monolith into smaller, logical, and distinct functions that are typically aligned with our organizational structure and are extremely loosely coupled allowing us great flexibility to improve and deploy specific functions and services without breaking the whole system or having to go through the whole regression test for every system we have when a service is deployed. If we can achieve this type of digital transformation, the rewards in time, money, and ROI can be great.
So what is a Microservice Architecture? This can be defined pretty well straight from Wikipedia:
Properties of microservices architecture (MSA):
- The services are easy to replace
- Services are organized around capabilities, e.g., user interface front-end, recommendation, logistics, billing, etc.
- Services can be implemented using different programming languages, databases, hardware and software environment, depending on what fits best
- Architectures are symmetrical rather than hierarchical (producer – consumer)
A microservices-based architecture
- lends itself to a continuous delivery software development process
- is distinct from a service-oriented architecture (SOA) in that the latter aims at integrating various (business) applications whereas several microservices belong to one application only
The point here is this: Microservices, when implemented correctly is that we have disposable, container-izable, distinct services that we can quickly write, rewrite, deploy, and manage with a two-pizza team. We don’t need an army of developers to run the monolith, we don’t need a standard language, and we certainly don’t need 6 months to regression test our entire code base to make sure the app won’t break! We can write these great compartmentalized services that can scale as needed to support our application.
APIs and Microservices
This quick post wouldn’t be complete (at least not on this site) without a quick note on how microservices play into the world of APIs. Using an API gateway to access our microservices allows us to take microservices we’ve built and combine them (in any combination) to provide a consistent, secure, and flexible API layer. You can effectively secure your APIs, create standardized media types, and implement caching and performace improvements at the gateway layer and effectively utilize your microservices at the underlying layer. This creates a stable, secure, and user-friendly experience for you and your customers that use your APIs.
For some additional, in-depth reading I highly recommend Sam Newman’s book on Microservices and coming soon the API Academy book on Microservices Architecture. I’ll also be discussing microservices and microservice architectures and features here more as time allows!