System Design
System design (considering the focus to the software systems) can be termed as a process which deals with the understanding of the requirements to the actual working system. It includes various steps to achieve this, but the most important understanding required is about the design, many things need to be predefined anticipating the future or the output of the system. System design needs design thinking and as a matter of fact it must deal with knowing the upcoming problems anticipating them well before they actually appear and solving them.
There are certain inputs to a system and certain outputs are expected from it. For example, the easiest example we can consider is about Instagram, so considering Instagram as a system. Inputs to these systems will be the photos, videos, reels which an individual make and feed onto this system i.e. it deals with the data a lot and lots of data. It also includes the identification of the users. What would its output be? first is they should never be a downtime in this application. Second would be the best user experience. Being a social media, it should have something which is prone to cyber-attacks, the systems should well in advance identify the threats and handle it. All of its features and functions should work properly 24x7. This is just a basic brief design thought process before designing a system. There are N number of factors which have to be considered before actual system is designed and implemented.
Let us now consider the important topics under the system
design:
Requirement and Analysis:
System requirements are the one that describe the
functionality as a whole intact, that would satisfy the system needs. A clear, transparent,
and concise requirement formulation is a must step. Lots of analysis and
experience leads to the proper formulation of the system requirement
specification. Further we have two sub-classes in this first one being the
Functional requirements and the second one being the Non-functional requirements.
Non-functional requirements usually deal with the performance parameters, like
robustness, availability etc. also the aspects considered for the future development
and future scaling.
A requirement has state i.e. derived, translated or satisfied
and state of agreement being the proposed, approved or cancelled. Building on
these requirements there are also more characteristics as Necessary,
appropriate, complete etc. There requirement analysis is done using the Use case
diagrams, class diagrams and the timing diagram. Now, the outcome of the functional
requirement would be a well-defined system or components of the system,
architecture. Outcome of the non-functional requirement would be choice of the
resources, number of resources which further are useful for the capacity
estimation of the system. It also includes the Technology choices, Resource
utilization, Data storages or hardware to fulfill the requirements.
Components of the system design:
The
components of system design can be divided into 2 parts--> 1] logical
entities 2] Tangible entities(technologies)
1]
Logical Entities:
All
the systems are built of data. Most important part of system. How do we store
this data? So, every system has a database. Databases are core of any system.
How do users’ access/communicate the databases?
Users--->Applications---->Servers/Databases,
Applications are the one from which users can access the databases. These
applications are the logical entities that makes up for the access for the
systems
Let
us consider a basic Web application example for the logical Entities:
1]
Tangible Entities:
These entities are more important with
respect to the technology. The underlying technology. So, if we consider
Instagram application as mentioned above then if Data is the logical entity
then the images, texts and videos would formulate the tangible entities. If
Database is logical entity then the MongoDB, MySQL, Cassandra would be
technology, i.e. tangible. If applications are the logical entities then the
Java, Python, Golang, React etc. would be the tangible entities. If the Cache
is the logical entity, then the Radis memeCache would be the tangible entities.
If message queue is logical entity then the Kafka, RabbitMQ are the tangible
entity. If the Infrastructure is the Logical entity then the AWS, Azure, Google
cloud are tangible entities. Communication being the logical entity, the API’s
RPC’s would be tangible.
Client Server architecture:
Client: A software
that sends request to the server from the user.
Server: A software
that receives the request and processes the request from the client.
The process: Client requests the data from the server, load balancer routes the
request to the appropriate server. Server processes the client request. Server queries
appropriate database, database returns the queried data back to the server. Finally,
server processes the data and sends the data back to the client.
These formulate the base of the
components of any software system design. We have considered the Web application
as our system.
Two-Tier
Database Architecture –
In two-tier, the application logic is either buried inside the User Interface
on the client or within the database on the server (or both). With two-tier
client/server architectures, the user system interface is usually located in
the user’s desktop environment and the database management services are usually
in a server that is a more powerful machine that services many clients.
Three-Tier
Database Architecture –
In three-tier, the application logic or process lives in the middle-tier, it is
separated from the data and the user interface. Three-tier systems are more
scalable, robust and flexible. In addition, they can integrate data from
multiple sources. In the three-tier architecture, a middle tier was added
between the user system interface client environment and the database
management server environment. There are a variety of ways of implementing this
middle tier, such as transaction processing monitors, message servers, or
application servers.
Distributed
systems:
A system with multiple components located
on different machines that communicate and coordinate actions in order to
appear as a single coherent system to the end-user. Distributed
Systems are important since they maintain the ability to cope up in terms of
high risks, thus making a system fault tolerant. Above mentioned architectures
i.e. Two-tier and three-tier (also n-tier) are part of this distributed
systems.
Load Balancers:
We see the load balancers in the diagram
above, Load Balancing is a method to distribute or balance the load
evenly on all the machines, just like it sounds.
A load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance. If a single server goes down, the load balancer redirects traffic to the remaining online servers. When a new server is added to the server group, the load balancer automatically starts to send requests to it.
- Distributes client requests or network load efficiently across
multiple servers
- Ensures high availability and reliability by sending requests
only to servers that are online
- Provides the flexibility to add or subtract servers as demand
dictates
Proxies:
A proxy is something which can be thought of an agent. For example,
you are studying in a college and you are not attending a lecture, but you
still need the attendance for certain class as it is mandatory (though a bad
example). You ask your friend to proxy your attendance, he marks present
instead of you. This type attendance would be termed as proxy attendance where
someone else does on behalf of you. Similar is the way in the web applications,
the proxies are the one which can be present on the client side and on the
server side. The IP address of the
client is hidden in the case of the forward proxy and the IP address of the
server is hidden in the case of reverse proxy. Savior for the cyber security, Balanced
traffic and anonymity.
Scalability:
Types of scaling:
- Vertical
Scaling: Buy a larger machine with high capabilities
- Horizontal
Scaling: Buy a high number of machines
These are basically very important aspect of the cloud
computing as the scaling is made easier by the cloud computing like AWS, Azure
providing the IaaS-> infrastructure as a service.
Message queues and decoupling:
A decoupled system is achieved when two
or more systems are able to communicate without being connected. The systems
can remain completely autonomous and unaware of other functions. Decoupling is
often a sign of a computer system that is well structured because it is easier
to maintain. If one process in a decoupled system fails to process messages
from the queue, other messages can still be added to the queue and be processed
when the system has recovered.
A message queue will keep the processes
in your application separate and independent of each other. The first process
will never need to invoke another process, post notifications to another
process, or follow the process flow of the other processes. It can just put the
message in the queue and then continue processing.
Another aspect would be the logging and metrics and
extensibility. Logging is usually done when a system is in fault or breakdown
or certain part of the system is broken down. The logs direct us by giving the
data about what were the resources, used when they were used, and at what time
were they used, all the details before and after the fault. Anything suspicious
or anything fishy can be caught if the system logs are taken and understood
properly.
Metrics also formulate an important topic basically they can
be regarded as the readings taken for the checking of the health of the system.
The metrics give all the important notices during the monitoring of the system
at regular intervals. A system should have many important aspects as it should
be robust, should be aligned on the architecture and requirements. It should
handle the traffic properly, it should be robust as well as quick in the response,
shouldn’t crash. To take care of all the aspects there is also one more thing
which is the extensibility. Any system is not standstill, always there are
updates in the systems, these are also needed to make the system better than
yesterday, scale it, grow with it and still be well functioning. This takes us
to the new topic viz. Extensibility.
A system should be extensible i.e. it should easily extend with
the new requirements and design. A good architecture is one which has a scope
for extensibility. It should never happen that a system is growing, and its
performance deteriorates. More complex topics would come in play when there is
more implementation of the system.
Many more such topics are present in the System design, we
will understand some of them later.






Comments
Post a Comment