In this post, we are trying to cover where to start for your System Design even it is a very small system.
During initial few years of a developer, they are involved in only coding of a small component or fixing a bug. Then all of a sudden you get assigned to design a complete system on your own.
Or you start looking out for a job and get stuck while attending your first few design interviews.
The mantra to overcome this challenge is very simple and you can follow below basic steps which you usually heard a lot of times from your seniors. Just try to remember Software Development Life Cycles...
Step 1: First step is to make the requirement clarifications. As a developer we get a bad habit of skipping the requirement which really blocks us sometime while coding. We need to go back to the PMs and leads to clarify different use cases for a same component. The reason of this is lacking the step for requirement clarification.
There are 2 types of requirement, one is functional clarification which tells you how to use your system? You can draw a flow chart of this functionalities.
The other requirement is to write the non functional requirement of the system. Few major things that drives the future of y0our project are:-
1. Availability
2. Number of user to be supported/Number of requests per second
3. Latency of each functionality
4. Sync vs Async
5. Storage/Compute/Network requirements
6. Redundancy/Failures to tolerate
Step 1.5: Yes usually we don't have a separate step for this but it is critical for the systems which is having a legacy system and you want to enhance some the features of it. In that case, it is very crucial for you to dive deep on the legacy system, understand how it works and then go for this implementation. If you avoid this step, then it may so happen that your system cause a regression and which impacts your overall project timeline.
Step 2: If all of the information required for your project is clear to you then you should move to this steps. Otherwise you should keep going to PMs, seniors to clarify on the requirement. You start with identifying the core components of your entire system. Don't focus on the integration at this point but make it as modular as you can. Try to use your flowchart come with the components.
One you are done with identifying all of your components, you try to use flow chart and start integrating with different components for each use cases.
While designing the components you can also keep in mind what minimal data are required to communicate with different components. Try to keep data locally with your component.
You should not think at all how different methods should be and how implementation can be done in this step. As a developer you try to think from that perspective and you start making mistakes there.
Step3: In this step you are allowed to think how each component can be designed. Since you have identified all your components and integration points you can use those integration points and how to implement those.
You need to keep in mind that, all parameters you are trying to use, make it generic enough and so that it can extended anytime in future. it may look very ugly to keep one or two variables for a class but thats okay since it would enable to extend your component in future.
During initial few years of a developer, they are involved in only coding of a small component or fixing a bug. Then all of a sudden you get assigned to design a complete system on your own.
Or you start looking out for a job and get stuck while attending your first few design interviews.
The mantra to overcome this challenge is very simple and you can follow below basic steps which you usually heard a lot of times from your seniors. Just try to remember Software Development Life Cycles...
Step 1: First step is to make the requirement clarifications. As a developer we get a bad habit of skipping the requirement which really blocks us sometime while coding. We need to go back to the PMs and leads to clarify different use cases for a same component. The reason of this is lacking the step for requirement clarification.
There are 2 types of requirement, one is functional clarification which tells you how to use your system? You can draw a flow chart of this functionalities.
The other requirement is to write the non functional requirement of the system. Few major things that drives the future of y0our project are:-
1. Availability
2. Number of user to be supported/Number of requests per second
3. Latency of each functionality
4. Sync vs Async
5. Storage/Compute/Network requirements
6. Redundancy/Failures to tolerate
Step 1.5: Yes usually we don't have a separate step for this but it is critical for the systems which is having a legacy system and you want to enhance some the features of it. In that case, it is very crucial for you to dive deep on the legacy system, understand how it works and then go for this implementation. If you avoid this step, then it may so happen that your system cause a regression and which impacts your overall project timeline.
Step 2: If all of the information required for your project is clear to you then you should move to this steps. Otherwise you should keep going to PMs, seniors to clarify on the requirement. You start with identifying the core components of your entire system. Don't focus on the integration at this point but make it as modular as you can. Try to use your flowchart come with the components.
One you are done with identifying all of your components, you try to use flow chart and start integrating with different components for each use cases.
While designing the components you can also keep in mind what minimal data are required to communicate with different components. Try to keep data locally with your component.
You should not think at all how different methods should be and how implementation can be done in this step. As a developer you try to think from that perspective and you start making mistakes there.
Step3: In this step you are allowed to think how each component can be designed. Since you have identified all your components and integration points you can use those integration points and how to implement those.
You need to keep in mind that, all parameters you are trying to use, make it generic enough and so that it can extended anytime in future. it may look very ugly to keep one or two variables for a class but thats okay since it would enable to extend your component in future.