Fundamental architectural patterns Part 1[Systems Design Sundays]
Learning these will help you choose the best option when faced with the challenges personally
To learn more about the newsletter, check our detailed About Page + FAQs
To help me understand you better, please fill out this anonymous, 2-min survey. If you liked this post, make sure you hit the heart icon in this email.
Imagine you were given a few client needs and constraints,
Now how do you come up with a system for it? Obviously, the first step should be to understand the client's needs and context better to define approximate scopes for the project. But once you have all this figured out, you need to start getting into the implementation details. This is where leveraging patterns as a base can be extremely helpful. Patterns help you quickly solve common problems and act as a solid base. Identify the right pattern, use it as a foundation, and your overall solution can be developed much quicker. It can also help you get all the developers working on a project thinking along the same lines, which is crucial for any larger-scale project.
For a more detailed look at the importance of picking good patterns and organizing your teams/dividing tasks well, look at our post on Conway’s Law.
In this email/post, we will cover some fundamental patterns that can really help you create better solutions. If you want me to cover any of these in-depth, or think I missed a really crucial design pattern let me know in the comments, by replying to this email, through my social media links below, or by showing up at the Tree next to my bedroom window. Any of these work really well.
Sparknotes Highlights
For all you super busy kids here is a quick summary of the upcoming content-
The Patterns covered: In this email, we will be covering the Layers Pattern, The Client Server Pattern, and the Pipeline Pattern.
Layers Pattern: One of the classic Architecture Patterns. Components within the layered architecture pattern are organized into horizontal layers, each layer performing a specific role within the application. Promotes low coupling and high cohesion.
Client-Server Pattern- The basis of the internet. This pattern occurs when we have a central authority (Server) offer one or more services to multiple consumers (Clients). Perfect because it lets resources be distributed in a centralized manner and will let each client operate independently.
Pipe and Filter Pattern- We build a pipeline where each component of our pipeline takes the input data, filters/applies a transformation to it and passes the output along. To those familiar with Machine Learning, this is the foundational approach in ML.
Sound like the perfect way to end your Sunday? Let’s get jiggy.
Layers Pattern
The term old is gold definitely applies here. The reason that such a classic pattern has been able to survive this always-changing industry is because of how powerful and versatile this pattern is. While there are no commandments specifying the number and types of layers that must exist in the pattern, most layered architectures go with four standard layers: presentation, business, persistence, and database.
Each module must be assigned to one and only one layer, where upper layers are allowed to use lower layers (not vice-versa). Each layer of the layered architecture pattern has a specific role and responsibility within the application. Components within a specific layer deal only with logic that pertains to that layer. This promotes the separation of concerns among components. All in all, a really cool pattern with tons of use.
Client Server Pattern
Now onto the pattern that makes this newsletter possible. The CSP is one of the most utilized patterns out there. Simply put, we have a server, which has all the relevant information that we might need. Clients simply request what they need from the client. Easy to understand and implement, but extremely useful.
Simple, but very powerful, this model offers the possibility of building distributed systems where the server centralizes the resources and workload in one place so that later multiple consumers use this data independently.
One of the best things about this pattern is that it provides a lot of flexibility and customization potential. There can be multiple clients with different uses. Take this newsletter. We host this on Substack servers, which both you and I access as clients. However, I can make requests that you can’t (edit this article, see stats, run special 2-month free deals like the one below, etc. )
Overall, definitely one of the patterns you want to master.
Pipe and Filter Pattern
Now for the final part of this post, we will cover the pattern that has made me the most money. The Pipe and Filter pattern is a mainstay in data analysis, AI, and Machine Learning. At each stage, we take an input, process it, and share it with the next component. That simple. The short video linked earlier gives more details.
This is amazing for statistical analysis heavy work. We’re able to test the effects of different policies on our overall metrics. We can test, combine, and create our algorithms by evaluating the effects on our pipeline. However, this can often be computationally expensive, which is why having a ton of theoretical knowledge is important. Follow me on Medium, YouTube, Linkedin, and Instagram for more content on the same. I always break down complex ML research and ideas into actionable insights. You can find all the links at the end of this post/email.
If you have enjoyed this post so far, please make sure you like it (the little heart button in the email/post). I also have a special request for you.
***Special Request***
This newsletter has received a lot of love. If you haven’t already, I would really appreciate it if you could take 5 seconds to let Substack know that they should feature this publication on their pages. This will allow more people to see the newsletter.
There is a simple form in Substack that you can fill up for it. Here it is. Thank you.
https://docs.google.com/forms/d/e/1FAIpQLScs-yyToUvWUXIUuIfxz17dmZfzpNp5g7Gw7JUgzbFEhSxsvw/viewform
To get your Substack URL, follow the following steps-
Open - https://substack.com/
If you haven’t already, log in with your email.
In the top right corner, you will see your icon. Click on it. You will see the drop-down. Click on your name/profile. That will show you the link.
You will be redirected to your URL. Please put that in to the survey. Appreciate your help.
In the comments below, share what topic you want to focus on next. I’d be interested in learning and will cover them. To learn more about the newsletter, check our detailed About Page + FAQs
If you liked this post, make sure you fill out this survey. It’s anonymous and will take 2 minutes of your time. It will help me understand you better, allowing for better content.
https://forms.gle/XfTXSjnC8W2wR9qT9
I’ll see you living the dream.
Go kill all and Stay Woke,
Devansh <3
To make sure you get the most out of System Design Sundays, make sure you’re checking in the rest of the days as well. Leverage all the techniques I have discovered through my successful tutoring to easily succeed in your interviews and save your time and energy by joining the premium subscribers down below. Get a discount (for a whole year) using the button below
Reach out to me on:
Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/
My content:
Read my articles: https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Get a free stock on Robinhood. No risk to you, so not using the link is losing free money: https://join.robinhood.com/fnud75