I write about Java & Spring @ https://www.marcobehler.com/guides
I write about Java & Spring @ https://www.marcobehler.com/guides
Marco Behler wrote:
b) I don't really see the point of creating multiple .war-modules and deploying them in the same container like tomcat. Your scenario is definitely a possible case, but here's what you should think about more (seen that MULTIPLE times in production). Usually, your microservices will talk REST to each other. And usually your http client uses a thread pool. Now when A calls B, and B , for whatever reasons hangs or delays all calls -it does not quite crash, but it just takes 50seconds to return a response. Then your thread pool from A will get saturated and _also_ not be able to process any other requests anymore. Which basically brings your whole service chain down. So there will be a multitude of problems, no matter if running in the same container or in fat jars.
Marco Behler wrote:
My actual point being: What problem are you trying to solve? What pains are you having?
Marco Behler wrote:
Microservices make sense, if and only if, you have a huge legacy monolith (which you seem to have) and are able to carve out functionality, that could entirely exist in its own domain, without your monolith. (think, "billing system", or "analytics".) Splitting out anything else just for the sake of it is like swapping the "extract method" refactoring with the "extract microservice" refactoring - just with a ton more pain.
You mentioned an application made of 19 microservices. I suppose that everyday you had to start 19 containers, and any time you need to update a service after modifications, you had to update the corresponding container. Looks cumbersome.
If all your 19 modules where simple WAR modules, you could simply start your local Tomcat instance and enjoy Tomcat's hot redeploy.
Honestly I'm investingating microservices only for sake of knowledge, I just think it's something any senior developer should know.
I write about Java & Spring @ https://www.marcobehler.com/guides
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:There's no virtue in designing an app out of microservices just to say you did it.
I learnt that they have to be loosely coupled, that they have to rely upon some discovery service, they must not rely of availabilty of other services, they should have their own database.. a big portion of troubles.
I write about Java & Spring @ https://www.marcobehler.com/guides
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|