Microservices Architecture
Microservices Architecture
Architecture
Introduction
Get an introduction to the microservices architecture
and how it differs from the monolithic style of software
development.
Microservices have emerged as the preferred approach
for complex business applications deployed at massive
scale.
This architecture has increasingly been incorporated
into new applications for libraries.
Fundamental technology shift
Mainframe computing
Client/Server
Cloud Computing
http://www.flickr.com/photos/carrick/619
52845/
http://soacloudcomputing.blogspot.com/2008/10/cloud-computing.html
http://www.javaworld.com/javaworld/jw-10-2001/jw-1019-jxta.html
Microservices
Current prevailing approach for large scale globally
distributed applications
Common choice for new development projects for
business software
Many organizations are also evolving existing
monolithic applications to Microservices
What are microservices?
A model of technical architecture
Small independent functional applications
Each microservices built on appropriate technical
components
A software development pattern
Decentralization of technical components
Distributed programming / DevOps teams
Responsibility to deploy, operate, and maintain services
From apps to systems
Many microservices are assembled to create a complex
business application
Separate independent components
Brought together via middleware or API gateway
Software Development Styles
Monolithic Applications
Codebase of application deployed as a single bundle of
executables and libraries on a unified platform
Microservices Architecture
Multiple independent software components orchestrated to
form a unified application
Common infrastructure:
User interface toolkit
API Gateway
Persistence layer
Alternative approach: Monolithic
software
Consolidated executable application
Plus supporting libraries and modules
Can be massively distributed across computing clusters
Entire application based on a uniform technology stack:
Server platform
Operating system
Programming language
Database layer
Enhancements mean recompilation of entire application
Monolithic Application Conceptual Model
Scripts/
User Third Party Systems
Interfaces API endpoints
Web service
Presentation Layer
Application software
Business Logic
Run time libraries
Database Engine
Table Table Table Table Table Table Table Table
Table Table Table Table Table Table Table Table
Services-oriented Architecture (SOA)
Longstanding approach to business application
development
Monolithic application based on reusable services
Complex applications rely on an enterprise service bus
to manage communications among services, database
connectivity, event triggers, etc
Single uniform technology platform
Code assembled into a monolithic package
Scales to very high performance through clustered
deployment
SOA development issues
Services are closely interrelated throughout the
application
Developers must understand all aspects of the
application
Single technology stack
Small changes require full recompilation
Complex applications can hit hardware or OS limits
Centralized development pattern
Operations separated from Development
Monolithic Application: Enterprise SOA Model
Scripts/
User Third Party Systems
Interfaces API endpoints
Web service
Presentation Layer
} Composable
Services
Database Engine
Table Table Table Table Table Table Table Table
Table Table Table Table Table Table Table Table
Difference between Monolithic and
SOA
Service-Oriented
Feature Monolithic Architecture
Monolithic Architecture
Single unit (but
Deployment Single unit
modular)
Modularity Poor Better modularization
Entire system scales Some flexibility, but
Scalability
together still constrained
Request Response
REST / HTTPS
Web service
Service components
Microservice
Application
software
Run time libraries
Data Store
Assembling an application
Each microservice performs a small limited task
Not intended to be standalone applications
Surrounded by specialized infrastructure
Manage communications
Orchestrate services into complex chains of tasks
Load balancing
API Gateway
User Interface layer
Externally exposed APIs
Multiple instances of any microservice launched as needed
Microservices-based Application
Scripts/
User Third Party Systems
Interfaces API endpoints
API Gateway
Web service
Service
components
Web service Web service
Web service
Data Store
Data Store Data Store
Data Store
Data Store
Persistence / System
Layer
Microservice Architecture step by
step…
1. User Interfaces (Top Layer)
• Represents the frontend applications or user interfaces (UIs).
• Could be web applications, mobile apps, or desktop
applications.
• These interfaces send requests to the system via an API
Gateway.