Now to drive home some of the points that I just
made, I would like to show you a few real world examples
of architectures that kind of went astray. The first example I
want to use is an example from the Linux kernel. Actually, from
an earlier version of the Linux kernel. A research group studied
the documentation of Linux, and also
interviewed several Linux developers. And by
doing that, they were able to come up with a software
architecture of Linux at different levels of obstruction. So the one that
I'm showing you here on the left, is the
software architecture at the level of Linux's main subsystems. So
this is the prescriptive architecture of Linux at the level
of Linux's main subsystems. So the researchers, after identifying this
architecture, they showed it to the developers, and the
developers agreed that, that was indeed the architecture of the
system. The researchers then studied the source code of Linux
and reverse engineered its actual architecture. So the architecture as
implemented, it's descriptive architecture. And this one here, on the
right, is the result. And as you can see, they found
a number of differences or violations between the prescriptive architecture and
the descriptive architecture. In particular, if we look at this architecture,
we can see that pretty much everything talks to everything else,
which is, in general, not a good thing. And in addition
to that, there are also several things that don't really make
much sense. For example the library calls the file system and
also the network interface which doesn't make much sense. Another thing
that is kind of weird is the fact that file system
calls the kernel initialization code. Which is also a little bit
weird. So basically, the bottom line here is that not even
the developers realized how the actual architecture of the system was,
and how it was different from the architecture they have conceived.
And in fact another interesting thing here is the reaction of
the developers when they were shown the actual architecture. So basically
they justified the differences by saying things such as, well you
know it had to be done fast, and therefore I changed it
and then I didn't have time to go back and update the documentation
and things of this sort. And by the way these are exactly some
of the reasons that we mentioned early on in the lesson for the
discrepancy between prescriptive and descriptive software
architecture. So one last thing that I
want to mention here as an aside and we can get back to
that later is the fact that you can probably clearly show how representing
software architectures graphically can be extremely useful, because it allows
for easily seeing the structure of the system. Look at different
views identify problematic points and so on. And we will see
how that can be useful in many cases also later on.