Microservices architecture development approach to develop an application as combination of small logical modules – as opposed to monolithic architectural style (One big application). Microservices enable you to use different programming languages in same application., and they can also be managed by different teams. Lumen being API frameworks fit best with a microservices applications
Any lumen or Laravel development project can be categorised as one of them:
1. Developing from scratch
2. Refactoring existing app
3. Enhancing existing application
Microservices approach fits well for all three types.
Some common benefits of using a microservice architecture are:
1. Since each small piece is focused on only a module they can be more lightweight and thus likely much better performance-wise than a single complex app.
2. Pieces can be and often are written in different programming languages. You might have a small app written in PHP, another using nodeJs, etc…
3. In a large team you might have members assigned only to specific microservices reducing the need to understand the entire application.
With benefits there are drawbacks as well:
1. The more moving parts something has the more complex it gets and the harder it is to understand everything. Things like debugging get much harder and there are many more points pf failure.
2. There are too many files to consider
3. Need to re-consider the domain logic sometimes
4. Creates developer frustration
If your app is working fine as it is and the codebase is manageable I wouldn’t worry about microservices at this point. Maybe at some point it will be beneficial to split a piece or two out but I say wait until there is an actual benefit.
When one talks about microservices, not mentioning Docker, one of the breakthrough technologies the last couple of years, is simply unforgivable. Microservices are often built and deployed as Docker images, it has become a standard practice, and so we quickly prepared a public image on Docker Hub.
A single command launched in the terminal of any OS X, Windows or Linux machine, and you get a working instance.