Why We're Not Using Microservices
A Devopedia Case Study
What is Devopedia?
- A knowledge-sharing platform inspired partly by Wikipedia
- Developers can collaborate on content creation and editing
- Simple explanations that avoid
abstrusedifficult technical jargon - Built as a responsive web app
- Managed by Devopedia Foundation
Joomla! MVC Architecture
Model-View-Controller
Source: https://joomla.stackexchange.com/questions/599/diagram-of-joomla-architecture
Abstractions in Joomla! CMS
Components
Modules
Plugins
Templates
Source: https://www.javatpoint.com/architecture-of-joomla
Arch. of Devopedia App
Let's see some code!
When Monoliths Make Sense
- For a startup with limited resources
- Release an MVP quickly
- No experience in building distributed systems
- No performance bottlenecks
- Team is well-versed in a particular framework and employs it effectively
The Evolution
Users
Articles
Versioning
Drafts
Reviews
Social Login
Locks
Acronyms
Requests
Comments
Likes
Workshops
Badges
DevCoins
ML Models
Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.
-- Edsger W. Dijkstra
Edsger W. Dijkstra
Source: https://dev.to/alex_barashkov/microservices-vs-monolith-architecture-4l1m
Monolith
- Single deployable unit
- Application evolves as a single unit
- Complexity increases with time (code, teamsize, etc.)
- Scaling is a limited to vertical scaling
- Reliability has its limits
- Single platform and technology
- Database transactions
Microservices
- Separately deployable services
- Each service can evolve separately
- Complexity is managed in small units
- Each service can be scaled independently
- Higher reliability
- Multiple choice of platforms and technologies
- Eventual consistency
Challenges with Microservices
Introduces network latency
Hard to design it right
Need to orchestrate the services
Hard to debug problems
Unreliable network calls
Autonomous cross-functional teams
Distributed Monolith
Source: https://www.feval.ca/posts/microservices/
Modular Monolith
Source: https://medium.com/design-and-tech-co/modular-monoliths-a-gateway-to-microservices-946f2cbdf382
- Use of packages
- Public APIs only at the service layer
- Java 9 has modules to support this architecture
- Could we package horizontally (a layered architecture)?
Component vs Microservice
Source: https://medium.com/design-and-tech-co/modular-monoliths-a-gateway-to-microservices-946f2cbdf382
Devopedia Roadmap
- It's not trivial to identify the right boundaries
- PHP: Lumen is a micro-framework by Laravel: APIs can be delivered as packages
- CLI scripts will be deprecated once the functionality is available as APIs
- Migrate to microservices only if necessary
Further Reading
Why We're Not Using Microservices: A Devopedia Case Study
By Arvind Padmanabhan
Why We're Not Using Microservices: A Devopedia Case Study
- 800