Live data from Hacker News

Modules, not microservices

blogs.newardassociates.com

541–550 of 671 posts

Re: Modules, not microservices

#541
post #465
post #72

Microservices, while often sold as solving a technical problem, usually actually solve for a human problem in scaling up an organization. There's two technical problems that microservices purport to solve: modularization (separation of concerns, hiding implementation, document interface and all that good stuff) and scalability (being able to increase the amount of compute, memory and IO to the specific modules that n…

Another benefit of microservices is it allows you to have a permission boundary, which can restrict the scope of damage if a single server/service is compromised. And for that matter it can (but not necessarily) limit how much damage a bad code release can do. Of course you don't get those benefits for free just by using microservices, but impleminting those kind if boundaries in a monolith is a lot harder.

The same techniques used to restrict intrusion, can be applied to a monolith.

Microservices aren't inherently more secure.

Re: Modules, not microservices

#542
post #107

Earlier quoted context omitted.

Unfortunately this is also partly correct - The team was young and people were eager to play around and learn how to work with microservices.

This is one of the reasons I dislike working in teams that lack 'old people'. Young devs still have a lot of mistakes to make that old devs have already made or seen. The young ones seem to see them as slow and difficult, but they also create stability and control. In a start-up, having a team of young people will allow you to move fast, pivot and deliver. What you usually end up with though, is a tower built from sp…

The most amazing kicker is that a lot of 5 YoE get senior status, while still making ridiculous mistakes.

Re: Modules, not microservices

#543
post #431

Earlier quoted context omitted.

You know, I don't really think microservices are fundamentally more scalable. Rather, they expose scaling issues more readily. When you have a giant monolith with the "load the world" endpoint, it can be tricky to pinpoint the the "load the world" endpoint (or, as is often the case, endpoint*s*) is what's causing issues. Instead, everyone just tends to think of it as "the x app having problems." When you bust the mon…

Another way to look at this is microservices reduce the blast radius of problems.

How so? If functionality A is critical to functionality B, how will wrapping it in an HTTP call (microservices) reduce the damage from breaking functionality A?

I can see an advantage regarding resource hogging, but the flip side is the extra point of failure of network calls in microservices.

Not saying which is better, but deployment is orthogonal to logical dependence and correctness.

Re: Modules, not microservices

#544
Microservices is a different perspective than modules, there is a business perspective, referencing DDD; there is a data perspective; there is also an operations and maintenance perspective; there is also a technical architecture perspective

Re: Modules, not microservices

#545

Earlier quoted context omitted.

The execution model of local calls are quite different from remote calls. Because of these differences, many efforts have been made, but "transparent remoting" is still not achieved [1]. [1] https://scholar.harvard.edu/waldo/publications/note-distribu...

Thanks for the interesting read. I agree with sentiment of the paper in that it can never be fully transparent. When I say "it should just be a process of identifying hot function calls..." this is admittedly a little contrived - there would need to be a more thorough analysis. The main point seems to be that partial failure is too difficult to handle without explicitly declaring some objects as "remote". > Merging t…

Thanks for the thoughtful reply.

> Given that the paper is from 1994, I'm wondering if there have been language changes that make this more achievable.

As the paper argues, it is not possible to make remote calls look like local ones. But it is trivially possible to make local calls look like remote ones! Use call-by-value parameter passing, and make all call asynchronous. The most successful solution I have heard of is Erlang's immutable-message-passing model.

It has been many years since I used it, but I think TOPLink Session and UnitOfWork interfaces threw exceptions signaling remote execution. This is like Erlang - you work with remote APIs; local execution is a special case.

Re: Modules, not microservices

#546
post #204

Earlier quoted context omitted.

The tweet is obviously wrong. > I was told ~1200 RPCs independently by several engineers at Twitter, which matches # of microservices. The ex-employee is wrong. > Same app in US takes ~2 secs to refresh (too long), but ~20 secs in India, due to bad batching/verbose comms. RPCs are on the server side. Why would they app take longer to refresh in India than in the US? Some more explanation: https://twitter.com/mjg59/st…

They might be using cheaper caching in India and dedicate the more expensive ones to areas of the world they get profit from.

An alternative view of this is - Elon isn't a software engineer, so don't listen to him at all.

Re: Modules, not microservices

#547
post #269

Earlier quoted context omitted.

> they force alignment on one language or at least runtime How is this possibly a down-side from an org perspective? You don't want to fracture knowledge and make hiring/training more difficult even if there are some technical optimizations possible otherwise.

The capabilites of the language and the libraries available for it can sometimes be a good reason for dealing with multiple languages. E.g. if you end up having a requirement to add some machine learning to your application, you might be better off using Tensorflow/PyTorch via Python than trying to deal with it in whatever language the core of the app is written in.

Different domains will have different requirements. Doing a monolith, doesn't preclude you from building domain specific services external to the monolith (Model serving service for example).

Take an RDBMS as an example, that is a service external to the monolith often written in a very different language to the monolith.

Re: Modules, not microservices

#548

Earlier quoted context omitted.

Proper design in a monolith would also protect you from failures of non-vital services (e.g. through exception capture). So it seems like we’re trying to compensate bad design with microservices. It’s orthogonal IMO.

How does exception capture protect from all failures? The most obvious one I don't see it relating to is resource utilization, CPU, memory, threadpools, db connection pools, etc etc. > we’re trying to compensate bad design No I think we're trying to compensate for developer mistakes and naivety. When you have dozens to hundreds of devs working on an application many of them are juniors and all of them are human and i…

With microservices you have to have a tradeoff - a monolith is inherently more testable at integration level, than a microservice based architecture.

There's a significant overhead to build and run tests at API level, that includes API versioning... and there's less of a need to version API inside a monolith.

Re: Modules, not microservices

#550

Earlier quoted context omitted.

then you need to hotfix you need to re build a giant monolith that probably has thousands of tests and a 20-30 minute regression suite easily.

I have seen exactly this. Waiting for a 60+ min CI build during an outage is not a good look.

However, there's another "bonus here" is that you have integration tests that have a better coverage.

Microservices don't make builds radically faster for the majority. People still split systems into larger services.

Post reply on HN