Let’s start with Certificates

SSL refers to Secure Socket Layer. It is used to encrypt connections. TLS refers to Transport Layer Security, which is a newer version of SSL. Nowadays, TLS is mainly used, but people still refer to SSL.

What is it SSL do?

An SSL certificate allows traffic between your clients and your load balancer to be encrypted in transit(in-flight encryption).

Public SSL certificates are issued by Certificate Authorities (CA) like Comodo, Symantec, GoDaddy, GlobalSign, etc… using this public certificate attach to our load balancer we will able to encrypt the connection between the client and load balancer.

It also has an expiration date (you set) and must be renewed from time to time. …

Image for post

Recently started reading a lot about AWS and doing some practical things to be in hand-on touch with the concept. After reading about IAM user and EC2 I got to this interesting topic which I can be really important when you’re building a highly distributed system.

So it comes down to two things. This will be some basic before we start with the main topic but it kind of relates to that. I’m talking about scalability and high availability.

Scalability means that an application can handle greater loads by adapting some techniques. There are two kinds of scalability:-

  1. Vertical Scalability

Vertical scalability means increasing the size of the instance. For example, your application runs on a t2.micro …

Image for post

For the last week, I’m trying to implement push notification for iOS and Android. With android, it was really easy but in order to implement in iOS, it takes a little bit of effort and little clarity about the concepts it uses.

We’re going to implement this in the native ios app. If you want to set up a Firebase Cloud Messaging client app on iOS please follow this tutorial.


What is a push notification?

A push notification is a message that pops up on a mobile device. App publishers can send them at any time; users don’t have to be in the app or using their devices to receive them. They can do a lot of things; for example, they can show the latest sports scores, get a user to take any action, such as downloading a coupon or let a user know about an event, such as a flash sale. …

Image for post

Enabling your log queries in docker is quite easy and simple. Now, this can be a handful when you’re using lots of APIs and wants to know what exactly is happening behind the scene.

So now there are two problems I faced.

  1. My docker container was already running the PostgreSQL. If you’re in such a condition please locate your configuration file.
postgres=# SHOW config_file;

Then it’s also a good idea to check the directory path of your Postgres installation.

postgres=# SHOW data_directory;

Now check your docker is running or not by this command and if it’s running go ahead and exec…

Image for post
Photo by Markus Spiske on Unsplash

Websockets and Channels

  1. Introduction
  2. What is WebSockets?
  3. Channels in phoenix and generally
  4. Building a Chat App with phoenix
  5. Setting up the project
  6. Enabling WebSocket and channel
  7. How do phoenix channels work?
  8. What is phoenix presence?
  9. How does phoenix presence work?


Some time ago I thought about this topic where I can explain and show the capabilities of the Phoenix Channels and Websockets. So I worked on a project where I implemented both of this and during that, I learned a lot about these concepts.


Websockets represent a long-awaited evolution in client/server web technology. Websocktes is a technology that allows communication between the back-end and the front-end over a single TCP connection. Also, the connection remains open until the user leaves the channel. There is no need for HTTP requests to get data, only broadcasting of messages and subscriptions to a topic to enable communication. …

Image for post

In this blog, I’m going to talk about some of the most important topics in the Database System.

  1. Relational Model
  2. Relational Algebra
  3. Relational Calculus
  4. Alternative Data Models

In the 1960s, before the relational model existence, people were using other data models like the hierarchical and network data model. The major thing to understand about these early database systems was that they were actually very difficult to build applications on top of and actually maintaining over time. A big part of this is because there is no clean separation between the logical layers and physical layers.

Around that time there was a mathematician named Edgar F. Codd that was hired at IBM in New York. After started working with the developer team he started seeing programmers spending their time over and over again modifying or changing their database application code anytime the physical data structure changed or the schema changed. So what he developed was a mathematical concept called the relational model that was trying to solve this problem. So he wrote two papers on that and there’s a three key principle that came out of this was revolutionary groundbreaking. …

Image for post
Photo by Steve Johnson on Unsplash

When I was studying how controllers work in Ruby, I learned about rails middleware and how Journey is used to routes the incoming request. In Phoenix, we have something called conn.

If you have worked on phoenix before you might have seen this conn required in almost all the places in your application. The “conn” comes into life when you make a request to a phoenix app and dies when the response is sent out. The conn object carries the whole request and response cycle in Phoenix.

Project Setup

Before setup, I assume you’ve already install elixir and phoenix on your machine. …

Image for post
Photo by Franz Roos on Unsplash

Why Elixir and Phoenix?

In this section, I’m going to talk about RestAPI and how can you build one in elixir and phoenix. Coming from djangorestframework which is another way to build powerful APIs. In Django, Serializers allow complex data such as query sets and model instances to be converted to native Python datatypes that can then be easily rendered into JSON, XML or other content types. While python has some great functionality. I decided to learn something new which is not following OOPS concepts.

I’ve resolved to learn a new language which is of course elixir. So elixir is a dynamic, functional language designed for building scalable and maintainable applications. I had been reading and building RestAPI in elixir and phoenix for quite some time. This blog will give you the most basic introduction ever. This is for beginners only, of course, others can give their opinion about the blog. …

Image for post

Introduction to Design System

I’ve been reading a lot about system design in the last few months. So in this blog, I’m going to talk about system design and why you should learn it?

System design uses concepts from Computer Science such as networks, distributed systems, and parallel computing to build large systems like facebook, twitter, and amazon.

Imagine you have an application which has to reach out to millions of user. On the server-side, we need brilliant engineering to handle those requests. Requests on the server should never fail even if there is a hardware failure or the database somehow shuts down. There is plenty of things can be done in that case but I’m storing that for another blog. …

Image for post

What is an Umbrella Application?

Sometimes our project may get really really big and the elixir’s mix build tool allows you to breakdown your code into multiple apps. With the aim to make the project more manageable as it grows, elixir lets you define one root project with multiple sub-applications underneath which together make up the final solution to your project.

How Do I Create One?

To create an umbrella app you just pass an umbrella flag to the mixed call and that will create you a root project which looks something like this.

Now we need to define some subprojects. To do that, we navigate to the apps folder and then you can create elixir projects as you would normally. At this point, it’s worth noting that you can pass all the usual flags when you create your mix projects here. Let me show you how it’s done. …


Siddhant Singh

Into Data Science, Machine Learning and Data-Driven Astronomy. If I’m not writing code, I might be reading some random stuff.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store