News for hackers. Stuff that matters.
Re:Is there any place for monoliths in 2021? (2020) by glutamate on Wednesday August 04, 2021 @11:00AM (#28061780)
Microservices Pros: Code reusability?

Please ELI5 how I get better code reuseability in microservices than in my monolith with separated concerns into libraries and helper modules.

Re:Is there any place for monoliths in 2021? (2020) by chomp on Wednesday August 04, 2021 @11:16AM (#28061990)
Yeah I think it's better rephrased as "service reusability". A proper microservice should be able to be redeployed anywhere for anything.

If you have an authenticate() function in an auth helper library, you can move that around to new web apps to help users authenticate with different parts of your site(s).

Your authenticate() function for a microservice is probably going to be part of a broader "microservice api library" that gets reused, but I can't imagine reusing the microservice code itself - you're supposed to just spin up a new one.

Re:Is there any place for monoliths in 2021? (2020) by auspex on Wednesday August 04, 2021 @11:08AM (#28061880)
If you have an “authentication” micro service. I can just reuse/deploy the service for my new app. No coding (maybe some configuration)
Re:Is there any place for monoliths in 2021? (2020) by scottious on Wednesday August 04, 2021 @11:34AM (#28062222)
I find a lot of people create micro-services when a simple library would suffice. An "authentication" micro-service might make sense in some contexts, but in almost every real-world situation I've been in, this would be better as a library.
Re:Is there any place for monoliths in 2021? (2020) by shikoba on Wednesday August 04, 2021 @11:05AM (#28061827)
I think the idea is that if you only need for an external tool one service you don't need the whole thing.