Posts

Database Internel Architecture: SQLite

Image
Introduction A database is an essential part of building a software system which used to store and read data efficiently. Here, We are going to discuss some architectural details of database implementation by using an early version of SQLite. SQLite is a small database application which used in millions of software and devices. SQLite invented by D.Richard Hipp in August 2000. SQLite is a high performance, lightweight relational database. If you are willing to learn internal of a database in coding level, then SQLite is the best open source database available out there with highly readable source code with lots of documentation. Reading later versions of SQLite become a little harder since it contains lots of new features. In order to understand the basic implementation of database internals, You should have good knowledge about data structures, some knowledge about Theory of Computing and how an operating system works. Here we are looking into the SQLite 2.5.0 version. Here below yo…

Deploy Your First Application in Docker Swarm

Image
In this post we will go through the basic concept of the Docker Swarm and have some hands on experience of deploying application on Docker Swarm. You need to have basic knowledge about Containers to follow this post. Here, an article that describe the basic of the Docker Container. Having only single container for each service is not good when it comes to the production environment since we also need high availability when one node is down. If one node is down, then there should be another node to take over the load to that particular service. Docker Swarm gives you an elegant way to handle multiple container. Docker Swarm control following functionalities for you to deploy containers easily. Health Checks on the ContainersLaunching a fixed set of Containers for a particular Docker imageScaling the number of Containers up and down depending on the loadPerforming rolling update of software across containers A Node is an instance of the Docker engine participating in the swarm. Worker No…

Basic Concepts of the Kubernetes

Image
Handling large software which has multiple services is a tedious, time-consuming task for DevOps engineer. Microservices comes into the rescue DevOps engineers from all these complicated deployment processes. Simply, each microservice in the system has it own responsibility to handle one specific task. The container can be used to deploy each of these micro-tasks as a unit of service. If you are not that familiar with Containers, read this article to get to know about Docker, Which is the most popular and widely used container technology to deploy microservices. As I described early, we can use single container to deploy a single service and container contain all required configurations and dependencies. Single service always faces a common problem of a single point of failure. In order to avoid single point failure, we need to set up another service such that if one service is getting down, next available service takes that load and continue to provide the service. Another requirem…

Docker Lifecycle And Useful Docker Commands

Image
Maintaining a large software application is not that easy task since it may have lots of dependencies and OS related configurations. What if you can create an OS image which already contains required libraries and configurations that needs to run your application? Then that would be really easy for software deployer to deploy their application easily on a cloud without doing a tedious task of setting up an OS environment. One possible solution to overcome this problem is to use a Virtual Machine. You can install all libraries, setting up configurations and take an image. When you need to deploy the application, you can simply start the machine with that image. A VM provide complete low-level machine to run an Operating System. But it does not perform faster due to VM’s operational overhead. In this case Container technology comes to rescue. Containers vs VMs VM is nothing more than a computer that executes a program. VM is running on top of software which called Hypervisor. Here, the…

Transparent Data Encryption for Databases

Image
If you are creating a software application that needs to store and retrieve data, then most probably you have to use Databases. Unless it is not an in-memory database, Database store data on the disk as a file. Your application may be running on a remote server and database also reside on a remote server. Your application may collect sensitive data such as passwords, bank account data, and health data etc. Imagine a hacker somehow login into your database server and stolen your database file. Now, Unfortunately Hacker able access to all of your information by reading that file. So, How could you overcome this problem? Encryption comes to Rescue Encryption commonly used in day to day network communication to hide data from the third party. Encryption scrambles your data by a given key. Only the person who knows the right key can read the real message. Encryption could be either symmetric or asymmetric. In this case, we just need symmetric encryption since the user does not need to gene…

SQLite Frontend Internal Architecture

Image
In a computer program, the database is the heart of handling data. It provides an efficient way of storing and retrieving data fast. Learning Database internal architecture in code level is not that so easy since Database has complex architecture. Looking into a complex database is not that easy because of the complexity. But, SQLite is a nice little compact database that used in millions of devices and operating systems. Interesting fact about the SQLite database is that, code is highly readable. All most all of the codes are well commented and architecture is highly layered. This post is to look at the high-level architecture of the SQLite database. As I early mentioned, SQLite has a highly layered architecture and that can be separated into seven layers. We will go through each of the layers one by one. Tokenizer First Layer is called Tokenizer. Purpose of the tokenizer is to create tokens for a given SQL query. Tokenizer scans SQL query from left to right and generates a list of …