Introduction to System Design
What is System Design?
System Design is the core concept behind the design of any distributed systems. System Design is defined as a process of creating an architecture for different components, interfaces, and modules of the system and providing corresponding data helpful in implementing such elements in systems.
Objectives of System Design
- Practicality: We need a system that should be targeting the set of audiences(users) corresponding to which they are designing.
- Accuracy: System should be designed in such a way it fulfills functional and non-functional requirements.
- Completeness: System design should meet all user requirements.
- Efficient: The system design should not overuse resources nor result in low throughput (output) and less response time(latency).
- Reliability: The system designed should be in proximity to a failure-free environment for a certain period of time.
- Optimization: Time and space are just likely what we do for code chunks for individual components to work in a system.
- Scalable(flexibility): System design should be adaptable with time as user needs will keep on changing on time.
System Development Life Cycle
Any system doesn’t finished in a single day or in a single step. For every system design, there are a series of steps/phases/stages that takes place to get a strong system. This series is defined as System Development Life Cycle (SDLC).
The stages in System Development Life Cycle are as follows:
- Plan
- Analyse
- Design
- Develop
- Implement
- Maintain
Components of System Design
Below are some of the major components of the System Design.
- Load balancers: Most crucial component for scalability, availability, and performance measures for systems.
- Key Value Stores: It is a storage system similar to
Hashtable
where key-value stores are distributed hash tables. - Blob Storage: Blob stands for binary large objects, as the name suggests is storage for unstructured data such as a video.
- Databases: It is an organized collection of data so that they can be easily accessed and modified.
- Rate Limiters: These sets the maximum number of requests a service can fulfill.
- Monitoring System: These are basically software where system administrator monitor infrastructures such as bandwidth, CPU, routers, switches, etc.
- Distributed System Messaging Queue: Transaction medium between producers and consumers.
- Distributed Unique ID generator: In the case of large distributed systems, multiple tasks are occurring concurrently. In order to distinguish between them, assign a tag corresponding to every event.
- Distributed Search: Crucial information that visitors will search is put into the search bar.
- Distributed Logging Services: Tracing sequences of events from end to end.
- Distributed Task Scheduler: Computational resources such as CPU, memory, storage, etc.
System Architecture
Software architecture is a way in which we define how the components of a design are depicted.
Different types of Software Architecture Patterns include:
- Layered Pattern
- Client-Server Pattern
- Event-Driven Pattern
- Microkernel Pattern
- Microservices Pattern
Modularity and Interfaces
- Modular design refers to a method/procedure for product design involving integrating or combining smaller, independent elements to create a finished product.
A large product (like a car) can be separated into smaller, simpler components that are separately developed and produced using the modular design approach. The ultimate product is created by integrating (or assembling) each of these component parts. - Interfaces In System Design is the area where users interact. It consists of the screen displays that facilitate system navigation, the screens and forms that gather data, and the system’s reports.
Scaling of an Existing System
It’s now a must for every developer to design and create a scalable system. If the system is not scalable, with the increase in users, it is very likely that the system will crash. Hence the concept of scaling comes into play.
- Vertical scaling: Simply upgrade specifications of existing system, like upgrading the RAM and disk size and many other components. Note that here we are not caring about the scalability and availability of network bandwidth. Here as per evolution we are working over the availability factor only considering scalability will be maintained. This is known as vertical scaling.
- Horizontal Scaling: As availability measures do have a limitation, we need multiple systems. In order to scale up, we need to create a distributed system by connecting multiple systems together and this is known as horizontal scaling.
How Data Flows Between System
Data Flow Diagrams or DFDs is defined as a graphical representation of the flow of data through information. DFD is designed to show how a system is divided into smaller portions and to highlight the flow of data between these parts.
Here’s an example to demonstrate the Data Flow Diagram’s basic structure:
Components of a DFD:
- Open Rectangle: A data store or data at rest/temporary repository of data.
- Arrow: Identifies data flow and acts as a pipeline throughwhich information flows.
- Circle/Bubble: Represents a process that transforms incoming data flow into outgoing data.
- Square: Defines the source of destination of data.
Advantages of System Design
The greatest advantage of system design is inculcating awareness and creativity for developers via well-defined API protocols gateways, networking and databases.
Some of the major advantages of System Design include:
- Reduces the design cost of a product
- Speedy software development process
- Saves overall time in SDLC
- Improves efficiency and consistency
- Saves resources