Posts

OOPs Concept: Interface

Image
  Interface

OOPs Concept: Polymorphism

Image
 Polymorphism :      poly=> many       morphism =>forms

OOPs Concept: Inheritance

Image
 Inheritance Process in which child class inherits the property of Parents class. Super Class/Base Class /Parent Class The class whose features are inherited. Sub Class/ Derived Class / Child Class The class which inherits other class.

OOPs Concept: Abstraction

Image
  Abstraction Hiding => Implementation Showing => Features On ATM Screen , Users see only option , here user doesn't know internal process. Example : ATM Screen  Withdraw  Balance Check

OOPs Concept: Encapsulation

Image
  Encapsulation It is process of wrapping up data member & methods together into a single unit. Every Java Class is an example of encapsulation. Two ways of achieving Encapsulation:                  a) Declaring the instance variable : as private                b)  Provide public setter & getter method

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

Redundancy

Image
  Redundancy It is duplication of nodes or components so that when a node or components fails duplicate node is available to service customers. Active Redundancy When each unit is operating/active and responding to the action. Multiple loads are connected to load balancer & each unit receives an equal load. Passive Redundancy When 1 node is active/operational and the other is not responding. During the breakdown of active node , passive node maintains availability by becoming the active node.

Caching Eviction Techniques

Image
 Caching Eviction Techniques 1. LRU - Least Recently Used : It delete the cache not used in a very long time. 2. MRU - Most Recently Used : It delete the cache most recently used in a very long time. 3. LFU - Least Frequently Used : It delete the cache space among all which is least used 4. LIFO - Last In First Out :                                       5. FIFO - First In First Out : 6. RR - Random Replacement : 

Caching

Image
 Caching For Example : Instagram profile page which is a static information ,retrieve same information by clicking 10 times , for 1st time its retrieved from server ,for getting information next time onwards it can be store in cache ,inorder to reduce latency for getting response in lesser time.                                                                      Instagram profile page Data Retrieval Two Types: Memory / Locale Cache : Example: Memcached When to be use ? 1. Read Intensive : 2. Static Contents Distributed / Extended Cache: Example: Redis Two Types: 1. Application Server Cache : DB query response query server in cache. 2. CDN

Scalability

Image
  Scalability When number of requests increases ,it determines strength of system is up or down, response time should decrease or it should be maintained. Vertical Scalability 1 machine having 1 server with high configuration , RAM we can increase , DB Hard Disk we can increase. PROS                                                                  Easy Implementation                                                                                                                                    ...