Category Archives: Book Reviews

Reading Summary

Beautiful Architecture (Software Engineering)

At first I thought this was a book on computer architecture, it turns out that it was on software design. Overall the book shows examples on examples of software architectures that are “beautiful”.  Beautiful architecture exhibit universal principles:

  • When change occurs, only one place needs to be modified.
  • They have adequate construction tools.
  • Not only beautiful at run-time, but also at construction time.
  • They use a minimum set of mechanisms, as long as the requirements are met.
  • Use controller objects. Base the architecture on use cases and one function at a time.
  • Considers the likely growth of the system.
  • Resists the entropy, does not become more disorganized over time.

The book gives an analogy of a software architecture as a music composition. It may be played by different musicians or at different places, but the composition is supposedly beautiful as it can be suited to the corresponding environment. There are architectures that meet functional requirements, but it does not imply that it meets quality requirements. For instance, there are numerous ways on how to set up web pages: JSP, PHP, Static HTML, CGI are just to name a few.  Choosing a technology is a very significant architectural decision.

Since I have been working in a software development company, I feel how important it is to have a good company structure and healthy development process as mentioned in the book. Newly recruits should be able to understand the system without heavy effort, and fixing bugs should have a predictable timescale. Quality software have good cohesion, where related functionality are gathered in modules; and also minimal coupling, in which there is few wiring between those modules. As I said on how bug fixing should be predictable, is that the architecture should help us locate funcionality. We should know effortlessly on which module should be fixed. The architecture should also be malleable and refactorable,  as this also encourages simple and easy to change designs.

Have you ever played online games? How about Massively Multiplayer Online (MMO) games? Jim Waldo wrote a chapter on Architecting for Scale, which describes on different approaches taken to tackle the scale problem of MMOs. Two common ways of dealing it was by geographical areas and sharding. Sharding is practically duplicating the world on a different server, but users on different shards cannot interact with each other. He described an alternate approach, which is called the Darkstar architecture.

Another interesting chapter in the book was on the Facebook platform by Dave Fetterman. Facebook is conceptually a standard n-tier stack, where we request a certain social data, which is then processed by Facebook’s logic and then becomes a display output. Facebook then grows broader of the stack, and makes itself integrateable by outside systems through applications. While the social data remains the center of the architecture, the platform has grown into an array of Web Services: FB API, FB Query Language, and FB Markup Language.

The book goes on telling stories on Xen (virtualization), Emacs success, and KDE. The final part of the book is on functional vs object oriented programming and somehow describing beautiful building architectures. Though they are physically different (software are practically intangible), the same design principles can be applied to create beautiful architectures.