Posts

Node.JS

Image
  Node.JS A runtime environment for executing JavaScript code is open source for developing server-side and networking application Features of Node.JS Asynchronous and Event-Driven The primary organizational concept of Node is to eliminate blocking processes by using event-driven, asynchronous I/O. This design aids developers in shaping data and increasing capacity. Node allows you to create and organize lightweight, self-contained, and share-nothing processes that communicate through callbacks and synchronize with a predetermined event loop. Single-Threaded but Highly Scalable, data-intensive, real-time Node.js is single-threaded but in the background it uses multiple threads to execute asynchronous code This feature because of the non-blocking asynchronous nature of node Has single thread is used to handle multiple requests. It is behind the scene of non-blocking and asynchronous concept   Very Fast Node JS library is very fast in code execution ...

NoSQL

Image
NoSQL It is a family of databases. NoSQL is newer than SQL Most SQL databases are vertically scalable, which means that you can increase the load on a single server by increasing components like RAM, SSD, or CPU. In contrast, NoSQL databases are horizontally scalable, which means that they can handle increased traffic simply by adding more servers to the database The vertically scalable database is adding more power to existing machine A horizontally scalable database is adding more machines to existing network Replication is a crucial part of any database system. It is providing availability and disaster recovery. Mongo DB replication architecture is based on a replica set.it is inattention to the single point of failure     Mongo DB Mongo DB is a document-oriented NoSQL database which means it stores data in JSON-like documents. It is more powerful than the traditional row/column module It is a javaScript base query language It supports aggregation and ...

Callbacks and Promises

Image
    Callbacks   In JavaScript, functions are objects. We can pass object as parameter so we can also pass functions as parameters to other functions and call them inside the outer functions. function hello () {       conole.log(“hello world”) ; }   function print ( callback ) {            //other codes are running here          //call hello function, the   all execution finished from this line     callback (); }   Print(hello()); New learn : object can pass as a parameter to a function this mean at function declaration time object was inserted as parameter to function and it can be used inside the outer function. In this example “ createPost ” is a function that is takes “post” as object parameter then at the time of calling argument pass as object into function declaration and it is inserted to the post arr...

How does JavaScript .prototype work?

Image
How does JavaScript .prototype work? understanding how prototype working for function Prototype object in function: We can create many instances, all instances will have name and age property but address property will not be there inside instances. It will be there inside  prototype object   so that  address we can access from any instance. function have "prototype" property as hidden property that will point to the prototype object and instance also have "__proto__" property as hidden property that also will be point to the same prototype object.            f.prototype.address === fobj.__proto__.address // this will be true, those are pointing same place   understanding how prototype working for class Prototype object in class: The display method is crated inside the class but it is located inside Prototype object  so we can access the display method from both instances. Lisko substitution principle Lisko substitution...