Posts

Showing posts from December, 2023

Asynchronous Communication

Image
  Asynchronous Communication (Non Blocking Call) 1. Time Delay 2. Work from home 3. Youtube video's comment section 4.When computation takes long time; Flipkart page open but processing takes time 5. Scalability of application ; It doesn't wait for notification from another user placing order 6. Avoid Cascading failure ; At times if with response server becomes overload ,it is made asynchronous inorder to let server work on it. 

Synchronous Communication

Image
  Synchronous Communication (Blocking Call) => Handshake 1. Real Time 2. 1 to 1 communication 3. In person / zoom meeting 4. Quick Reply to question

Normalization

Image
  Normalization: Putting data in multiple tables to avoid redundancy. It combines data & organises it in a single table.

Polyglot Persistence

Image
  Polyglot Persistence: Application requires multiples types of database Here multiple types of DB is used to perform operation in application. ***if you store data in disk, it will persist even if database server goes down. ***if you write data in memory, it will not persist as database server goes down.

Examples of NoSQL Database

Image
 Google Maps: Graph DB Linkedln: : GraphDB E-commerce Cart : Key Value DB Machine Learning : Columnar DB

Types of NoSQL Database

Image
  NoSQL Database: It stands for "non-SQL" database / non-relational database. NoSQL is the umbrella term comprising of four different types of DB. Key Value DB Generally used for caching Example: Redis   Document DB Bring best of RDBMS & NoSQL It comprises of relational concept for RDBMS & dynamic schemas and horizontal scaling from NoSQL databases. Example: MongoDB   Columnar DB Columns are stored together instead of rows. It is used mainly in data analysis. Example: Cassandra   Graph DB It represent & stores entities in form of graph data structure. It is mainly used for social network. Example: neo4j

RDBMS

Image
 RDBMS  Software That performs data operation on relational database Operations Store, manage, query & retrieve data Tables Data is stored in the form of tables Foreign Key Relation between two tables is represented by foreign keys Advantages : No data redundancy & inconsistency Different User refer to same table, avoid inconsistency Data Concurrency A locking system is provided by RDBMS to prevent abnormalities from occurring **Until 1 st transaction get over, 2 nd transaction is not performed   Data Searching Built in searching capabilities **Using queries you can search Data Integrity Constraint restricting allow it to follow according to rules Problem : 1. Rigid Schema : We cannot add new column in a table 2. High Cost : 3. Scalability Issues : Horizontal Scaling / Sharding is very difficult.

File Based Storage System

Image
  File Based Storage System  A file based storage system is a database management system where data is store in form of files. Challenges: 1. Data Redundancy - Update/ Delete Anomaly leads to data inconsistency. 2. Poor Security - Some data is present in the system which causes possibility of data breaches by                                              unauthorized users. 3. Slow - Speed is slow . Due to which data retrieval is not very efficient.

Load Balancing Algorithm

Image
  Round Robin - Rotation fashion Weighted Round Robin - It is similar to round robin when server are of different capacities. IP Hash Algorithm - The server have almost equal capacity & hash function(Input is source IP). It is used for random  or unbiased distribution of requests to the nodes. Source IP Hash - It combines the server & client's source & destination's IP addresses to produce hash key. Least connection algorithm - Clients requests are distributed to application server with least number of active connections at time client request is received. Least response time - Request is distributed based on server which has least response time.

Load Balancing

Image
Load Balancing It is the process of efficient distribution of network traffic across all nodes in a distributed system. Role of Load Balancer 1. The Load distribution is equal over every node. 2. Health Check ( if node is not operational ,request is passed to that node that is up & running) 3. Load Balancer ensure high scalability, high throughput & high availability 

Replication

Image
  Replication = Redundancy + Synchronization It involves redundancy , but involves copying of data from 1 node to another or synchronization of states between nodes. Active Redundancy Data in all the  server are same & in synchronization. Passive Redundancy Every Read-Write => Done By Master If master goes down ,then one of the slave becomes master Master-Slave Replication can be either synchronous/ asynchronous  Difference is simply timing of propagation of changes. If changes are made to master & slave at the same time , it is synchronous If changes are queued up  & written later , it is asynchronous