# Topic covered
* System Design Introduction
* Client - Server Architecture
* Monolith & Microservices
* gRPC
* Network Protocols
* Proxies
1.1 System Design Introduction
System Design is the process of identifying, creating, and designing
systems that meet a company’s or organization’s specific objectives and expectations.
Systems design is about system’s analysis
, architectural patterns
, APIs
, design patterns
, and gluing it all together
- It includes some objectives like:
Low costs
and maintenance efforts- Performance,
Scalability
- Latency, Throughput
Availability
, Consistency
Components of System Design
- Logical Entities
- Data
- Databases
- Cache
- Tangible Entities(Technology)
- Text, Video, images
- MySql, MongoDB
- Redis, MemeCache
1.2 Client-Server Architecture
Depending on where the presentation, logic and data
resides, system architecture can be divided as follows:
1-Tier Architecture or Single Tier
It is the simplest
one as it is equivalent to running the application on the personal computer
.
All the required components for an application to ``run are on a single server.
Presentation layer, Business logic layer, and data layer are all located on a single machine
.
2-Tier Architecture
It is like Client-Server architecture
, where communication takes place between client and server.
In this type of software architecture, the presentation layer
or user interface layer runs on the
client side while dataset layer
gets executed and stored on server side.
3-Tier Architecture
App is partitioned into 3 logical components
Client machine communicates with App server, and App server communicated with DB system to access data.
Types of clients
- Thin Client
Less processing
is done on client side- E-Commerce sites, Streaming applications
- Thick Client
High processing
is done on client side- Gaming Apps, Video editing software
1.3 Monolith & Microservices
https://www.atlassian.com/microservices/microservices-architecture/microservices-vs-monolith
A monolithic application is built as a single unified unit while a microservices architecture is a collection of smaller, independently deployable services.
https://www.youtube.com/watch?v=xflakXiwkD0
Monolithic
- Pros
Easy development
: When an application is built withone code base
, it is easier to developEasy deployment
:One executable file
or directory makes deployment easier.Easy debugging
: Withall code located in one place
, it’s easier to follow a request and find an issue.
- Cons:
- Scalability issue -
can’t scale individual components
- Deployment: Small changes,
redeployment of the entire monolith
- Reliability: An error in any module, it could
affect the entire application
- Scalability issue -
Microservices
- Pros
- High reliability
- Continuous deployment
- Flexible scaling
- Cons
Exponential infrastructure costs
1.4 gRPC
RPC: https://www.geeksforgeeks.org/remote-procedure-call-rpc-in-operating-system/
gRPC: https://www.freecodecamp.org/news/what-is-grpc-protocol-buffers-stream-architecture/
Local Procedure Call is a procedure call which occurs within a process and on the same system.
Remote Procedure Call enable one machine to invoke some code on another machine,
gRPC is an popular implementation of RPC. gRPC is an open-source Remote Procedure call created in 2016, It was an re-write of RPC
It has been adopted by many organization like Google, Netflix, Cisco to connect large number of microservices
running within and distributed data-centers.
- Cross-support in many programming languages
- Has high performance - it
used HTTP/2
protocol
1.5 Network Protocols
https://www.cloudflare.com/learning/network-layer/what-is-a-protocol/
A network protocol is a set of rules that determine how data is transmitted
between different devices in the same network.
Network protocols enable devices to communicate with each other regardless of their internal processes, structure or design.
There are different types of network protocols for different purposes, such as TCP, UDP, HTTP, HTTPS, TLS/SSL, FTP, SMTP, etc.
/tags/protocols – read more