6 ms·
> Another important reason for software complexity lies in monolithic design, wherein all conceivable features are part of the system's design. This is really
by ChrisMarshallNY 5y ago
> Another important reason for software complexity lies in monolithic design, wherein all conceivable features are part of the system's design.
This is really a call for modularity. I'm a believer in modularity, but it is not a cure-all.
Modularity brings a lot of baggage with it, like duplication of code and lifecycle management, along with increased resource usage (ironic, as the article is mainly about reducing resource usage).
But I am still a believer in it. In my experience, it makes for a massive increase in system stability, quality, agility, and speed of development.
- numbsafari 5y ago> Modularity brings a lot of baggage with it, like duplication of code and lifecycle management If the operating system and standard libraries provide better facilities for the common parts, that can go a long way to solving these problems.
- ChrisMarshallNY 5y agoExactly. But these days, everyone likes to bundle in dependencies. Also, for cross-platform SDKs and libraries, the provider may be forced to "reinvent the wheel." That may well be worth it, as developer bandwidth, and time-to-market are important variables.
- numbsafari 5y ago> But these days, everyone likes to bundle in dependencies. If the OS and standard libs provide those dependencies, then I don't need to bundle them. I'm thinking of things like the Go or Python standard libraries, or OTP in Erlang. On iOS you have a rich set of built-in frameworks, etc., etc.
- ChrisMarshallNY 5y ago...and you have a huge number of folks that program for iOS in JavaScript, with dozens of dependencies in each project. This can lead to some rather...overfed...applications, and four- or five-digit bug counts.
- numbsafari 5y agoThat sounds like a problem for those developers and their approach, not with the platform on which they are building.
- ChrisMarshallNY 5y agoYup, but these have become so common, in the industry, that they are now synonymous. For example, I no longer trust people that describe themselves as "iOS developers" to know the first thing about actually developing for the Apple ecosystem. In some cases, they don't even know how to use Xcode.
- Tainnor 5y agoMaybe I'm misunderstanding, but it sounds like you talk about modularity at the unit of deployments, i.e. separate services. But you can have modularity within a single codebase and some languages / build-systems allow you to define very clear boundaries between your different modules. In that case, I don't think you have necessary a lot of code duplication (you might have slightly increased consumption due to the use of more indirection). But you might have to code to interfaces and explicitly eliminate coupling etc.
- ChrisMarshallNY 5y agoOh, no. I use it all the time, for code components. If you look at my portfolio[0], you’ll see it packed with things like widgets and adornments. Most of these, I use in my own projects. I eat my own dog food. But today’s languages, with their reliance on extensibility and interfaces, makes writing standalone code assets a lot less cumbersome. I write in Swift, and there are some pretty big Swift "extension suites" out there[1]. The Apple Swift Package Manager is nice, too[2]. It's just that when I write a code module, I do it as a standalone product, with a full test suite (usually a harness[3], which often takes the form of a "full-fat" application), and a unique release management cycle. My modules are pretty independent, so they aren't usually custom-tailored for all of their implementations; acting in a fairly general capacity. [0] https://stackoverflow.com/story/chrismarshall https://stackoverflow.com/story/chrismarshall [1] https://swifterswift.com https://swifterswift.com [2] https://swiftpackageindex.com https://swiftpackageindex.com [3] https://littlegreenviper.com/miscellany/testing-harness-vs-unit/ https://littlegreenviper.com/miscellany/testing-harness-vs-u...
- taeric 5y agoModularity is, by definition, a feature of the code. No feature is free. Some do have major benefits. More often, some are required by tradeoffs or circumstances of deployment.
- papito 5y agoThey could have just said "distributed systems". It's not like the Node kids suddenly invented "microservices".
- 5y ago
- Jtsummers 5y ago> Modularity brings a lot of baggage with it, like duplication of code and lifecycle management, along with increased resource usage (ironic, as the article is mainly about reducing resource usage). I just can't conceive of how modularity, in general, causes duplicate code rather than reduces it. And this is before considering something like generic code which could potentially further reduce duplication. Every time we've been deliberate about using modularity in projects it ends up creating libraries that reduce the total amount of code across projects. Even if it's just in one project, good modularity has been used to reduce a lot of duplication.
- ChrisMarshallNY 5y agoAs I mentioned above, if the module is expressed as a code extension, then it is, sort of, "free." It is compiled into the main code body. But, for example, say we are talking about a communication module. One module may use a well-known library as a bundled dependency, and another module may use the same one. They may be smart enough to use dylibs, in which case, you have the potential for "DLL hell," or they may use static libs, in which case you have duplication of code, and maybe resource contention.
- Jtsummers 5y agoOk, so it's a conflict of meaning. I would not consider static libraries to be duplication of code. Duplication of assemblies or compilation unit, sure, but not code. The code itself has not been duplicated.
- ChrisMarshallNY 5y agoFair 'nuff.
- BBC-vs-neolibs 5y agoOthers have already pointed to the distinction between code duplication and runtime duplication. Regarding the development experience: I think it's a tug and back-and-forth kind of dynamic. Modularity has exactly the kind of effect you talk about, until it doesn't. At some point, the cost of communication (between people!) responsible for different modules can increase until it's a net negative to try to adapt a module, or even find out it exists and is suitable. Of course, a monolithic project of comparable size has likely collapsed from its weight into a ball of mud. Development tools have come quite a ways, but the science of getting teams to develop software together, perhaps not so much.
- markus_zhang 5y agoOne thing I observed as a data analyst (prev job) was that modularity could make data anlysis pretty difficult. Example: In a monolistic application you can easily send out telemetrics of different "components", e.g. player hitpoints, coins in inventory, days in game, etc. But in a microservice structure (at least the one I saw), since hitpoint service doesn't care about coins, and coins service doesn't care about days in game, to get all three in one telemetry, developers have to break the barrier and connect them in one way or another. So essentially you still get to write them into sort of monolithtic, but uglier and needs more arguments (but still have to write them at the end because CXO needs the report).
- 3pt14159 5y agoThat's what data warehouses are good for though. So long as you have something you can join on, you don't need to worry about how the application developers structure their systems.
- markus_zhang 5y agoTheoretically it's true (but again the burden is simple transferred to someone else). But in reality, as a BI Developer (prev as a data analyst), what I really don't want to do is a join by timestamp (and a userId), pretty much the only way to join two "subsystems" that are not interconnected. Example: Analysts want to know what's the coin balance when player starts purchasing energy bundles. Now that they don't know about each other so the telemetry only has one common field: userId. Eventually either BI developer (who develops DWH/View/etc.) or DA has to write a join by userId and timestamp to get the most accurate coin balance when player purchases an energy bundle.
- pjc50 5y agoMicroservices are not the only way to modularize. But yes, cross-cutting concerns tend to wreck modularization; in desktop environments it's usually global settings or events that cause this. (Long ago, the software industry wanted to copy the electronics industry, where people would assemble software from components listed in catalogs. We never quite got there, but you can see the influence of this metaphor all over the place when people talk about "components". It required the development of libre+gratuit Free online libraries to get there, causing an absolute Cambrian explosion and the left-pad problem)
- xbar 5y agoThis is actually a call for restrained Product Management.
- ChrisMarshallNY 5y ago> This is actually a call for restrained Product Management. I would adjust that, like so: This is actually a call for restrained, jargon-free, Product Management.
- Koshkin 5y agoKeep in mind that modularity is a complex notion: the space of components can be rather non-trivial, in that the dependency graph can have a pretty interesting topology - if you include, in this notion, for instance, inheritance, generics (templates), and all the related usage patterns that have been invented over the past 40 years. (I believe Modula and Oberon both failed to address this complexity, having restricted the programmer's understanding of the concept to a very basic use case.)
- KronisLV 5y agoOn an idea level, i'm all for DDD (domain driven design) and many of the ways to achieve modularity - be it at code level, like in the new versions of Java, be it on a library level, with shared common code, or maybe even having a hexagonal architecture, or microservices. That said, in reality, doesn't any sort of modularity imply increased complexity? - you need to manage your modules and figure out where to put the code - you need to figure out mechanisms to share and reuse it, as well as test every single integration (breaking changes will be harder) - you need to invest significant resources into the Ops side of things - maintaining multiple deployments and making them talk to one another It seems like it would lead to trading one set of constraints for another, each having their downsides. In my subjective opinion, monoliths are the only way to go for small teams (~1 pizza) and relatively small systems (~10k MAU), maybe migrating over to modular monoliths as time goes on, and only then branching out to other approaches. I actually wrote a blog post on modular monoliths a while ago, that mentions using feature flags, however i'm not sure whether the tone/quality is entirely appropriate for HN: https://blog.kronis.dev/articles/modulith-because-we-need-to-scale-but-we-also-cannot-afford-micro-services https://blog.kronis.dev/articles/modulith-because-we-need-to... Regardless, it feels like the industry perhaps jumped over the concept of modular monoliths entirely and went straight for microservices. Of course, if we're talking about modularity purely on the code level, then dynamic loading of code is its own can of worms, as can also be many methods of installing extensions.
- ChrisMarshallNY 5y agoI'm not sure why you think that isn't suitable for HN. It's a well-written, thoughtful piece.
- KronisLV 5y agoBecause of the slightly tongue in cheek style. It's something that would fit better in a Medium article, perhaps. That's not to say that everything on HN needs to be cut and dry, but factual discussions seem a bit more productive, in my experience. To that note, having any stats on the prevalence of modular monoliths would have been awesome, or maybe even more information about feature flags - those are often not discussed all that much!
- MayeulC 5y agoIt sounds like UNIX. I'm convinced that the interesting stuff happens at the interface. It's just like for neural networks: the information bottleneck makes each tool distill information inside its output. 1+1 > 2 when multiple people cooperate, thanks to this. I think the same can be applied to software. It really has plenty of advantages: code more audited, swappable parts, common interfaces, standardization on data exchange formats, testability of the components.