News for hackers. Stuff that matters.
Re:You Want Modules, Not Microservices by pshirshov on Tuesday January 03, 2023 @08:06AM (#34230859)
And of course it's lot easier to read 200k+ LoC shattered around twenty repos.
Re:You Want Modules, Not Microservices by koliber on Tuesday January 03, 2023 @08:10AM (#34230885)
The problem arises when you need to read the code of other modules or services. If you can rely on them working as they should, and interact with them using their well-defined and correctly-behaving interfaces, you won't need to read the code.

I'm a proponent of keeping things in a monolith as long as possible. Break code into files. Organize files into modules. A time may come when you need to separate out services. Often, people break things out too early, and don't spend enough effort on thinking how to break things up or on the interfaces.

Re:You Want Modules, Not Microservices by pshirshov on Tuesday January 03, 2023 @08:20AM (#34230961)
> and interact with them using their well-defined and correctly-behaving interfaces, you won't need to read the code.

Don't you want determinism and deterministic simultations? If you do, you'll also need stub implementations (mocks, dummies) for your interfaces.

Some notes on that: https://blog.7mind.io/constructive-test-taxonomy.html

> A time may come when you need to separate out services.

Most likely it won't if you organise properly. For example, if each your component is an OSGi module.

Re:You Want Modules, Not Microservices by rightbyte on Wednesday January 04, 2023 @04:34AM (#34243731)
> The problem arises when you need to read the code of other modules or services. If you can rely on them working as they should, and interact with them using their well-defined and correctly-behaving interfaces, you won't need to read the code.

You can say the exact same thing about C-headers though.

Re:You Want Modules, Not Microservices by SomeoneOnTheWeb on Tuesday January 03, 2023 @08:45AM (#34231195)
No, to me that's equally as bad. But 100k lines split across 500 well-named files is a lot easier to work with than 10+K line files or multi-repo code.
Re:You Want Modules, Not Microservices by naasking on Tuesday January 03, 2023 @09:27AM (#34231704)
With an IDE you're can just look at the class hierarchy/data types rather than the files. As long as those are well organized, who cares hoe they span files?

For instance, in C# a class can span multiple files using "partial" or you can have multiple classes in a single file. It's generally not an issue as long as the code itself is organized. The only downside is the reliance on an IDE, which is pretty standard these days anyway.