Tuesday, April 30, 2019

A guide to NoSQL Databases

In this blog, I'm going to talk about NoSQL databases. Actually, it is nothing but also likes any other databases which we have been using so far. Some people may think this term stands for 'No SQL' but actually, it stands for 'Not only SQL'. It is quite possible to use. It is a Non-Relational database which means no tables.



NoSQL databases are known for working well with big data as well as real-time web applications.
There are also multiple types of NoSQL Databases.
  1. Document databases [MongoDB, CouchDB]
  2. Column databases [Apache Cassandra]
  3. Key-value databases [Redis, Couchbase Server]
  4. Cache Systems [ Redis, Memcache]
  5. Graph databases [Neo4J]

What is Big Data?


It describes data sets that are become so large that traditional methods of storage and processing are starting to become inadequate. There's been a massive increase in data volume within the last decade and itis mostly due to huge social networks like facebook, twitter, search engines like Google and other websites and applications that store a ton of data. If we think every facebook profile, every post in everyone's feed, that's all stored somewhere and that's just a huge amount of data and some of the challenges with this data is storing, analyzing and capturing. So this is where NoSQL comes in.

Advantages of NoSQL over RDBMS


  • Handles Big Data
  • Data models - No predefined schema( It is actually flexible)
  • Data structure - NoSQL handles unstructured data
  • Cheaper to manage
  • Scaling - Scale out / horizontal scaling
Advantages of RDBMS over NoSQL

  • Better for relational data
  • Normalization
  • Well know the language(SQL)
  • Data integrity 
  • ACID Compliance (Atomicity, Consistency, Isolation, Durability)




Friday, April 19, 2019

What is Docker?



Docker is mainly a software development platform and a kind of virtualization technology that makes it easy for us to develop and deploy apps inside of neatly packaged virtual containerized environments. Meaning apps run the same, no matter where they are of what machine they are running on. 
Docker containers can deploy to just about any machine without any compatibility issues. So our software says system agnostic, making software simpler to use, less work to develop and easy to maintain and deploy. 

These containers running on our machine or server act like little microcomputers with very specific jobs, each with their own operating system and their own isolated CPU processes, Memory and network resources. Because of this, they can be easily added, removed, stopped and started again without affecting each other of the host machine.


Containers usually run one specific task such as a MySQL database or a NodeJS application and then networked together and potentially scaled. A developer will usually start by accessing the DockerHub, an online cloud repository of Docker containers and pull one containing a pre-configured environment for their specific programming language, such as Ruby or NodeJS with all of the files and frameworks needed to get started. Home users can experience Docker as well, using containers for popular apps like Plex media server, NextCloud and many other opensource apps and tools.

Docker is a form of virtualization but unlike virtual machines, the resources are shared directly with the host. This allows users to run many Docker containers where users may only be able to run a few virtual machines.
 A virtual machine has to quarantine off a set of resources, HDD space, memory and processing power, emulate hardware and boot an entire operating system. Then the VM communicates with the host computer via a translator application running on the host operating system called a ‘Hypervisor’.
Docker communicates natively with the system kernel, bypassing the middleman on Linux machines and even Windows 10 and Windows Server 2016 and above. This means users can run any version of Linux in a container and it will run natively.
Not only that, Docker uses less disk space too as it is able to reuse files efficiently by using a layered file system. If you have multiple docker images using the same base image, for instance, Docker will only keep a single copy of the files needed and share them with each container.

Tuesday, April 9, 2019

Difference between a framework and a library


Actually, this gonna be asked in a variety of programming interviews as well. Many time people try to just understand what is a library and then try to understand what is a framework. We need to understand both things side by side. When we try to find out definitions for both things, we can find quite a common definition which is a collection of library is a framework. This can be true or cannot be always true. So we need to understand both sides by side.

Here I take two examples ;
First Example:
                      Library and framework, both of them are dependent on the rule. One is your home and another one is just like your school or your university. We make an analogy here that your school is your framework and your home is just like your library. The point is when you have less number of rules, it is more likely that it is going to be possibly a library and when there are a number of rules then there are higher chances that it's going to be a framework. For example, in our home, we just throw off our t-shirts wherever you like. but when we go to school or university, there are fixed places where we put our bags. Like that, in school, we are bounded by more rules while on the other hand at home, there is less number of rules.

                      So the library is moreover like our home, it's like whatever I want to do, I'm gonna be doing it and similarly on the framework, it is more bounded by the rules that we are only bounded to do certain kind of things.

Second Example:
                      The second example is moreover code-oriented and the people who are associated with even little bit kind of the code even like simple Javascript or jQuery will be able to understand it. In a simple library, a collection of codes, some functions or all these such things are being packed together and is being used over and over, that's basically our library now. The difference here is in a library we are making a call to a library, but in the framework, we are calling to our code.



My Experience in AF Final Project

AF final project!!! Actually, I was not ready to do a project. I had to go to work daily and study for final exams. I didn't even kno...