Image for post
Image for post
Photo by claudiasoraya on Unsplash

WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C. WebSocket provides full-duplex communication. In plain words: There is a persistent connection between the client and the server and both parties can start sending data at any time.

I have been using WebSocket for 4 years. I know how HTTP works but not with WebSocket. So I decided to dig a little deeper. With this article, I will help you to understand how the persistent connection works in the WebSocket protocol. …


Understanding the concept of Kubernetes by creating the Kubernetes Cluster in your local environment

Image for post
Image for post
Photo by Stanley Dai on Unsplash

Have you heard Kubernetes? You must be interested in that topic. That’s why you open this article. This article is about the basic concept of Kubernetes and how to use it. In the end, we will run docker containers using Kubernetes that run on Minikube. It doesn’t require any cloud paid account.

What is Kubernetes?

Kubernetes is an open-source platform/tool created by Google. It is written in GO-Lang. So currently Kubernetes is an open-source project under Apache 2.0 license. Sometimes in the industry, Kubernetes is also known as “K8s”. With Kubernetes, you can run any Linux container across private, public, and hybrid cloud environments. …


Understanding how API Gateway Works

Image for post
Image for post
Photo by Piyush Wadhwa on Unsplash

API Gateway series list

API Gateway is a service that’s the entry point into the application from the outside world. It’s responsible for request routing, API composition, and other functions, such as authentication. All external clients first go to API gateway and will route to the appropriate service. API gateway may also translate between client-friendly protocols such as HTTP and WebSockets and client-unfriendly protocols used by the services.

Request Routing

One of the key functions of an API gateway is request routing. API gateway implements some API operations by routing requests to the corresponding service. …


Understanding how API Gateway Works

Image for post
Image for post
Photo by Piyush Wadhwa on Unsplash

*warning — please drink coffee for better experience*

API Gateway series list

Imagine you are building an online store. Your application feature:

  • Order
  • Product Detail
  • List of Product

Based on all of feature above you have these service:

  • Product Service
  • Order Service
  • Pricing Service
  • Account Service
  • Customer Review Service
  • Inventory Service

Since your application use microservice architecture and the data is spread accross multiple service. Let’s say you open the home page and search for bug spray. …


Image for post
Image for post

I think this one will be really quick.

Observer Design Pattern

The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. I will give you a real world example. Let’s assume that you are a handsome guy who use dating app and looking for a girl. Then you give your number to the girl you found on the dating app. And there are several other men give their number to that girl. …


Image for post
Image for post

Have you heard about publish-subscribe pattern?
Have you try to use it?
In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers, but instead categorize published messages into classes without knowledge of which subscribers, if any, there may be. Similarly, subscribers express interest in one or more classes and only receive messages that are of interest, without knowledge of which publishers, if any, there are. I know you must be bored with all these explanations. Therefore, let’s immediately discuss the implementation.


Image for post
Image for post

Introduction

Javascript is one of the most popular languages today. Maybe you have been using it for a long time. But you can’t deny that some of the most important part. Then welcome to my article about Javascript under the hood.

I’m a 2 year Software Engineer of web application development. I’m not going discussing about specific Javascript framework like node.js. This time i will discuss about Execution context, and asynchronous callback. I hope my articles will help you to understand about that concept.

What is Execution Context?

Whenever code is run in Javascript it’s run inside execution context. JavaScript is a single threaded language, meaning only one task can be executed at a time. Execution context is a stack. When the JavaScript interpreter initially executes code, it first enters into a global execution context by default. Each invocation of a function will result in the creation of a new execution context. The global execution context is always at the bottom of stack. Still confused ? …


Installation

npm install graph-node

Example usage :

var graphs = require(‘graph-node’);

var graph = new graphs.Graph(); // creates a graph

var node1=graph.addNode(“A”); // creates a node

var node2=graph.addNode(“B”); // creates a node

var node3=graph.addNode(“C”); // creates a node

var node4=graph.addNode(“D”); // creates a node

var node5=graph.addNode(“E”); // creates a node

node1.addEdge(node2);

node1.addEdge(node3);

node1.addEdge(node4);

node2.addEdge(node5);

node3.addEdge(node5);

node4.addEdge(node5);

var dfsTraversed = graphs.dfs(graph); // returns a dfs traversal of graph

var bfsTraversed = graphs.bfs(graph); // returns a bfs traversal of graph

Jonathan Natanael Siahaan

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