In this fourth post in my series on Enterprise System Pitfalls, I’m going to discuss a conceptually difficult topic called Implicit Dependencies. I reiterate to my R&D team all the time that complexity is our number one enemy, and that dependencies have the most significant impact on complexity. Most architects understand that dependencies create complexity, and it is one of the primary reasons there has been such a shift away from monolithic design. Interwoven dependencies inside a monolith is the reason updates begin to be very difficult. A change in one area of the system can have a negative side affect in unexpected ways in unexpected modules. Many times, a small update will require an entire system build and deploy, slowing down our ability to improve the system quickly, or to create smaller independent teams. Most of these problems trace back to dependencies. Well, that and poor system design, but let’s just focus on dependencies.
With a desire, then, to reduce complexity, we endeavor to reduce dependencies. The advent and adoption of microservices resulted from this push away from monolithic design, and an attempt to do exactly this. However, do microservices really solve the dependency problem? Not really. Microservices give the appearance of independence, but rely heavily on other services in addition to dependencies that are pushed into coordination, transaction management, and the like. There have been many attempts to architecturally solve the dependency problem without eliminating these implicit dependencies.
The right architecture must be determined by first understanding the true sources of complexity. And in the vast majority of microservices implementations I’ve seen, the architecture fundamentally didn’t solve the dependency problem it set out to solve. I also believe that many, if not most, systems can eliminate most problems by addressing design flaws rather than moving to microservices.
In order to build the right architecture, implicit, or hidden, dependencies must be understood. And understanding is actually pretty simple. Anything that is shaped specifically, or anything that cares about content is a dependency. As an example, an API function that has specified values as parameters is itself an implicit dependency. Not only the information it sends and receives, but the contract itself is a dependency. This is why the best APIs are simply a function accepting a string and returning a string. This removes any implicit dependencies in the API itself, and it can truly remain version-less, which is ideal decoupling.
Consider comparing a simple telephone to a SOAP XML interface written with XML validation routines. Both are intended to transmit information. In the case of the telephone, the phone could care less about the language of the speaker or any of the words spoken. It does not care about any new words or other changes in communication. There are no implicit dependencies in the phone. However, implementors of the XML interfaces (arguably designed to simply facilitate communication like a phone) felt they had to check the content of the XML before passing it to whomever actually acts on the content. This XML validation means the interface cares about the information. Why? Good question. Someone thought it was better to reject data at the transmission layer than leaving it up to the system that really should care. Regardless, this is a great example of implicit dependency. These implicit dependencies became the standard way to implement XML, became a major problem, and is likely the greatest reason people think they should move away from XML interfaces. XML isn’t the problem, the dependencies are.
Now consider if an architect has created too many layers in a bloated infrastructure (see my previous post on the Infrastructure Imbalance), complexity is compounded when these needless layers contain implicit dependencies. 
In order to build scalable and affordable enterprise systems, be diligent to remove any implicit dependencies, starting with making sure the shapes of your components are the least specified as possible, and that they don’t care about information they are not designed specifically to act upon.
In my next post, we’ll examine our biggest enemy in enterprise systems: complexity.