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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8829201/logo-name-reg-h.png)
Joomla! MVC Architecture
Model-View-Controller
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8827107/PBcaV.png)
Source: https://joomla.stackexchange.com/questions/599/diagram-of-joomla-architecture
Abstractions in Joomla! CMS
Components
Modules
Plugins
Templates
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8827112/architecture-of-joomla.png)
Source: https://www.javatpoint.com/architecture-of-joomla
Arch. of Devopedia App
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8827131/devo-arch.png)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8829375/maxresdefault.jpg)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8827163/49395813-cd094980-f737-11e8-9e9a-6c20db5720c4.jpg)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8829172/dependency-hell.png)
Source: https://www.feval.ca/posts/microservices/
Modular Monolith
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8835551/1_nyy-y-ZqOyzybXB4qTxtUQ.jpeg)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8835555/1_JqIfShk1HohX5uf90HJhuA.jpeg)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/636534/images/8837013/logo-name-flat-tm-square.png)
Why We're Not Using Microservices: A Devopedia Case Study
By Arvind Padmanabhan
Why We're Not Using Microservices: A Devopedia Case Study
- 720