
Senior Software Engineer
CloudphysicianSenior Software Development Engineer
DataFlow GroupSenior Software Developer
DistrictDTeaching Assistant at Coding Ninjas India
Coding NinjasFull Stack Developer Intern
LineupXSoftware Developer
DistrictDPublicity Head
Event Co-Head

NodeJS

ExpressJS

TypeScript

PostgreSQL

MySQL

MongoDB

Redis

AWS

S3

Lambda

SQS

SNS

API Gateway
.png)
Docker

WebSocket

RESTful API

Microservices architecture
My name is, and I have four days of experience.
Everyone. I have 4 years of experience as a Node JS developer, mainly in back-end development. And I have completed my studies in Pune at the Bhardi Vidya Bharti University College of Engineering, Pune. I have worked on various projects, like the finance system verification process and equipment platform. So, these are the major leap projects which I have worked on. And I am always eager to learn new technologies and best practices. I have experience in both SQL and NoSQL databases, Node.js, and in the SQL database, I have experience in PostgreSQL and MySQL. And in the NoSQL database, I have experience in MongoDB. And, also, I have knowledge of AWS. So, I have worked on AWS Lambda functions, AWS SQS, AWS SNS, EventBridge, Cognito, and ECS. I have worked on these types of technologies also. And I also have knowledge of WebSockets, like Socket.IO libraries. And, for the messaging system, I work with Twilio. So, yeah, I have worked on this type of technology.
Okay, so we know for the bidirectional type of communication, we require the WebSocket. Okay? So what is the web? First, I will use the socket IO, and we understand what is a WebSocket. So WebSocket is a bidirectional protocol that provides a persistent connection. Okay? It's a protocol that is used to provide bidirectional and persistent connections. So what happens if we want to continuously ask something from the server? So you need to send some requests to the server. Okay? For example, on the finance system, we can see the stock prices. Like, you know, stock prices change every second. Okay? So if you pull the server every second, it might get hampered. So here, what we can do is create a single connection over the server. And whenever anything updates on the server side, or anything we want from the server, it can communicate without needing to reconnect. Even on a single TCP connection, they can send events. So it decreases bandwidth, and you can easily send data over the server. So, yeah, this is the feature of the socket.io library, which works on top of the WebSocket. So the socket.io library is used to communicate with the client and server in bidirectional communication. Okay. So in the chatting app, we can use the socket.io library and in the socket library, we first clear the connection over the server and client. So this connection is auto-connected. If some failure happens in your server and all things, this connection will automatically reconnect. So you can create a broadcast, get a room, okay, using the socket.io library. So that's how you use it. So using socket.io, first, you have to listen for messages, get the room, and broadcast. And based on the room and broadcast, you can send the message to the consumer end. Yes.
What pattern would you use to ensure secure and structured error handling in SPSS? To ensure secure and structured error handling in an application, we can use a different pattern, for the security and the structure error handling. So we start from the basics. First, we can use HTTPS instead of HTTP. It's a more secure version. So, basically, HTTPS uses the TCP connection that works on a single TCP connection. So, we can use HTTPS first, then second. Second, we can use input validations. So, what input validation does, it sanitizes your inputs that come from the client side. Sometimes, what happens is that a hacker is present in the middle of the client and the server. If clients send some requests to the server or like, on the query parameters. And in the hacker, in the middle of the hacker, he performs some type of SQL injections. Like, he can put in the delete query or delete table queries. So, if you don't sanitize the input, then what happens is that your database can be harmed or some attacker can attack something on your server. So, by providing some security parameters on the client side before going to the server, using input validations, it will sanitize your input. So, this type of thing, which way we can ensure that going to the back-end server. Before going to the back-end server, we can sanitize all the data. And the third one we can use for error handling, like, we can use a try-catch mechanism. So, whenever we are in the controller or in the services, we can provide the try and catch block. In the try block, we write all our logics. In the catch block, we handle the error. So, if in the try block, we get any type of error, like database error or logic error, or syntax error, which will come into the catch block. And in the main file where everything starts running, we can provide the error handling middleware. So, if any error occurs in that catch block, which will come to the error handling block in the main file, and we can define what type of error and what type of page we will show on the server or on the client. And if you want to save the error in our database, we can save the database error in the database. If you want to notify someone that, if you got the error, then we can notify them. So, we can use a try-catch block for error handling.
So, here I can see, we are creating the connection and again and again. Okay. So what we can do, we can first create the connection, and after the connection, we, you know, first time created after that we can listen to the events, like, on and, you know, like event messages and disconnect this kind of thing. Yeah. This is a better way to handle this in sockets.
What is the best approach to manage and apply configuration changes? So, in multiple environments, it means, like, UA, UAT, and production. Okay. What we can do is have configure configuration changes. Configuration changes mean if you change some configuration, like, for example, you have a database. Okay? So there's a database password, database URL, database port, this kind of thing. Like, you have some third-party APIs or ports and all things. In those things, which are used to configure something. So, these are the variables or things we can put in the dotenv file. Okay. We can create multiple dotenv files based on our environment, like QA environment, UAT environment, and keep all of these things in our environment files at the configuration level. What happens if, for example, in our QA environment, we're using a different database. Okay? We're using the Post database, but the URL is different for that. And in the UAT environment, we have a different URL because the database has separate ones. So, both of these different configurations have different URLs. Okay. We put those URLs based on their environment. Like, you have the QA URL and the UAT URL, and the production URL is the development URL. So, based on our environment, we can create the environment file and put all of this configuration over there. So, it will also apply whenever we push our code into the server, into production, so we don't need to push that environment file. Okay. These environment files are already available in our server. Okay. And we don't have to share this environment file with everyone.
The system is a perfect authentication system, which is a video. So, 2-factor authentication system using Twilio in a notice. Okay. So, what is the first two-factor authentication? Okay. So, like, whenever you log in on a system, you type the user ID and password. So, after logging in, the system asks you to do some OTP, okay, or some pattern matching. This kind of system asks you. So, that's why 2-factor authentication. Okay. So, what happens here? What can work is that we have a system where we can log in. Okay? So, whenever we try to log in to the system, at that time, we enter our username and password. Okay. After entering the username and password, we can send a OTP to that user, okay, for the 2-factor validation. So, when they put their OTP on our system, and we verify if the OTP is correct, only then we can authorize them to enter our system. So, Twilio is basically a library provided by a third-party library, which provides sending a OTP to users. Okay. So, this is a major way where we can provide the authentication or provide the 2-factor authentication on our system.
It is how you could manage asynchronous processing in Node.js to optimize how you manage a single processing in Node.js to optimize performance when integrating multiple third-party APIs. Okay. So, when we integrate multiple third-party APIs, what we can do is use synchronous await functions. So, if those third-party APIs are dependent on each other, it means if one API will give the output and that output will be used in another API. Then, we can use synchronous await in the await. We provide each API like await API 1, await API 2. So, all these steps will come, and we store them. If those APIs are not dependent, what we can use is a promise. And in the promise, we put a single API. So, like that, we can get multiple promises. Like, in promise 1, we have API 1. In promise 2, we have API 2. And in promise 3, we have API 3. And we can use the promise.all method or the child process spawn or fork method so that those APIs will run parallelly. Instead of one by one, they can run parallelly. So, like this approach, we can handle asynchronous programming in Node.js. So, basically, whenever an API or this API is called to Node.js, it offloads this task to the worker, and the worker handles this kind of thing. So, yes, we can use the promise.all method, or we can use a child process method like spawn or fork to manage multiple third-party APIs calls in our Node.js applications.
Machine managing. So, in experience, what is the most effective way to manage state in real-time applications in user-server? Okay. So, socket whenever the socket.IO connection establishes, okay. So, those connections with the state. We know STD v is a stateless framework when we create a persistent connection. So at that time, we have to provide the state on both the client and the server, so they can communicate with each other. Okay. So we can use a user identity on the client and also the server end. So whenever a request comes, we don't have to make the database call and all things. And directly, we can see for what broadcast or for what channel this message has come. Okay. So, this is the way we can manage the state in socket.IO.