Assuming y’all are aware about secure sites and usage of https. This aim to shed some light on how it works in background. Moreover it will follow upon creating SSL certificates, and setting up HTTPS in Node.js server.
This will not introduce to HTTP, but y’all know that Chrome communicates with web server using HTTP protocol. Default HTTP protocol is regarded as insecure since client communicate with server using plain text without encrypting, hence exposed to intruders.
Hence HTTPS protocol is introduced to secure communication between client and server by encrypting data. …
This article assumes that you are aware of the basics of React Hooks and Socket.IO and follow up on these articles to get familiar with these topics:
This builds up a demo chat application involving socket.io rooms integrated using React hooks. The client can connect and switch between chat rooms, where updates will be replicated by socket.io events. Depending on the selected room it will broadcast chat messages to socket clients using that room.
(Once running, we can spin up multiple browser tabs and see if chat messages are updated through sockets.)
Let’s create a Node server with simple socket.io…
In any ecosystem involving multiple projects or multiple developers, there might be common code segments where it may be duplicated. This duplicated code can lead to unmaintainable code bases in the long run where minor changes have to be replicated to many codebases to make it consistent.
Hence maintaining code bases with common segments to share across projects is a general practice and there are few ways to integrate code bases. This sharing code can be private and domain-specific when it's shared within the projects of the company. …
Most developers are familiar with version control system and git is de facto choice for most cases. This article is actually to introduce how git works, and this will enable for developers to understand git better.
Git is distributed version control where history of file and directory changes are stored such that developers can travel through time to gather how all the changes happened. Initially git was created by Linux creator to manage Linux kernel development when having multiple open-source developer.
In Linux manual pages (man git
), Git is identified as “the stupid content tracker”. …
Users familiar with Linux based operating systems should have at least once come across issues related to Permission denied
when executing some commands in the terminal. This article aims to shed some light on user permissions and ownership related to files and directories.
In order to get an introduction to permissions and ownership, in the terminal, navigate to a location where files resides and execute ls -al
to list files and directories with all associated details.
drwxr-xr-x 12 bibi staff 384 16 Mar 11:19 public
-rw-r--r-- 1 bibi staff 1660 16 Mar 11:51 note.txt
Let’s break down what each segment…
Node.js is single-threaded by design, thereby requiring it to keep the main Node process unblocked to continue execution. Moreover, Node is limited to one thread and 1.76GB (for 64-bit OS) memory usage. Thus, external processes are required to offload CPU intensive processing in parallel. The child_process
module in Node allows us to spawn processes that can be used for any task to be run in parallel.
The Node module child_process
allows us to create new processes and to offload tasks to be processed in parallel in the background without blocking the single main thread. …
Hope y’all are familiar with basics of node.js and how its a popular choice for making server applications. This article aims to shed some light on node.js architecture and how it works internally.
JavaScript language is popularly used for web pages and to make them interactive. Thereby javascript code is required to be interpreted by browsers to show as web pages, and this is done by JavaScript Engine.
JavaScript Engine is used to convert JavaScript code into machine code to be executed. …
From previous articles of the series it was demonstrated to setup REST API and architectural changes to separate concerns into repositories, controllers.
However for better modularity and separation of concern, separate layers can be configured for each process. Hence each layer is independent of each other and can be replaced by multiple implementations if needed. Layered design of REST API can be used to demonstrate usages of this architectural pattern.
Each of these layers should be Single Responsibility to avoid tight coupling and to support Separation of Concern. (Note that tiers and layers are used interchangeably but there is slight…
Hope y’all are familiar with ASP.NET Core articles following up to here introducing WebAPI and Generic Repository Pattern. If needed to follow up or for quick keep up please check up on:
Transaction support and connection management is essential in an application architecture. Simply given business scenario should entirely succeed or entirely fail and not remain in partial condition. As an example, let's consider A transferring 10 to B and that business scenario can be written in following pseudo code:
transfer(from A, to B, amount 10) {
A = A - 10
B = B + 10
}
This should…
Hope y’all are familiar with ASP.NET Core and how it can be integrated with database through EF Core. Feel free to follow up on previous article on this:
Previously database context were configured and used to interact with database. Repositories are used to create abstraction between database access and business logic. Thereby usage of data, and access of data is separated where repository will manage interaction with database. This can be clearly seen in N-Tier architecture that is designed for separation of concern, and ASP.NET Core Web API can be also be modeled as N-Tier.
From above diagram it is…
Full Stack Developer | BiBi