System designing is process of gathering all requirements of problems and convert to design(charts, documents) which can be developed easily, affordable, scalable and user friendly. Here requirements could be functional and non-functional.
1. Non-Functional Requirement(NFR): It directly impacts to quality of system. Scalability, reliability, manageability and data integrity etc are NFRs. Most of the NFR's fulfillment depends on resources and technologies one chooses for the development of the system also.Not all requirements are necessary to address while designing system but it is best to address as much as possible NFRs for good quality and future of system(software).
2. Functional Requirement(FR): Requirements that system must offers is FRs. Operations that system performs, data transactions, authentication and authorization, data persistence etc. are FRs.
This post includes both the requirements, how we can address requirements while designing system.
1. Gather as much as possible requirements in details:
Let's take an example, If we want to build system which offers short videos.
Here are some requirements one should think of while designing application like this.
- Creator should able to post videos and user can be able to view, like, comment and share the video.
- Targeted users [age, gender etc.]
- Video length.
- Number of users and active users
- Resolutions of video
- Maximum delay between posting video and available for view
- Viewer and Creator ratio [it will be approx. only]
- User's Data
and more...
2. System Architecture:
One can follow monolith architecture to build system which will have single entry point for whole system. let say some failure occurs in specific functionality, whole system has to be down cause all the components are tightly coupled. One can follow micro service architecture, it requires dedicated team and resources to develop and maintain different services [Totally depends on service].
3. Technology & Resource Selection:
One can choose technology stack as per system architecture, man resource or money one have to build system. Selecting cloud provider is also an important as how much system is reliable and efficient, cost of various services to setup and maintain all depend on cloud service. Continuing above example, If we choose micro service architecture, our technology stack should have support of cloud provider that we are using otherwise we needs to put extra efforts in terms of man power or money which leads over costing or timing. Servers to host system is also an important to take care. security, reliability and maintenance these are basic things to think before choosing servers.
4. Logic [Flowchart]:
Logic is a root of functionality. While designing system, we should have flow of the whole system(functionality) cause optimal logic can save lots of man power and time. Good Logic makes development simpler, saves unnecessary resources to being setup or maintain [resources could be micro-services, services provided by cloud, etc...].
5. Data:
Data is most important thing today. We should have knowledge of how much size of data will be collected from single user to size of total data will be collected on daily bases. Identifying Type of data will help us to choose database we require and it helps to reduce overall latency[NFR] of system and maintenance of data. In short video application, we will have user's data[Relational data], Video metadata[Unstructured data], Video[Unstructured data]. here we can use different database management systems because we have 3 different kind of data. let's say we choose MySQL for relational data which is tried and tested database for huge amount of data. MongoDB for unstructured data like comments and all. To store video we can use cloud storage which will be reliable.
6. Data Processing:
Data Processing is key thing in system design. To make system user friendly data processing performs big roll after UI/UX design. let's say we want total 5 resolution per video and that requires video processing so that video available in each resolution and storing each videos and serving to user based on resolution.
Logic 1: Video uploaded by user will be converted in first resolution then after 2nd 3rd, 4th and 5th. It does not required additional resources[memory] to process but video will required time to available in each resolution.
Logic 2: Video will be divided into chunks, each chunks will be converted into each resolutions parallelly. After that chunks of same resolution will be merged and stored. It requires more memory and takes much lesser time than Logic 1.
Both the logic is for same functionality but with different approach so we can choose Logic as per requirements.
7. Interaction:
There are many protocols present through which communication occurs between 2 endpoints like HTTP, HTTPS, FTP etc. we have to choose protocols wisely so that communication does not become costly.
Perfect system design covers all the Requirements
Subscribe by Email
Follow Updates Articles from This Blog via Email
5 Comments
Informative logbook
Reply DeleteMany things I don't know about system design thanks you denes for this knowledge.
Reply DeleteOne can understand easily.Great Denesπ
Reply DeletePerfect system design covers all the Requirements ππ
Reply DeleteGreat work denes bhai, found it useful π
Reply DeletePlease comment here...