Nearest Neighbour Problem

Sure, here’s a draft blog post on the Nearest Neighbor Problem discussed in the given video: Title: Solving the Nearest Neighbor Problem: A Comprehensive Guide The Nearest Neighbor Problem is a fundamental challenge in many location-based applications, such as finding the nearest restaurants, gas stations, or hotels from a given location. It’s a problem that […]

Building a Large File Upload System with Load Balancer and HDFS

You  How you build website wich suppprt and 1. upload very large file   2TB? 2. Storage should be able to store large file , and how make sure your storage reliable and durable.   3. Retry / Network failure -> gracefully work, amount of work should be minimize, 4. Donwload the upload file,   System design  Copilot  […]

Understanding and Scaling Webhook Notifications in Razorpay

In the world of online transactions, real-time notifications play a crucial role in keeping customers informed. At Razorpay, we’ve built a robust Notification Service to handle this task. However, as our transaction volume grew exponentially, we faced a few challenges, especially with webhooks, the most widely used form of notifications. What are Webhooks? Webhooks are […]

Understanding Daemon Threads and Non-Daemon Threads in Java

In Java’s multithreaded environment, threads can be categorized as either daemon threads or non-daemon threads. The word “daemon” comes from Greek mythology, where daemons were spiritual beings that performed services for others. In the context of Java threads, daemon threads are low-priority threads that are intended to serve and support non-daemon threads. What are Daemon […]

Adapter design pattern

The Adapter design pattern is a structural pattern that allows objects with incompatible interfaces to work together. It acts as a bridge between two incompatible interfaces by creating a class that wraps one interface and exposes another interface that the client expects. Here’s a practical example in Java: Suppose we have a third-party library that […]

Breaking Singleton in Java and How to Prevent It

1. Reflection Reflection: Reflection API can be used to change the access level of the constructor from private to public, and then instantiate the class as many times as desired. Breaking Singleton In the above code, instanceOne and instanceTwo are different instances of the Singleton class, breaking the Singleton pattern. To prevent breaking singleton through […]

Interview at Synechron

Question: You are given a String that contains alphanumeric characters (letters and digits) as well as special characters like !, @, #, and whitespaces. The task is to count the occurrences of only the special characters present in the String, ignoring the letters, digits. Answer: Question: What are the multiple ways in which we can break […]

Securing Database Credentials with AWS Secrets Manager in a Spring Boot Application

Introduction In modern application development, handling sensitive information like database credentials securely is of utmost importance. Hardcoding these credentials in your application code or configuration files is a serious security risk, as they can be easily exposed or accidentally committed to version control systems. AWS Secrets Manager provides a secure and scalable solution for managing […]

Interview At Altimetrik

Question: You are given list {1, 2, 3, 4, 5, 6, 7, 8, 9} you need to rotate by 3 Question: We have a database transactions, right? Every application usually have a database transactions, when it is interacting with the database. So, can you discuss about database transaction with respect to distributed services? Answer: Sure, […]

Understanding equals() and hashCode() in Java

Introduction In Java, equals() and hashCode() are two fundamental methods present in the Object class which are used for comparing object equality and for use in collections, respectively. It’s a common practice to override these methods in your own classes, especially if you want to compare object equality based on their logical state rather than their identity. The equals() Method The […]