Why is Microservice Architecture better than monolithic architecture? I know the answer will be because the microservice architecture is more scalable and each service is independent of each other etc.
My following question is: should we build using Flask or Django REST Framework?
I have also heard of a framework know as Falcon as per there documentation seems good enough.
I don't think whether your app turns out to be a monolith or a microservice depends on the web framework that you are using (e.g. Django or Flask)
*Unless we're talking about frameworks specifically built to deal with managing microservices (e.g. to facilitate service discovery) web frameworks like Django or Flask are pretty equivalent (input HTTP request, output HTTP response)
Maybe their perceived popularity in a given use case (e.g. Django monolith or Flask microservice) may suggest they are better suited for a particular deployment style, but you could a microservice with Django just as easily as you can a monolith with Flask.
For instance, if I select Flask as my web framework, and in a single Flask app/process I implement all of the services (auth, admin, reporting, payroll, marketing, billing, messaging, search etc), where everything communicates on the code level, then I'd end up with a monolith.
On the other hand, if for instance I take Django, and divide my services into several small Django deploys, and make it so they only communicate through well defined HTTP contracts, and can be updated/deployed independently, then I'd end up with a microservice.
Bottom line is, a microservice is more than just the web framework you use, so use whichever one you like the most, until you have more specific requirements and e.g. 3rd party libs that are useful to you and are only available for a given framework but not the other.
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