Software Architecture Patterns pt. 1
Over the last week or so I started to become more interested in Software Architecture. I’ve heard this term thrown around a lot, but always in a very vague way. By luck I stumbled upon a short book that actually explains 5 popular Software Architectural Patterns. Before diving in, let’s try to demystify this term.
To Architect or not to Architect
First question is: When should we think about software architecture patterns when we’re building systems? If it’s more than just a simple static website, or anything of slightly complex nature, then it’s time to start considering appropriate options.
Layered Architecture or the Sleeping Monolith
After reading this book I realized that for almost every project I worked on I’ve only used “Layered Architecture”. This is the idea that we can break up our concerns into multiple parts, with each responsible for their related duties. For applications, this means there’s a UI component, Business Logic component, Persistence component, and Database component. The problem with this structure is that it can easily become highly coupled, that is, changing one part in a single component will require changing many other components in order to account for that change. This means the applications will tend to be inflexible to change and can get bottle necked when trying to scale.
A More Nimble Choice: Event Driven Pattern
The Event Driven Architectural pattern is much more versatile and is great for making a serverless back end. This type of architecture waits for events to occur, delegates the data passed from the event down a chain which reaches an event processor, which then does something with the data and passes along a signal saying it’s done. This is way more flexible as all the logic is entirely decoupled: adding or removing modules doesn’t break other modules. The difficulty with this pattern is that it’s asynchronous behavior is difficult to test, and determining some modules failure to respond could also cause some headaches.
Extensibility for Days: Microkernel Pattern
Another interesting architectural pattern that can be embedded in other patterns is the Microkernel Pattern. There’s a core system that provides basic functionality and is extensible. This allows for “plug-ins” to be added to create additional features and functionality. For this, think of your OS. Without the programs installed, the OS doesn’t provide too much value. Another example could be your browser, or if you’re a programmer, your favorite text editor. VS Code without plugins is fine, but more or less just a simple text editor. This pattern has it’s benefits, but one of the greatest benefits is that it can be substituted into other patterns.
In part 2, I’ll continue discussing the Micro-Service Architectural pattern, one of the more popular software architecture patterns currently. I’ll also go into how it can be applied with a work framework called Scrum.
Recent Comments