june23's avatar

Should I only add complexity when there are issues with the Web System itself and start off simple and follow YAGNI and the Evolutionary Architecture?

I was asking Gemini AI how I should add System Design Patterns to a Web Application System. My question was this ->

So adding complexity like a System Design Pattern like "Sequential Convoy" or "Queue Based Load Leveling" or a "CDN Cache" or a "Circuit Breaker" or "Bulk Head" should come from bottlenecks and other conditions like high CPU, RAM, or I/O Disk or Race Conditions or Latency Bugs? Is that correct? A System should start off with that it needs, and then gradually add complexity when it is needed from bottlenecks for example. Explain in detail.

And it said this ->

So my question is, is it true to start off simple and then add complexity as the system needs it?

I understand that things like DevOps (Jenkins, Ansible, Unit Testing Tools, Code Coverage Tools, Static Code Analysis Tools, Docker, Cluster Management Systems) are a requirement and not something to add when needed. I understand that most Cloud Services (like AWSs EC2, Cloud Formation, ELB, Auto-Scaling, ECS, EKS, IAM, RDS, S3 if using this Storage, etc...), most of these Services are a requirement not added when needed. I understand Monitoring Tools like New Relic or Data Dog and ELK are a requirement. I know about Security which is a topic in itself, but also a requirement.

So maybe most things that are taken from System Design, I am using the following patterns from this website -> https://roadmap.sh/system-design . The patterns found there (if you scroll down the web page through the list of patterns) mostly from Cloud Design Patterns section under "Design and Implementation", "Data Management", and "Messaging", and the Reliability Patterns section under "Availability", "High Availability", and "Resiliency". These patterns are the ones mostly that are going to be added as "Complexity" to the Web Application when needed if bottlenecks arise or other issues like Race Conditions, Latency Bugs, etc... is that correct?

Since I know the Patterns that "are a given" meaning they are more than likely a requirement, are like the Caches, CDNs, Queues, Consistency Patterns, Database Selections, (I am using the website for reference the roadmap.sh), I know these are sometimes more than likely a must.

So are the Patterns taken from the website (roadmap.sh) Cloud Design Patterns section under "Design and Implementation", "Data Management", and "Messaging", and the Reliability Patterns section under "Availability", "High Availability", and "Resiliency", are the ones (more than likely) going to get added over time if needed? It just makes sense to me, to see it this way... is all.

Or can someone explain to me how to add these things over time, or is the quote the AI reply Gemini gave me "the sophisticated patterns you mentioned are tools to be used on demand, not features to be built by default.", and should be added to resolve issues like bottlenecks or failures that the monitoring systems are alerting of, is that correct and accurate?

Side Note - I know that for Portfolio Projects, there should be large complex web applications to impress hiring recruiters, if the competency of the Web Developer can allow of such a thing of course. I am talking in a professional setting where it makes sense to start off small and gradually scale the system out.

0 likes
11 replies
june23's avatar

@snapey Thank you for replying to my question, can you please explain why you say this? Should System Design be built UPFRONT when building a Web Application, instead of relying on bottlenecks and then gradually fixing the bottleneck with a System Design Pattern? I am trying to understand System Design, should I review a System as in:

  1. Gather Functional Requirements and Non-Functional Requirements
  2. Design Core Entities - Database Design
  3. API Design
  4. Create a High Level Overview
  5. Deep Dive into the System

I have taken this checklist from a YouTube Video from a Ex-Staff Engineer from Meta. But there are so many Patterns (Sequential Convoy, Queue Based Load Leveling, etc...), I am lost at which ones I should add and leave out...

Should I add to the checklist a section for something like, "review each System Design Pattern and see if it applies to my System and ADD it if it does"? And keep on doing that until it satisfies my System Design? Would that be better?

Snapey's avatar

The only way to gain experience is to write code, not to write about writing code.

If you want to be the worst type of academic then carry on. If you want to earn a living and build products that people love then start building. You can correct design issues later.

june23's avatar

@snapey I understand that writing code will make me better, obviously. But my question was regarding System Design. And you just critiqued my question by saying "95% bul...t" and not helping at all. I am trying to understand System Design that way I can write code at a higher level, as in writing a Sequential Convoy pattern for a Web Service, just an example of writing code. But how can I write code for a Sequential Convoy pattern if I don't know how to implement System Design. So how am I not writing code... You are not helping. What was the point in a leaving a comment if you didn't clarify what you meant.

Snapey's avatar

What the hell is Sequential Convoy pattern?

martinbean's avatar

@june23 You very much seem to be picking solutions and then looking for problems, rather than looking at problems and solving them. Also known as “premature optimisation”.

JussiMannisto's avatar

So my question is, is it true to start off simple and then add complexity as the system needs it?

Complexity is never good. You should never seek to increase complexity. You should try to solve problems instead, and do it in the most simple and robust way.

So yes, you should start simple.

Side Note - I know that for Portfolio Projects, there should be large complex web applications to impress hiring recruiters, if the competency of the Web Developer can allow of such a thing of course.

Not true at all. Create a project that you can actually complete. There's no point in spending thousands of man-hours building a "large" project with 500 controllers if your app has zero users. You'll learn nothing about scalability or reliability because you're never dealing with scale in the real world. You'd be solving imaginary problems in a vaccuum.

Nobody will be impressed if your unfinished app has hundreds of tables and a thousand CRUD routes. But if you've completed and polished a small usable product, that's great.

Juggling process buzz words takes you no closer to actually learning anything. When you say things like "... CDNs, Queues and Caches are more than likely a requirement ...", it's an indication that your thinking is backwards. Those aren't requirements for their own sake, they are solutions to problems.

BTW, the URL you linked is about building large scale systems. If you start building your own system with 99.9999% availability, load-balancing, distributed database, automatic fail-over, and everything else listed from the get-go, you'll spend a lot of money and never complete the project.

june23's avatar

@jussimannisto Okay I understand that simple is the way to go, but how do I know when I should add another complexity? Is that where the use of tools like New Relic come into play? Like when the Alerts from New Relic are telling me that it found something, I can use a System Design Pattern to solve it? Is that correct?

JussiMannisto's avatar

Okay I understand that simple is the way to go, but how do I know when I should add another complexity?

You should never aim to add complexity. That's the opposite of what software engineering is about. Try to build a system and solve its problems.

And stop worrying about buzzwords and product names. There are thousands of SaaS companies pushing their own products. If you have a problem that their app solves, then by all means spend your money, otherwise there's no point in investing time in it.

I can use a System Design Pattern to solve it? Is that correct?

Use your eyes, brain and fingers. "System Design Pattern" means nothing.

krisi_gjika's avatar

(like AWSs EC2, Cloud Formation, ELB, Auto-Scaling, ECS, EKS, IAM, RDS, S3 if using this Storage, etc...), most of these Services are a requirement not added when needed - all of that is optional tho, you don't need every AWS service to run a server. The cloud saved us so much money we can almost afford the team to run it mentality

Please or to participate in this conversation.