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. …
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.
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. …
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.
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. …
*warning — please drink coffee for better experience*
API Gateway series list
Imagine you are building an online store. Your application feature:
Based on all of feature above you have these 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. …
I think this one will be really quick.
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. …
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.
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.
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 ? …
npm install graph-node
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