Skip to main content

Concurrency Control in Seat Booking: Complete Guide

· 8 min read
Anand Raja
Senior Software Engineer

When multiple users try to book the same seat simultaneously, we need concurrency control mechanisms to ensure only one user succeeds. Let me explain each approach step by step.

The Core Problem

Timeline of Concurrent Requests:
T1: User A checks seat C1 → Available ✅
T2: User B checks seat C1 → Available ✅
T3: User C checks seat C1 → Available ✅
T4: User A books seat C1 → Success
T5: User B books seat C1 → Success (PROBLEM!)
T6: User C books seat C1 → Success (PROBLEM!)

Result: Triple booking without concurrency control

NoSQL vs SQL: Types and Comparisons

· 3 min read
Anand Raja
Senior Software Engineer

Why NoSQL is Used Over SQL

NoSQL databases are chosen over traditional SQL (relational) databases in scenarios where:

1. Flexible Schema

  • NoSQL allows dynamic, schema-less data structures (e.g., JSON, BSON).
  • Useful when data models change frequently or are not well-defined upfront.

2. Scalability

  • NoSQL databases are designed for horizontal scaling (adding more servers).
  • Ideal for handling large volumes of data and high-traffic applications.

3. Performance

  • Optimized for high-speed read/write operations.
  • Can handle big data and real-time web apps more efficiently.

4. Handling Unstructured Data

  • Supports storage of unstructured, semi-structured, or nested data (e.g., documents, key-value pairs, graphs).
  • Suitable for use cases like social media, IoT, and content management.

5. High Availability and Fault Tolerance

  • Many NoSQL databases offer built-in replication and distribution.
  • Ensures data is always available, even if some nodes fail.

6. Big Data and Real-Time Analytics

  • NoSQL is often used for big data analytics, streaming, and real-time processing.

Guide to Property Rights and Documentation

· 9 min read
Anand Raja
Senior Software Engineer

This guide provides essential information about property rights and documentation in Bangalore, Karnataka. It covers key aspects of property ownership, legal documentation, and the transfer process that every property buyer or owner should understand. Whether you're purchasing an apartment, land, or any real estate in Bangalore, these concepts will help you navigate the legal landscape of property ownership.

Schedules in Karnataka Property Documents

In Bangalore (Karnataka) property registration documents, schedules are standardized sections that describe the property in detail:

Schedule A

  • Describes the entire property development or project
  • Includes location details (Doddabanahalli Village, Bidarahalli Hobli, etc.)
  • Contains survey numbers, boundary descriptions, and total area
  • Establishes the legal identity of the whole development

Schedule B

  • Describes the undivided share of land associated with a specific unit
  • Typically measured in square meters/square feet
  • Represents proportional ownership in common areas and land
  • Essential for apartment complexes where land is shared among owners

Schedule C

  • Details the specific property unit being transacted
  • Includes apartment number, floor, exact measurements
  • Describes physical boundaries of the unit
  • Specifies exclusive areas owned by the buyer

cURL Guide for HTTP Methods

· 3 min read
Anand Raja
Senior Software Engineer

cURL is a command-line tool used to interact with APIs and perform HTTP requests. The name cURL is derived from "Client for URLs" or simply "command URL". Below is a guide on how to use cURL for common HTTP methods.

Configuring Groq with Llama Models

· 3 min read
Anand Raja
Senior Software Engineer

Groq offers incredibly fast LLM inference through its API service, including access to Llama models. Here's a complete guide to setting up and using Groq with Llama models at no cost.

What is Groq?

Groq is an AI inference engine that provides remarkably fast LLM responses using specialized hardware accelerators (LPUs - Language Processing Units). Their free tier allows access to several models, including Meta's Llama family.

Useful Free AI Services (2025 Edition)

· 4 min read
Anand Raja
Senior Software Engineer

Chatbots & Assistants

  1. Claude.ai

    • Anthropic's conversational AI with a 100K context window on the free tier.
    • Great for long-form conversations and document analysis.
  2. Microsoft Copilot

    • Free access to GPT-4 with image generation and web browsing capabilities.
    • Integrated into Microsoft Office and Edge.
  3. Bard (Google Gemini)

    • Google's AI assistant with multimodal capabilities.
    • Free for general use with access to real-time web search.
  4. HuggingChat

    • Open-source chatbot using various open models.
    • Free and community-driven.
  5. Poe

    • Platform offering free limited access to multiple AI models like GPT-4, Claude, and others.

Ollama: Usage Notes & Quick Reference

· 10 min read
Anand Raja
Senior Software Engineer

Ollama is an open-source tool that is designed to simplify the process of running large language models locally, meaning on your own hardware. The idea here is very simple. As you know, if you want to run large language models or use a model, most likely you will have to rely on paid services like OpenAI, ChatGPT, and others.

With Ollama, you don't have to pay for anything—it's free, and that's the beauty. Ollama sits at the center and allows developers to pick different large language models depending on the situation and their needs. At its core, Ollama uses a command-line interface (CLI) to manage backend tasks like installation and execution of different models, all of which run locally. Ollama abstracts away the technical complexities involved in setting up these models, making advanced language processing accessible to a broader audience, including developers, researchers, and hobbyists. In a nutshell, Ollama provides a straightforward way to download, run, and interact with various models or LLMs without relying on cloud-based services or dealing with complex setup procedures.

Open LLMs: Concepts, Parameters, Ecosystem, and Usage

· 17 min read
Anand Raja
Senior Software Engineer

What is an Open LLM?

An Open LLM (Large Language Model) is a language model whose architecture, weights, and often training code are openly available for anyone to use, modify, and run. Unlike proprietary LLMs (like OpenAI’s GPT-4 or Google Gemini), open LLMs can be run locally, fine-tuned, and integrated into custom workflows without vendor lock-in or sending your data to third-party servers.