Technical Architect
Ingenuity GamingNodeJS
ReactJS
Typescript
Javascript
AWS
ELK
ECS
WAF
ECR
Docker
MySQL
Redis
Kafka
Okay. Oh, sorry. I didn't understand that I need to start speaking. So hi, I'm Abhishek Rato. I'm working in IT industry from last 12 years and currently I'm working in InJoint Gaming, a gaming company where I'm a senior technical lead, but soon I'll be promoted to a solution architect or maybe technical architect, similar position. And my role here started, I mean, I've been switching into multiple roles here from center of excellence to leading a team of 20, 28 peoples. And if you talk about right now, what I'm doing is I'm managing RGS, Remote Gaming Server, which is built in Golang, but I have a vast experience in Node.js TypeScript as well. So it's a microservice based thing. So some of the parts are developed in Golang. It's a legacy application and the new modules which we are developing are in Node.js. So I'm familiar with Node.js, React.js, Next.js, I've worked on the AWS as well. So I'm heading the DevOps team as well for this Remote Gaming Server. So there we have this microservices deployed into Kubernetes. So I'm quite familiar with AWS EKS, ECS, and all those things which are required for an application to be deployed in AWS, including RDS. So we are using MySQL, we are using Elasticsearch stack as well, Elk, Kibana, Logstash and Elasticsearch. And apart from that, if I talk about my previous project in the same organization, so I was into center of excellence, I've built a framework here, which the name of the framework is Quest. It's an internal framework which is used for game development. So this company works in a specific domain where into casino gaming and these are specific type of games. So we have built a framework which is in TypeScript and it's based on the Pixy.js library. And it's a framework along with a GUI tool, which was built in Electron. This whole team was headed by me. So in this framework, it is very easy to develop a game using the GUI tool. You can input your assets, the developer can input his assets, a proper game will be created, then minor tweaking plus additional features will have to be developed. So this framework provides complete end-to-end solution for the type of the games which this company develops. So yeah, that's my introduction, thanks.
To facilitate communication between a React based front end and a Node. Js, uh, back end for real time data updates. So, uh, we can use normal HTTP request and response framework AJAX calls, or we can use Node. Js fetch API as well. We can use Xios also. There are multiple ways to do a communication between, uh, React front end and Node. Js. For, uh, Node. Js, uh, backend service, I'll prefer implementing express to, uh, for for accepting HTTP requests.
How do you approach, uh, designing a scalable web application architecture? Can you provide an example from your experience? Alright. A scalable, uh, web application architecture. So I'll prefer a microservice architecture where, uh, we can easily implement microservices. And, uh, so for example, based on the requirement, every module will be categorized into microservice. It will be a separate microservice with its own, uh, database requirements. And we can implement 1 API gateway as well so microservice don't interact with each other directly. That communication will flow via, uh, API Gateway. And, uh, in this way, it is easy to scale because, application, it is very easy to scale them. You can create on on the cloud. You can create, uh, replicas of, uh, it very easy. So we can run multiple replicas if the load is there. We can use ALB load balancers, uh, to distribute the load into different, uh, replicas of the microservice. And I think, yeah, that's my uh
Custom measures you take to protect web applications from SQL injection and access it. Alright. Uh, sorry. I'm not aware of, uh, this answer. I'm not ready for this answer.
Of sticky sessions and load balancing and its impact on web application performance. So sticky sessions and load balancing is, uh, uh, so for example, let's say we have a Node. Js application and, uh, microservice is there and multiple replicas of of a particular Node. Js application is running. Sticky sessions in AWS in, uh, load balancing means that, for example, if user 1 creates a session and their 2 replicas are running off the same application, then sticky update sticky session means, uh, the session, the anything data, or the communication will always happen with the one single instance of that application. So for example, there is, uh, Replica1, Replica2, and then we have this, uh, User1 here. So let's say user1 law, uh, opens, uh, the application in his web in his web browser, and it gets, uh, attached with, uh, let's say, Replica 2. So now in during the whole tenure, during the whole session, the sticky session that, uh, this user will always be stick with, uh, Replica 2 unless the Replica 2 goes down because of some issue. Otherwise, uh, the session will get stick stick with it.
Actual pattern would you use to build a scalable real time bidding system, and how would you ensure its responsiveness under heavy load? Which architectural pattern would you use to build a scalable real time predictive system? Alright. Uh, so I haven't worked on anything like sorry. Yeah. So I haven't worked on any bidding system, but uh, for this, I'll prefer using WebSockets because it has to be real time bidding. And, uh, even if the all the other users should be aware of it. And what I would prefer is I'll use Kafka or some other kind of service which will be which will make it very easy for different, uh, microservices to to connect with each other. So Kafka provides you a event system, Event Bus, where microservices can send events to Kafka and Kafka, then, uh, some other microservice can listen to that event. So in this way, it is very easy and, uh, there's there's no law, uh, left. And it ensures it ensures that the event is delivered to all the subscribers. So in this way, uh, implementing real time system will be very easy.
How do you decide which design pattern to use when starting a new feature or component? Alright. So what we need to do is we need to understand the requirement of, uh, the feature or the component which we are going to build. So, for example, if, something the preferred framework for everyone is always MVC, MVC, but, uh, it depends if we need to implement factory pattern or adapter pattern or what is required. It depends on if the application is going to be a real time application or it's a normal application which can be built on HTTP. Um, based on such factors, based on these requirements, load requirements, we decide, uh, which design pattern we should use for a for a new feature or component.
Review this JavaScript code block that is intended to implement a singleton pattern. Explain what is wrong with the implementation and how would you fix it? I think, Sorry. Uh, I'm not a 100% sure about answer of this question, but I think comparing this object should be should return true. Maybe we need to start, uh, let instance equals to instead of assigning it null, it should be undefined. I think then it will work. But I'm not 100% sure about this. I'll have to kinda try it on my system, and then I can answer about it.
Given the JavaScript snippet below that uses a modern framework, please explain why the data might not be displaying as expected expected on the web page. Data inside, data use state. All that. Reacting use state. UseEffect. Okay. FetchData. Then fetch data. This is some case and fetches data from an API. Okay. Fetch data dot then response. Uh, set data response dot Twitter. So one thing which I noticed, the dependency area of useEffect is empty. So I think there should be something because useEffect will get, uh, executed if, uh, obviously, if the component is initialized on the 1st time, and then after any of the dependency variable gets changed. Uh, second thing is, uh, fetch data, uh, because I cannot see the implementation of fetch data function, but, generally, what happens if you use, uh, something like x u s or Fetch API, then you will have to convert into, uh, JSON as well, kind of dot JSON or something something similar if it is a, uh, if you are expecting JSON in response. That could also be, uh, one thing which may break, which may cause the web page to not not show the data properly.
Blind has suffered repeated outages due to monolithic structure in the past. Then I want to move to the to a microservice How would you design the transition to ensure high availability and which observability metrics would be critical during the process? Alright. So yeah. So a monolithic, uh, structure is where the complete code is present in 1 single application. It may still be it may be modularized, but it is not properly categorized into microservice. A microservice is a kind of a I'll say it it is a combination of, uh, application, a module, and, uh, the database. So how would we design the transition to ensure high availability? So what we need to do is we need to uh, categorize the microservices based on the functionality of the of the application. So, uh, based on the modularity and requirement of the application, we'll divide the monolithic application into different microservices. We'll ensure that it is proper, the back end part, and is properly implemented into Node. Js so we can, uh, easily and, uh, and the application should be stateless, so we can easily create the replicas of the of the microservices. So, uh, what we can do is, uh, to ensure the high availability because these will be the microservices and, uh, state less microservices. So these will be these will be, uh, these replicas can be created into different, uh, availability zones. So the microservice will always be available. High level to to make sure, uh, something an application is highly available, what we need to do is we need to ensure that it is deployed in multiple zones, more than 1 zone. Multi AZ deployment is required. So, for example, if 1, uh, deployment zone goes down or the application in 1, uh, zone go to goes down, then, uh, our load balances can directly point to the another availability zone. So that's the one thing. Plus, uh, there should be multiple replicas running based on the load. Um, but I think I would recommend that at least 1 replica should be there. So if 1 I mean, 0 and 1. So if, uh, replica 0 or the main, uh, replica goes down, then ALB can, uh, point it towards, uh, replica 1. And it is important to keep replica as well because if you have high load, it's, uh, better to have multiple replicas because then, uh, load balancers can distribute the load and it eases out, uh, the application.
Building a full stack JavaScript application, how do we ensure that the memory usage is efficient both on the client and server side? Yeah. So how do we ensure? So what we can do is, uh, we need to write a code which is properly formatted. It should be the complexity should not be very high. The objects, if if any, are being created, then they should be destroyed after being, uh, used. And, similarly, on the server side, there should not be any memory leakage. How we can ensure it? How we can test it? Uh, we can use Chrome or Node. Js, uh, profiling tool. Based on that, we can identify if the memories keep going up, up, up. If we use that, then it means that there is a memory issue, memory leakage issue and need to be addressed. And if, obviously, if you do any form, uh, if you do perform anything, uh, the graph will go up, but then it should go down gradually as well. If it is not going down, then it's an issue and need to be, uh, addressed.
We have question what testing framework and strategy would you recommend for react application with a focus on user interface consistency and integration so So we can use Mocha This one mocha, and then there's jest. I think these are the two good framework which we Which I would prefer using there are plugins have level for just which we can use for react application and What would the focus on user interface consistency and integration sorry? With a focus on user interface consistency and integration, so yeah So we can use the react plug-in to ensure that doms are being created on time these are working fine and secondly we can write some integration tests as well, so for example we can use a Test containers or something which ensures which runs a test container of database any database for example if you're using MongoDB or any my SQL or no SQL any so we can ensure that the integration the connection with different Databases working properly, and we can mock different Microservices to ensure that the connection and integration works with different API gateway Or I mean whatever the application will be using we can write such test cases to ensure that It is fine and plus we can write test cases to ensure business logic as well, so So for example if you are using Redux or something the data, which is coming to it the logic We have written business logic. We have written the input and output value is expert as per expectation
And would you choose Redis over MongoDB for session storage considering performance and data structure flexibility. So, uh, Redis is more of a cache database, and MongoDB is a NoSQL thing. If you want to, uh, we can use Redis as a session storage. However, I'll prefer generally MongoDB, but, uh, we can keep the session storage inside the Redis, uh, and we can and to the expiry time similar to the sessions. So in this way, Redis will be much faster for session storage and, uh, but it will be less less flexible. But if you use MongoDB, we'll be having more data structure flexibility because in MongoDB, we can store we can I mean, uh, the proper CRUD operation and everything is available because it's a kind of a complete NoSQL DB, but Redis is more of a preferred as a cache