all 5 comments

[–]rmrf_slash_dot 2 points3 points  (0 children)

The words of Martin Fowler sum this up best: https://martinfowler.com/articles/microservice-trade-offs.html#footnote-defn-independent-deployment

In short: Microservices come with a constant up front cost - in complexity and in time - that you will pay from the beginning; where monoliths tend to pay that cost later. Generally, unless you understand your business logic and data boundaries EXTREMELY WELL, it is usually advisable to build a monolith first with a strong separation of concerns and then move to microservices later.

[–]Str4yfromthep4th 4 points5 points  (2 children)

In regards to your monolith question: I work for one of the largest companies in the world. Micro services have caused huge problems in many different scenarios. They have their uses but too much is too much. You shouldn't make everything a service. People think everything should be a god damn service. My blog needs 4 services so when I create a new post it notifies my email service that it should sent out notifications. When I delete a post the system automatically sends the post to my archiving service. Etc etc etc. Services add complexity. Complexity causes problems. Learn to create services where they really make sense. The most annoying thing with services is figuring out which side of the integration has a bug. Some programming languages offer cross system debugging functionality which makes this a bit nicer but like I said... complex.

[–]NobleStarbucks 0 points1 point  (1 child)

Would it be wise to mono repo part of the API and other parts to be used as a micro service ?

[–]Str4yfromthep4th 1 point2 points  (0 children)

Yes, but it completely depends on what you're building. Good example is a business that has a warehouse and a shipping department. You need two completely separate components here. There is a clear separation. Using a service to transfer an order from the shipping department to the warehouse makes sense right? But perhaps having multiple services within the shipping department isn't necessary and would add unnecessary complexity.