I read a lot about Microservices and their structure and it seems, that there are a lot of advantages when it comes to maintainability.
I want to build a mobile app with Spring Boot and Phonegap, which pulls news from RESTful Web Services.
So I'm thinking f building it as a microservice so I can add other services without rebuilding the whole application. Because in future I might want to add other services.
But is it really worth to build a Microservice based application for such a small mobile app?
There is a good article by Fowler, in which he poses that many projects which start off with a microservice-based design run into problems very quickly. Conversely, many successful microservice-based applications are the ones which began life as a monolith.
To sum up this principal:
...you shouldn't start a new project with microservices, even if you're sure your application will be big enough to make it worthwhile.
While Fowler does not express his personal opinion on this, he does speculate on the benefits of what he calls Monlith-First.
...a monolith-first strategy, where you should build a new application as a monolith initially, even if you think it's likely that it will benefit from a microservices architecture later on...It may be hard to scale a poorly designed but successful software system, but that's still a better place to be than its inverse...you need to prioritize speed...
So, the benefits of the Monlith-First approach is that you can build a monolith quickly because generally the requirements are well known and relatively few. Additionally, you get something to market fast so then you get to understand your application and how it behaves in the real world.
What stikes me as the main benefit is that you will more clearly understand where the boundaries between the business capabilities you are supporting naturally fall within your application, than if you had tried to define these boundaries up front (a necessary and very important design step in microservice-based designs).
He goes onto expand on how you can effectively plan a Monolith-first design, which basically involves keeping your code nice and modular with an eye on the future breaking-out of modules as required.
...design a monolith carefully, paying attention to modularity within the software, both at the API boundaries and how the data is stored.
In my experience a services-based approach works well with a lot of up-front analysis time spent with business domain experts, and a mature delivery team who are comfortable working with soa and service-based in general.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With