Live data from Hacker News

Modules, not microservices

blogs.newardassociates.com

331–340 of 671 posts

Re: Modules, not microservices

#331

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

A sane thing to do.

>they force alignment of dependencies and their versions

A sane thing to do. Better yet to do it in a global fashion, along with integration tests.

>they can require lots of RAM if you have many modules with many classes

You can't make the same set of features build in a distributed manner comsume _less_ RAM than the monolith counterpart. Given you're now running dozens of copies of the same java vm + common dependencies.

>they can be slow to start

Correct.

>they may be limiting in terms of technology choice

Correct.

>they don't provide resource isolation between components

Correct.

>they take long to rebuild an redeploy, unless you apply a large degree of discipline and engineering excellence to only rebuild changed modules while making sure no API contracts are broken

I think the keyword is the WebLogic Server mentioned before. People don't realise that monolith architecture does't mean legacy technology. Monolith web services can and should be build in Spring Boot, for example. Also, most of the time, comparisons are unfair. In all projects i've worked im yet to see a MS instalation paired feature-wise with his old monolith cousin. Legacy projects tends to be massive, as they're made to solve real world problems while evolving during time. MS projects are run for a year or two and people start to compare around apples to oranges.

>they can be hard to test

If other team's component break integration, the whole building stops. I think Fail-Fast is a good thing. Any necessary setup must be documented in whatever architectural style. It can be worse in a MS scenario, where you are tasked to fix a dusty, forgotten service with an empty README.

If anything, monolithic architecture brings lots of awareness. It's easier to get how things are wired and how they interact together.

Re: Modules, not microservices

#332
As a senior software engineer, the most tiresome type of software dev to deal with is not the junior developer, it's the highly opinionated intermediate-level dev. They say things like "we'll obviously build the system using modern microservices architecture using node.js" before they even know the requirements.

Re: Modules, not microservices

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

>> because they keep people honest around module boundaries Imagine a world where every pip/nuget/cargo package was a k8s service called out-of-process and needed to be independently maintained. We would have potentially hundreds of these things running, independently secured via mTLS, observability and metrics for each, and all calls run out of process. This is the abysmally slow hellscape that some are naively advo…

But of course team scaling is determined this way. Merely releasing a library version has zero business impact. To have impact, library teams must go around to every consumer team and beg them to accept a version bump. This is a) shitty work for which it is impossible to retain people, and b) intractable without an enormous labor force once the number of consumers is big enough.

Services can be continuously deployed by small owning teams.

Re: Modules, not microservices

#334

Earlier quoted context omitted.

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…

I'm so conflicted over becoming an older engineer (having recently moved back from a leadership role). On one hand, I have a wealth of knowledge and can see around corners that the youngsters have no chance of doing. OTOH, it is absolutely exhausting explaining in excruciating detail why I am right time-after-time as new mids join who just want to experiment. That and I am absolutely petrified of my alacrity fading w…

I hear ya. If you feel you've lost your perspicacity, fear not; it's always in the last place you look.

But... yeah. A colleague (25+ years) has to deal with this more than I do, but have hit it some over the years, and it happens more the older I get.

Often he or I may be 'right' but only because of existing constraints in a system. Someone with a different view may even be 'correct' in a nuts-and-bolts technical sense. Yes, A is 8% faster than B. But... we have an existing system in B that meets our current needs, and team who know B, have written it, and maintained it for a couple years. Switching tech stacks to something no one knows for an 8% network speed boost is not remotely helpful.

Re: Modules, not microservices

#336
post #330

Earlier quoted context omitted.

is this a common nomenclature/design? how does a monolith that makes IPC/RPC calls to submodules not basically microservices?

yes, it's very common design. sometimes called a "distirbuted monolith." it's not microservices because the number of additional services is usually small, and the codebase is still tightly coupled to itself (even if well factored in terms of modules). i.e., everything is still tested together, and there's still a single monolithic build and deployment process, and no team can go off and decide to write a service in…

so for example in the context of Java, you have one main App/main() entry, probably bounding to a port (let's say 80 serving HTTP requests) acting as a router

it brokerages them to subclasses/handlers for CRUD/RPC/plumbing to database/other services

then in a separate process App/main() you have a cron job or a queue of some sort

you bundle these together as a monolith into one main()?

Re: Modules, not microservices

#337

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…

Dynamic typing + Microservices + Unit Tests just blows everything out of the water on Development Speed / Time to Market.

Most important thing for lots of startups and companies is Time to Market.

Traditional static typing based approachs are just a bad joke (3 times slower on average) in comparsion.

That's why we have the whole microservices and dynamic typing thing going on, because businesses that use it beat up businesses that don't. It's pretty simple really.

Re: Modules, not microservices

#338
post #332

As a senior software engineer, the most tiresome type of software dev to deal with is not the junior developer, it's the highly opinionated intermediate-level dev. They say things like "we'll obviously build the system using modern microservices architecture using node.js" before they even know the requirements.

+1 on this, folks with just enough experience to have strong, yet naive, opinions is the bane of my existence. It is almost akin to a religious discussion, whereas folks will back up their suppositions with blind faith and defend those views to the death. Sorry if this is not adding a lot to the conversation, you just really struck a nerve!

Re: Modules, not microservices

#339

Earlier quoted context omitted.

I felt suspicious as soon as I saw Jon Carmack’s website being mentioned in a conversation about Microservices.

I hope this quote from the Carmack essay shows that his argument isn't necessarily restricted to game development: ---------- style C: void MajorFunction( void ) { // MinorFunction1 // MinorFunction2 // MinorFunction3 } > I have historically used "style A" to allow for not prototyping in all cases, although some people prefer "style B". The difference between the two isn't of any consequence. Michael Abrash used to w…

I love Carmack but I always thought his conclusion there was unsatisfying. I think the issue with really long functions is that they increase scope - in both the code and mental sense.

Now your MinorFunction3 code can access all the local variables used by MinorFunction1 and MinorFunction2, and there's no easy list of things that it might access which makes it harder to read.

Separate functions do have a nice list of things they might access - their arguments!

Of course this technically only applies to pure functions so maybe that's why it doesn't matter to Carmack - he's used to using global variables willy nilly.

Also sometimes the list of things a function might need to access gets unwieldy, which is when you can reach for classes. So no hard and fast rule but I think increased scope is the issue with it.

Re: Modules, not microservices

#340
post #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?

Java's original type system, while static, was far from being powerful enough to provide strong guarantees of safety.

Saying age is an int is great, but Java doesn't let you say age is an int ranging from 0 to 130.

You can of course create an age object, but the constraints on that object cannot be expressed within the type system.

So you have to add unit tests instead, the unit tests in effect extend the type system out to be as powerful as type systems from the 80s.

Yay, progress! :/

Post reply on HN