Evaluating design of a system without Mediator

Evaluating the design of a system without mediator

In this section we will discuss another very fundamental pattern which is again a fundamental property of any well designed complex system. Usually this pattern is used along with the controller design pattern to manage the complexity of any complex system. This pattern has been used for ages for designing complex systems in different streams of engineering and have been named by different people differently. Since software systems can be highly complex as well , software system also benefits greatly using this pattern.

To understand the problem addressed by this pattern … let us look into the following figure. The figure below shows a system which has large number of structural components and delivers a behavior B. For this behavior B to be delivered the, all of the structural components needs to interact with each other and hence all of them are keeping a reference to each other to facilitate this interaction.

This is how the system looks like.

Figure- Figure

Now we need to discuss the pros and cons of this design.

Can we think about one word to describe a system like this … “Chaos” ..”Mess” … “Nightmare” … there are too many words available to describe this system. On the first glance itself … it looks to be a highly complex system.

But let us technically evaluate this design wrt the parameters we usually use for evaluating designs.

Lets first comment on the usability[from the developers point of view] / complexity of the system. As we can see it looks to be a very complex system and hence because of the same debugging problems in a system like this is very tedious. Hence maintainability / manageability of this system is highly pathetic.

More importantly think about this design from a flexibility point of view. In this design as every other component is keeping a reference to every other component, the property of this design is doing any kind of structural or behavioral change will have maximum impact on the system. If I add, remove or modify any structural component .. all of the structural components will get impacted, similarly if I add remove or modify a behavior of a structural component or the interaction between the components, again maximum number of components will get impacted. So the problem with this design is if we do the smallest of the structural/ behavioral change within the system we will have the maximum impact within the system. Hence from a flexibility of this system is very pathetic.

Now let us explore any advantages of this design.

As the structural components are interacting with each other directly with no level of indirection involved, the performance offered by this design will be the best.

The nest advantage that we can see is .. again there can be partial failures in this system but it may never happen that the entire system comes to a knee jerk halt.

So the disadvantages seems to me more than the advantages hence, we will have to do something to improve the usability and flexibility of this system.

 
Hemant Jha
Founder - VPlanSolutions
Researcher, Trainer

www.VPlanSolutions.co.in