Application Architecture Patterns Flashcards
Patterns
Monolithic architecture
Microservice architecture
Monolithic architecture: context
You are developing a server-side enterprise application.
server-side, different clients, api, integration, request-logic-database-response, multiple contexts
Monolithic architecture: problem
What’s the application’s deployment architecture?
Monolithic architecture: forces
- There is a team of developers working on the application
- New team members must quickly become productive
- The application must be easy to understand and modify
- You want to practice continuous deployment of the application
- You must run multiple instances of the application on multiple machines in order to satisfy scalability and availability requirements
- You want to take advantage of emerging technologies (frameworks, programming languages, etc)
Monolithic architecture: solution
Build an application with a monolithic architecture. For example:
a single Java WAR file.
a single directory hierarchy of Rails or NodeJS code
Monolithic architecture: example
Browser
Apache
Tomcat (WAR)
Mysql Database
Monolithic architecture: result benefits
Simple to develop, deploy, scale
Monolithic architecture: result drawbacks
intimidates developers,
Overloaded IDE,
Overloaded web container,
Continuous deployment is difficult,
Scaling the application can be difficult,
Requires a long-term commitment to a technology stack
Monolithic architecture: related patterns
microservice architecture
is an alternative pattern that addresses the limitations of the monolithic architecture.
Microservice architecture: context
You are developing a server-side enterprise application.
server-side, different clients, api, integration by messaging or rpc, request-logic-database-message-response, multiple contexts
Microservice architecture: problem
What’s the application’s deployment architecture?
Microservice architecture: solution
Define an architecture that structures the application as a set of loosely coupled, collaborating services * Y-axis scale cube Highly maintanable and testable Loosely coupled with other services Independently deployable Capable of being developed by a small team Communication can be synch or asynch Private database Data consistency by saga pattern
Microservice architecture: example
client -> api gateway or web front -> services -> their databases
Microservice architecture: result benefits
Improved maintainability Better testability Better deployability autonomous teams Easier for a developer to understand The IDE is faster making developers The application starts faster Improved fault isolation Eliminates any long-term commitment to a technology stack
Microservice architecture: result drawbacks
additional complexity to developers
Deployment complexity
Increased memory consumption