How to Avoid the N+1 Query Problem With  Eager Loading

How to Avoid the N+1 Query Problem With Eager Loading

In this post, I will define the N+1 query problem and explain how to avoid it using eager loading. Throughout my professional career, I have enhanced the response time of numerous APIs by refactoring N+1 queries. I have seen the N+1 issue in many times that use ORMs, as well as in those that use raw queries. In this blog post, I will use raw queries to demonstrate the N+1 problem and Eager Loading to solve it....

September 11, 2024 Â· 7 min Â· 1454 words Â· Prakash Bhandari
Large Multimodal Model(LMM) Prompting With Google Gemini

Large Multimodal Model(LMM) Prompting With Google Gemini and Vertex AI

In this post, I will briefly define Large Multimodal Models (LMM), explain the data modalities of LMMs, and demonstrate Google Gemini’s multimodal capabilities using text and images. This is purely a no-code blog post. I will demonstrate everything directly from the Google Cloud Console using Vertex AI Studio and Vertex AI to showcase a simple example of using multimodal inputs (text file and image) Introduction A Large Multimodal Model (LMM) is an Artificial Intelligence (AI) model capable of processing and understanding multiple types of input data modalities simultaneously and providing outputs based on this information....

September 7, 2024 Â· 6 min Â· 1101 words Â· Prakash Bhandari
Understanding the Basic Concepts of Kubernetes(k8s) Cluster

Understanding the Basic Concepts of Kubernetes(k8s) Cluster

As a beginner, understanding a Kubernetes (k8s) cluster might be a little bit complicated. If you go through the k8s official documentation its overwhelming. In my personal view, the best way to learn any new tool and technology is by understanding its core concepts and architecture. In this blog post, I will try to simplify the basic concepts and common components of a Kubernetes (k8s) cluster with simple architecture diagram....

July 9, 2024 Â· 6 min Â· 1073 words Â· Prakash Bhandari
Gatling API Load Test With JavaScript

Gatling API Load Test With JavaScript

Ensuring an application runs smoothly in production is crucial. This post guides you to write and execute a simple Gatling API load test using JavaScript to ensure the stability, speed, scalability, and responsiveness of your application under a given workload. You may have written unit tests and functional tests, and the application looked good, so you shipped it to production. However, it suddenly crashes, experiences performance issues, or encounters API request timeout errors....

June 14, 2024 Â· 11 min Â· 2296 words Â· Prakash Bhandari
Implementing Logging Using Node.Js, Elasticsearch, Kibana and Docker

Implementing Logging Using Node.Js, Elasticsearch, Kibana and Docker

Logging play a very important role in software development. It helps monitoring, troubleshooting, debugging, event tracing, request tracing, security, and also can be used by Business Intelligence(BI) for reporting purpose. Logging has numerous benefits. But in this blog post, we will focus on building a real-world example to store application logs in Elasticsearch via a Node.js app by using the Winston NPM package and visualize them using Kibana. Additionally, we will dockerize the entire application....

June 10, 2024 Â· 9 min Â· 1755 words Â· Prakash Bhandari
Find MySQL 8.3 keywords and reserved words used in column names, table names, procedures, or functions

Find MySQL 8.3 keywords and reserved words used as column names, table names, procedures, or functions

Sometimes, you may see raw queries in your codebase, especially when dealing with very old codebases. Nowadays, people tend to use ORMs (Object-Relational Mapping). It’s possible that in the past, developers used table names, column names, or function names that are now considered keywords by newer versions of MySQL. In such cases, upgrading from an older MySQL version to a newer one (for example, from MySQL 5.7 to 8.x) can be challenging if your codebase uses raw queries without proper escaping for table names, column names, or function names in the queries....

April 4, 2024 Â· 3 min Â· 588 words Â· Prakash Bhandari
Polling vs Webhooks

Polling vs Webhooks

Sometimes, we need to notify or update another system after a certain interval or upon completing background processing jobs. In such situations, we either use webhooks or polling. Each method has its own use cases, advantages, and disadvantages. This blog post will explain the differences between polling and webhooks, along with their respective use cases, pros, and cons. What is Polling? Polling, also known as API polling, is a mechanism where the client repeatedly calls the server to check for updates or changes until it receives a response from the server....

March 13, 2024 Â· 4 min Â· 653 words Â· Prakash Bhandari
Similar Document Search With Elasticsearch

Similar Document Search With Elasticsearch

On various news portals and e-commerce platforms, you may have seen recommendations for articles and products related to the main article or product. Recommending similar products, articles, or documents involves complex algorithms, but Elasticsearch empowers us to utilize recommendation algorithms effortlessly. Mainly, recommending similar products, articles, or documents is accomplished through content similarity or by considering the user’s query history. I will provide an example of Amazon product recommendations. In the image below, “Get similar item Fast” is related to content similarity, while the second one, “Customers who viewed this item also viewed” is related to the user’s query history....

November 3, 2023 Â· 10 min Â· 1995 words Â· Prakash Bhandari
Docker Commands Cheat Sheet

Docker Commands Cheat Sheet

In this post, I’ve compiled a comprehensive list of docker commands that cover basic Docker commands, Docker Compose, and Docker Registry. For each command, I have added a brief explanation of its purpose and usage. Whether you’re managing containers, orchestrating services with Docker Compose, or working with Docker Registry, this guide will be you a lot. Basic Docker Commands Check Docker version 1 docker --version or docker -v Display system-wide information about Docker 1 docker info Download an image from Docker Hub....

October 25, 2023 Â· 3 min Â· 557 words Â· Prakash Bhandari
Deploy .NET Web Application in Kubernetes

Deploy .NET Web Application In Kubernetes Using Kustomize Tool

In this article, I will explain the basics of how to deploy a .NET Web application in Kubernetes using the Kustomize Tool. I will use Minikube to deploy the app on the local machine. Deploy .NET Web Application In Kubernetes, I have built a Docker image and pushed it to the Docker Hub registry. I will use the same artifacts that were used in that previous article. In this article, I will focus more on how to deploy into Minikube using the Kustomize Tool....

August 27, 2023 Â· 6 min Â· 1175 words Â· Prakash Bhandari