Monolithic Design

I keep encountering the term "monolithic software" or "monolithic design". It appears to be a pejorative about legacy code based on context, but I have yet to find a more specific meaning. Does anybody know its source?


I have often wondered that also. The definition below (taken from http://en.wikipedia.org/wiki/Monolithic) seems to match the meaning that I had imagined:

monolithic: Something that is monolithic is something created in one piece, resembling a monolith such as an obelisk. It mostly signifies artifacts without any subcomponents, i.e. a non-modularized, non-componentized, non-dismantleable building block.

But how does that apply to software? Does it mean one giant file that contains all 300 subroutines for an app with no "modules"? Based on context, I don't think that is what they meant.


Some call the use of an RDBMS "monolithic" because it is not distributed (DistributedComputing). In distributed designs, each "site" apparently has a responsibility or responsibilities assigned to it (ResponsibilityDrivenDesign). It seems to me that it would be tough to integrate information under such a setup. Things such as joins and dealing with many-to-many relationships may be tough to make easy or transparent. There was a debate on this around here somewhere, but I don't remember where right now. It is possible for a RDBMS to hide the physical location of information, which seems like a better abstraction (hide location and implementation). BigIron DB's can apparently do this. I used one briefly in one shop and did not otherwise see the difference (it seemed pretty transparent from app developer viewpoint). Some of this is talked about under WebStoresDiscussion. --top

Huh? RDBMSs can and often are distributed. There're a bunch of ways to do so, from simple replication to horizontal partitioning to fancier systems. It's often not completely transparent, but close enough that you don't really care. Take a look at the LiveJournal codebase for an open-source database app that's distributed over 20+ servers. -- JonathanTang

I think they mean the software design more than they mean machine or network architecture. Good DB distribution would not require significant changes to the app. For example, it should not matter from the app code if you joined a table hosted in Japan to one hosted in Australia. --top


A monolithic system is what you get when a system grows in functionality and interdependence at the same time. MonolithicDesign is characterized by such tight coupling among modules that the modules really have no independent existence. For example, right now I'm working on a numerical system whose I/O tends to break when you change the processing control flow.

MonolithicDesign is self-perpetuating because the tight coupling makes it impossible to reuse parts of the system. The system (it's always called "the system") provides the only available implementations of vital functionality that would take months or years to reimplement, and the only way to reuse part of the system is to reuse the whole thing.

Characteristics of MonolithicDesign:

Factors leading to MonolithicDesign:

How to prevent MonolithicDesign:

I don't see how this differs from "badly-written software" or "poorly-factored software" in general.

There's poor factoring, and there's insufficient factoring. MonolithicDesign is about failing to separate software into modules, or allowing software modules to grow together and become inseparable. There are many mistakes you can make when you factor software; MonolithicDesign is the mistake you make when you don't factor software.

I am still not getting the difference. Perhaps an example that distinquishes between poorly-factored or "bad" code and monolithic code would help. Why use a word like "monolithic" when "bad" will do?

Monolithic is a special type of bad. Let me give some examples of code that is bad, but not monolithic. Suppose you are writing a module for extracting data from a complex data source based on various sorting and filtering criteria. Here are some bad, but not monolithic, design choices you could make:

None of these flaws make your design monolithic, because none of them prevent your module from being used (however ineffectively) in other programs. If, on the other hand, you attempt to use your data access module in a different program, only to find that it depends heavily on the presence of a second module, which depends on a third module, which depends on two other modules, in a dependency graph that eventually encompasses all of the original program, then you have been stung by MonolithicDesign.

Well, that is almost impossible to achieve because interfaces tend to make assumptions also. Trying to make something truly generic can be daunting, is not a free lunch, and gets into FutureDiscounting issues. See CategoryReuse.

I agree to a certain extent. You have to find a middle way between the Scylla of trying to turn every piece of code into an independentally valuable module and the Charybdis of creating a duplicate implementation of a complex function for every new project that needs it (and doing redundant maintenance on all those projects). Both are time sinks.


See also BigBallOfMud, PlayDohPrinciple, AllOnePiece


CategoryDesign


EditText of this page (last edited November 22, 2014) or FindPage with title or text search