Live data from Hacker News

Modules, not microservices

blogs.newardassociates.com

261–270 of 671 posts

Re: Modules, not microservices

#261

Time to throw the cat amongst the proverbial pigeons and start the year 2023 off with discord and disharmony. Microservices are a solution to a problem. TDD is a solution to a problem, the same problem. Both are solutions that themselves create more, and worse, problems. Thanks to the hype driven nature of software development the blast radius of these 'solutions' and their associated problems expands far beyond the…

> That problem? Not using statically typed languages.

TDD was invented by a Java programmer. How does that fit into your world view?

Re: Modules, not microservices

#262
post #238

Earlier quoted context omitted.

This has been my major criticism of them; you cement the design of the app by creating an organizational structure around your software components. What happens if you need to redesign the architecture to meet new needs? That's right; it's not going to happen, because people will fight it tooth and nail. You also cannot produce any meaningful end-user value without involving several teams. Microservices is just "back…

> What happens if you need to redesign the architecture to meet new needs? How often does major reorganization happen? For most companies the answer is never. The "what if" argument is what leads to all sorts of premature optimizations.

> How often does major reorganization happen? For most companies the answer is never.

For most companies – regularly.

Re: Modules, not microservices

#263
post #213
post #44

The article above, and most if not all the comments I read right before posting this, seem to be very quiet about what I thought was one of the main "distinctive elements" of Microservices. I.e. the idea that each microservice has direct access to its own, dedicated, maybe duplicated storage schema/instance (or if it needs to know, for example, the country name for ISO code "UK" it is supposed to ... invoke another m…

> Instagram Does anyone have a microservice "map" of Instagram? I feel that would be helpful here.

Instagram, Dropbox, many of the major tech companies still use a monolith.

Or you can think of it as trunk/branch architecture. One main "trunk" service and other branch services augmenting it, which is a simpler thing to reason about.

Now imagine a small shop of 20 devs deciding to build something more complicated.

Re: Modules, not microservices

#264
post #238

Earlier quoted context omitted.

This has been my major criticism of them; you cement the design of the app by creating an organizational structure around your software components. What happens if you need to redesign the architecture to meet new needs? That's right; it's not going to happen, because people will fight it tooth and nail. You also cannot produce any meaningful end-user value without involving several teams. Microservices is just "back…

> What happens if you need to redesign the architecture to meet new needs? How often does major reorganization happen? For most companies the answer is never. The "what if" argument is what leads to all sorts of premature optimizations.

Reorgs rarely happen.

But the need for them does :)

Re: Modules, not microservices

#265

The biggest appeal to me for microservices (which might be in the list in terms of "maintainability" but isn't explicitly called out) is that it enforces the modularization. Yes I want modules. But no, I don't have the discipline to actually keep a code base modular. Platforms and languages have evolved for rapid development and convenience, and realities for modularization that aren't architectural, for example comp…

While I mostly agree, I don't think it's so black and white on the enforcement part and I actually think that a lot of recent developments actually put holes into this.

The typical example is that when you have to explain something is the job of X and Y. Usually this means that X and Y are breaking those boundaries. Just make a semi-private (or even public) API only used for that thing and you have a broken boundary again. Or push it on a message queue, etc.

I think, it certainly helps, but then again it doesn't prevent it. Having modules you have the same effect.

So in the end you get more spots where things can get wrong and more operational complexity. If you stick to using them right, I think you can also stick to using modules right with less complexities, better performance, easier debugability, fewer moving parts.

Hackers will find a way to do hacky things everywhere. ;)

Also this whole discussion reminds me of Linus discussing how he thinks micro kernels add complexity a very long time ago. Not sure if they should be considered modules or microservices though.

Sharing global state and so on while maybe it shouldn't be done lightly, without thinking about it can and does make sense. And in most modern environments it's not like the most quoted issues can happen too easily.

Also I strongly agree with pointing out that this is actually a niche topic. It's mostly big because that niche is where probably the majority of HN and "startup" people spend their time.

Re: Modules, not microservices

#266

Earlier quoted context omitted.

" If you are institutionally incapable of... " This is the road to bullshit. Of course no manager or CEO will admit that their team/company is that. Admitting technical non-excellence is nearly impossible. Organisation inadequacy... impossible. So the best course of action is to pretend your organisational methods are really just software architecture... and back to square one.

If you can't admit the problem. Can't stare it down. Can't comprehend it. Then I don't know how you can ever solve it. I try to avoid these places, not easy though.

Are there any examples of large organizations that don't have this problem? I can imagine places with small teams that are basically isolated that can operate efficiently, but once you scale to point where dozens to hundreds of teams needing to cooperate, it seems like all you have is tradeoffs and fundamental coordination and scaling issues. I've never heard of a big org that didn't have some flavor of disfunction resulting from that kind of complexity. Some places seem to be "less-bad" but that doesn't mean good or efficient.

Re: Modules, not microservices

#267
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…

I think it runs a bit deeper than that. Microservices are how the business views its self.

Look, once upon a time managers designed the system that workers implemented. The factory assembly line, or the policy manual.

But now the workers are CPUs and servers. The managers designing the system the workers follow are coders. I say coders are the new managers.

Now this leaves two problems. The first is that there are a lot of "managers" who are now doing the wrong job. (and explains perfectly why Steve Jobs gets involved in emails about hiring coders.) But that's a different post.

For me the second problem is microservices represent the atomic parts of a business. They should not be seen as a technical solution to anything, and because the first problem (managers arent managing workers anymore) there is no need to have the microservices built along Conways Law.

And so if you want to build a microservice it is not enough to consider the technical needs, it is not enough to automate what was there, you need to design an atomic building block of any / your company. They become the way you talk about the company, the way you think about the processes in a company.

An mostly the company becomes programmable. It is also highly likely the company becomes built mostly of interchangable parts.

Re: Modules, not microservices

#268

I think most criticisms around microservices are about good practices and skills beating microservices in theory. And the virtue of microservices is that they create hard boundaries no matter your skill and seniority level. Any unsupervised junior will probably dissolve the module boundaries. But they can't simply dissolve the hard boundary of having a service in another location.

Huh? They can, and will, just add the things they want to the rest api of the microservice A and then call them from B. That doesn't change with microservices. Look up a thing called "distributed monolith".

That is harder when each service and team has their own repo and review process. Doesn't mean they won't just get merged, but there is increased friction and less-trust about random PRs from engineers that aren't actively working on the same team, so those PRs might get more scrutiny.

Re: Modules, not microservices

#269

I really like modular designs, but this article is missing some key limitations of monolithic applications, also if they are really well modularized (this is written mostly from the perspective of a Java developer): * they force alignment on one language or at least runtime * they force alignment of dependencies and their versions (yes, you can have different versions e.g. via Java classloaders, but that's getting tr…

> 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.

Re: Modules, not microservices

#270

Earlier quoted context omitted.

This has been my major criticism of them; you cement the design of the app by creating an organizational structure around your software components. What happens if you need to redesign the architecture to meet new needs? That's right; it's not going to happen, because people will fight it tooth and nail. You also cannot produce any meaningful end-user value without involving several teams. Microservices is just "back…

> but don't organize teams around the services This is actually the whole point (see: Reverse Conway).

indeed, you might as well build a distrubuted monolith if your priority is absolute flexebility and ability to re-design on the fly
Post reply on HN