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.
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
var dfsTraversed = graphs.dfs(graph); // returns a dfs traversal of graph
var bfsTraversed = graphs.bfs(graph); // returns a bfs traversal of graph