Posts

Ollama + Gemma 4 Local AI Setup Guide

Image
Ollama + Gemma 4 Local AI Setup Guide Install and run a local LLM on an external drive — step by step   Overview This guide walks you through installing Ollama and the Gemma 4 language model entirely on an external drive, so your main system drive stays clean. You will also learn how to expose the model via an API for use in tools like Postman or your own applications.   Topic Details Tool Ollama — a lightweight local LLM runner Model Gemma 4 by Google (~9 GB RAM required) Storage External drive (e.g. D:\ or F:\ OS Windows (PowerShell) API Port localhost:11434   Part 1 — Download Ollama Visit the official Ollama website to download the Windows installer.   •         Go to: https://ollama.com/download •         Download the OllamaSetup.exe file   ?...

North - South and East - West principle in Coding

  The “North–South” and “East–West” principle in coding is simply about understanding how data moves in and out of your system (North–South) versus how it flows internally between services (East–West). Think of it like traffic: cars entering/exiting a city vs. cars moving between neighborhoods inside the city. 🌐 Simple Explanation North–South Traffic Definition: Data crossing the boundary of your system. Examples: A user’s browser sending a request to your API. Your service calling an external payment gateway. Security Needs: Protect entry and exit points with HTTPS/TLS, firewalls, API gateways, and monitoring. East–West Traffic Definition: Data moving inside your system between microservices. Examples: Orders service talking to Payments service. Pods communicating inside Kubernetes. Security Needs: Encrypt internal calls (mTLS), use service meshes (Istio, Linkerd), and enforce “zero trust” (always verify, even internally). 🧭 Easy Compass Metaphor No...

How to create GIT Hub OAuth Apps

Image
Register GitHub OAuth App Go to https://github.com/settings/developers Click "New OAuth App" (or "OAuth Apps" → "New OAuth App") Fill in Application name: Bridge Integration (or any name) Homepage URL: http://localhost:3000 Authorization callback URL: http://localhost:3000/api/oauth/github/callback Click "Register application" Copy the Client ID (a long string, not "8") Click "Generate a new client secret" and copy it  we can use this in our application.

Alternative to Short Polling

  The best alternative to short polling depends on who needs to talk (just the server, or both) and how often the data changes. Here are the three industry-standard alternatives: 1. Long Polling (The "Bridge" Solution) Long polling is the closest relative to short polling but much more efficient. Instead of the server saying "No" immediately, it holds the request open until data is ready or a timeout occurs. How it works: Client asks $\rightarrow$ Server waits until the PDF is processed $\rightarrow$ Server responds $\rightarrow$ Client immediately asks again. Best for: Tasks that take a variable amount of time (like AI processing) where you want to reduce empty network traffic. Pros: Easy to implement; works everywhere (no special protocols). 2. Server-Sent Events (SSE) (The "Streamer") SSE allows the server to push updates to the client over a single, long-lived HTTP connection. It is unidirectional (Server $\rightarrow$ Client). How it works...