Posts

DOCKER

Image
1) we can make a container with the required setup.  container is nothing but the isolated environment for running the application. Virutal machine vs container:  Hypervisors -- we can manage virtual machine.  dis : Each VM needs a full-blown OS     slow to start Resourse intensive.   Containers : adv : allow multipel apps in isolation   are lightwegiht use OS of the host start quickly need less resources. DOCKER Architecutre: client server architecture.(REST APIs) All the containers shares the same OS. INSTALLING : download from docker hub. docker version -- both for client and server will come. DEV WORKFLOW : 1) take application and add dockerfile to convert into docker application. 2) turns into image by docker. 3) container gets created based on the application needs. 4) we can push the image to docker registry. so that we can use the image from registry to any test/production environment. 5) Docker registry is nothing but like github for docker. Dockerfile

RDBMS vs NOSQL

Image
 RDBMS :          RDBMS stands for Relational Database Management System, example of this RDBMS is mysql, postgresql etc., this database systems is build primarily on relations between tables as of primary key and foreign key. The tables  in this databases are with fixed schema as per we cannot change the no of columns when our application scales up. when you want to use the application for the Transaction involved then RDBMS is the way to go. The primary selling point of the RDBMS is the Transaction.      when we try to scale our application, we can use 2 methods namely  Vertical Scaling Horizontal Scaling  Limitations of Scaling with RDBMS :      When the data is present in only one server, then the scaling in RDBMS is also good but when the application grows we need multiple servers to  store the data, while calling that because of the network I/O and the join statements is  usually a costly query to run. While combining with the other servers it makes the query very slow. That is w

Converting ids into order id in join statement.

Image
  convering id into order_id from mysql in join     I faced a task to show orderId from normal primary key id in mysql DB. I am working on Node js on backend the orderId is the one I need  to send to frontend to display in alphanumeric type. ( eg : SPK00020, SPK00023) 20 and 23 being the primary key of the table in mysql. Approach :            I researched about the ways to generate random number and concat it with the id and lot of ways to do in backend itself but that didn't turn out to be a optimal approach.      After lot of reasearch I finally found a way to generate order id from mysql itself in the same statement I need to use the join statement itself.  LPAD method :  syntax :  LPAD(str,len,padstr); SELECT LPAD(7, 3, 0); +---------------+ | LPAD(7, 3, 0) | +---------------+  | 007 | we can use non-zero values also in this method. SELECT LPAD(7, 10, '.');     +------------------+ | LPAD(7, 10, '.') | +------------------+ | .........7 | +------

how to run laravel project on localhost

Image
  Here today I give you some tips about how to set up a Laravel project on local using XAMPP or WAMP server. Windows Users: Download  XAMPP   or  WAMP   server XAMPP download link :    https://www.apachefriends.org/download.html WAMPP download link :   http://www.wampserver.com/en/#download-wrapper Download  Composer,  for Laravel package control, you can download from the below link, Composer download link:  https://getcomposer.org/download/ When you completed the installation of the composer you can check from your windows CMD , Write  composer hit ENTER  on your cmd which looks like this, Next, Download Git Bash from a given link for running composer,  Git:  https://git-scm.com/downloads Run the  XAMPP  or any server on your system, open  PHPMYADMIN   or database, create the database named with  homestead  type utf8_general_ci. Pull or download the Laravel project from Git. On the Laravel project package, you can see the .enc.example file which is inside your root directory. Rename 

Integerating live streaming in wordpress plugin

Image
  pre- requisite: We have to create a page or create a space where we want to live stream the events.   wordpress plugin: wpStream → First we have to register and sign in using our credentials. We can have 2 options while creating channels for streaming. 1) free live streaming 2) pay per view channels from the channel option from channel option in WP stream. then after editing the page, we can add Wp player in the page and then adding the product key while adding it (Product key is created while registering with wp stream) Then we can use either external broadcaster or go live from browser. External broadcaster: OBC streaming – free open source broadcasting software that we can include in our wordpress page. We have to add server and stream key from wp stream to OBC streaming software, once it is done we can stream from the OBC streaming.

Launching AWS hosting services.

Image
Hoisting SAAS code from AWS single cloud storage for multiple users     Steps to upload source codes to aws :   We have to choose the required container for our application based on the use cases to upload the source codes. Then we have to make that source code public to all the other applications that are running on our AWS account within the same region. This S3 bucket can be used for more static sides of the application we are launching( images, blogs, videos) which we can be rendered fast from these buckets. Steps to start a instance using AWS:   Instances are nothing but virtual servers that we can use to run our application. These servers are configurable based on our needs. Scalable, Reliable and cost effective as we only have to pay as we use. We can setup the server with the required configurations for CPUs and storage needs from AWS EC2. We have to create instances in the same region as the codes are stored in a bucket. While creating an instance, we will have