<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arjavdongaonkar on Medium]]></title>
        <description><![CDATA[Stories by Arjavdongaonkar on Medium]]></description>
        <link>https://medium.com/@arjavdongaonkar?source=rss-e5805b0dd52e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SqI2RS26Q1laHt5xXG07Gw.jpeg</url>
            <title>Stories by Arjavdongaonkar on Medium</title>
            <link>https://medium.com/@arjavdongaonkar?source=rss-e5805b0dd52e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:00:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arjavdongaonkar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Evaluating and Architecting MCP Gateways]]></title>
            <link>https://arjavdongaonkar.medium.com/evaluating-and-architecting-mcp-gateways-187312ff5b36?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/187312ff5b36</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcp-gateway]]></category>
            <category><![CDATA[ai-infrastructure]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sat, 01 Nov 2025 17:19:59 GMT</pubDate>
            <atom:updated>2025-11-01T17:19:59.645Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is MCP (Model Context Protocol)?</h3><p>The Model Context Protocol (MCP), introduced by Anthropic, is rapidly becoming the standard for connecting AI models with external tools and data sources. As agentic AI workflows gain prominence, MCP is like hands for the agent to do stuff.</p><p>However, as organizations scale, managing multiple MCP servers becomes increasingly complex. Each server may have different authentication mechanisms, security policies, and monitoring capabilities.</p><h3>Why MCP Gateways Are Essential ?</h3><p>A centralized architecture layer that sits between AI agents and MCP servers. Think of it as an API gateway specifically designed for AI tool access. The gateway provides:</p><ul><li><strong>Single Entry Point</strong>: One unified endpoint for all MCP tool access, simplifying client configuration</li><li><strong>Consistent Security</strong>: Centralized authentication, authorization, and policy enforcement across all tools</li><li><strong>Enterprise Readiness</strong>: Audit trails, rate limiting, multi-tenancy support, and compliance features</li><li><strong>Operational Visibility</strong>: Comprehensive monitoring, logging, and tracing of all AI-tool interactions</li></ul><p>In modern AI infrastructure, the API gateway handles external traffic routing, while the MCP gateway provides fine-grained control over AI-specific tool access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mobF6cq1QM4uUrl1xr0hHQ.png" /><figcaption>MCP Gateway in AI infra</figcaption></figure><p>To tryout with MCP Gateways on local, create a <strong>local MCP server</strong> with a single tool, say ping → which responds with pong</p><p>Write a simple Python <strong>client</strong> that will call these tools using different transports, for eg. streamble HTTP.</p><p>Calling the tool directly via the client should work. Now we want to establish an MCP gateway in between to test some functionalities.</p><p><strong>POCs / Use cases</strong></p><ol><li>AuthN/AuthZ: basic auth, JWT, OAuth2/OpenID Connect. Role-based access to specific tools or servers. API key management and rotation.</li><li>Multi-tenant isolation (e.g., different teams have separate MCP servers).</li><li>Audit trail of who accessed what with which token. Request/Response Tracing: Log every MCP call, input, and output (with redaction rules for sensitive data).</li><li>Policy Enforcement: Define rules like “This model/tool cannot call external URLs” or “Don’t allow filesystem writes except in /sandbox.”</li><li>Hot reloading MCP servers without restarting the gateway.</li><li>Test multiple transports (stdio, HTTP, SSE, WebSocket).</li><li>Sticky sessions for stateful MCP connections.</li><li>Rate Limiting &amp; Quotas: Per-user or per-tool rate limits. Example: “Only 100 calls/minute to web-search tool.”</li><li>Middleware / Interceptor support</li><li>UI for better catalog management</li></ol><h3>Open Source MCP Gateway Products</h3><h3>IBM Context Forge</h3><p><strong>Repository</strong>: <a href="https://github.com/IBM/mcp-context-forge">github.com/IBM/mcp-context-forge</a></p><p>IBM’s Context Forge is the most feature-rich MCP gateway currently available, with extensive documentation and a comprehensive roadmap. While explicitly marked as experimental and not production-ready, it demonstrates IBM’s serious investment in the MCP ecosystem.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Authentication</strong>: Simple auth, JWT, and OAuth2 with proxy auth support</li><li><strong>Observability</strong>: OpenTelemetry integration, detailed audit logs, tool access metrics, and extension logging</li><li><strong>Dynamic Registry</strong>: Hot reloading of tools and servers without restart</li><li><strong>Transport Coverage</strong>: Supports all transport types (STDIO, HTTP, SSE, WebSocket)</li><li><strong>Middleware</strong>: Python-based plugin system for custom policy enforcement</li><li><strong>Management UI</strong>: Available but recommended to disable in production</li></ul><h3>Docker MCP Gateway</h3><p><strong>Repository</strong>: <a href="https://github.com/docker/mcp-gateway">github.com/docker/mcp-gateway</a></p><p>Docker’s official MCP gateway focuses on simplicity and Docker-native deployment. It provides essential gateway functionality with minimal complexity, making it attractive for teams already invested in Docker ecosystems.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Server Management</strong>: List, inspect, and call MCP tools, resources, and prompts across multiple servers</li><li><strong>OAuth Integration</strong>: Built-in OAuth flows for service authentication</li><li><strong>Dynamic Discovery</strong>: Automatic tool, prompt, and resource discovery from running servers</li><li><strong>Server Catalog</strong>: Configuration management for multiple MCP catalogs</li><li><strong>Monitoring</strong>: Built-in logging and call tracing with OTEL support</li><li><strong>Interceptors</strong>: Support for Bash scripts, Docker images, and HTTP endpoints</li></ul><h3>MetaMCP</h3><p><strong>Repository</strong>: Available with documentation <a href="https://docs.metamcp.io/">online</a></p><p>MetaMCP introduces interesting concepts like namespace-based server grouping but remains in early experimental stages with visible instability issues.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Management UI</strong>: Visual interface for catalog management</li><li><strong>Namespaces</strong>: Group MCP servers for logical organization (potential multi-tenancy)</li><li><strong>Authentication</strong>: Simple authentication and OAuth2 (Beta)</li><li><strong>Dynamic Registry</strong>: Hot reloading support</li><li><strong>Transport Coverage</strong>: Supports all transport types</li></ul><p>In my opinion, each of the products mentioned above offers unique value. You should get your hands dirty and try setting up each one locally and experiment with them. It’s a great hands-on way to deepen your understanding of MCP implementations and the different communication protocols they use.</p><h3>MCP Ecosystem Trends</h3><p>The MCP ecosystem is evolving rapidly with several clear trends emerging:</p><p><strong>Consolidation Around Standards</strong>: As MCP gains adoption, expect standardization of gateway interfaces, middleware APIs, and management protocols. This will reduce fragmentation and improve interoperability.</p><p><strong>Enterprise Feature Maturation</strong>: The gap between current open-source offerings and enterprise needs is obvious. Vendors will prioritize RBAC, multi-tenancy, compliance features, and production hardening over the next 12 months.</p><p><strong>Cloud Provider Integration</strong>: Major cloud providers (AWS, Azure, GCP) will likely offer managed MCP gateway services, similar to API gateway offerings. Microsoft’s early investment signals this direction.</p><p><strong>Security Specialization</strong>: Expect purpose-built security gateways to emerge as a distinct category, similar to API security gateways vs. general-purpose API gateways.</p><h3>Emerging Features to Watch</h3><p><strong>AI-Powered Tool Selection</strong>: Intelligent routing based on natural language intent, automatically selecting the best tool from a catalog of hundreds.</p><p><strong>Federated Gateways</strong>: Multi-region, multi-cluster gateway deployments with cross-gateway tool discovery and policy synchronization.</p><p><strong>Prompt Injection Defense</strong>: Built-in detection and mitigation of prompt injection attacks at the gateway layer.</p><p><strong>Cost Management</strong>: Per-tool and per-user cost tracking, budgets, and alerts for expensive AI operations.</p><p><strong>Policy-as-Code</strong>: Declarative policy definitions using languages like OPA (Open Policy Agent) for sophisticated governance.</p><h3>Conclusion</h3><p>The MCP gateway landscape is in its infancy, with no single product ready for enterprise production use today. However, the trajectory is clear: as agentic AI adoption accelerates, MCP gateways will become critical infrastructure, as essential as API gateways are for microservices.</p><p>The AI gateway category is where API gateways were in 2012. Nascent but inevitable. Organizations deploying agentic AI today should invest in gateway infrastructure, even if it means accepting the uncertainty and writing your own custom solutions.</p><p>I personally loved IBMs work on MCP Context Forge. Kudos to <a href="https://medium.com/u/7648462e917d">Mihai Criveti</a> and all contributors. 🙌</p><h3>Documentation &amp; Repositories</h3><ul><li><strong>IBM Context Forge</strong>: <a href="https://github.com/IBM/mcp-context-forge">github.com/IBM/mcp-context-forge</a> | <a href="https://ibm.github.io/mcp-context-forge/">Documentation</a></li><li><strong>Docker MCP Gateway</strong>: <a href="https://github.com/docker/mcp-gateway">github.com/docker/mcp-gateway</a></li><li><strong>MetaMCP</strong>: <a href="https://docs.metamcp.io/">docs.metamcp.io</a></li><li><strong>Microsoft MCP Gateway</strong>: <a href="https://github.com/microsoft/mcp-gateway">github.com/microsoft/mcp-gateway</a></li><li><strong>Lasso Security</strong>: <a href="https://github.com/lasso-security/mcp-gateway">github.com/lasso-security/mcp-gateway</a></li><li><strong>Unla (AmoyLab)</strong>: <a href="https://github.com/AmoyLab/Unla">github.com/AmoyLab/Unla</a></li></ul><h3>Some blogs to read more on this</h3><ul><li><a href="https://www.infracloud.io/blogs/mcp-gateway/">https://www.infracloud.io/blogs/mcp-gateway/</a></li><li><a href="https://api7.ai/learning-center/api-gateway-guide/ai-gateway-vs-mcp-gateway-vs-api-gateway">https://api7.ai/learning-center/api-gateway-guide/ai-gateway-vs-mcp-gateway-vs-api-gateway</a></li><li><a href="https://hookdeck.com/blog/mcp-gateway">https://hookdeck.com/blog/mcp-gateway</a></li><li><a href="https://medium.com/@manojjahgirdar/model-context-protocol-mcp-gateway-a-middleware-meant-to-productionize-mcp-for-an-enterprise-bbdb2bc350be">https://medium.com/@manojjahgirdar/model-context-protocol-mcp-gateway-a-middleware-meant-to-productionize-mcp-for-an-enterprise-bbdb2bc350be</a></li><li><strong>Azure MCP OAuth Implementation</strong>: <a href="https://github.com/Azure-Samples/remote-mcp-apim-functions-python">Azure Samples — Remote MCP with APIM</a></li><li><strong>MCP Specification</strong>: <a href="https://modelcontextprotocol.io/">modelcontextprotocol.io</a></li></ul><p><em>This evaluation reflects the state of MCP gateways as of November 2025. Given the rapid pace of development in this space, revisit gateway options every 3–6 months as the ecosystem matures.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=187312ff5b36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Behind That ‘Login with Google’ Button ]]></title>
            <link>https://arjavdongaonkar.medium.com/behind-that-login-with-google-button-787678825d13?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/787678825d13</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[oidc]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sat, 01 Mar 2025 06:56:36 GMT</pubDate>
            <atom:updated>2025-03-01T06:56:36.130Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever logged into an app using your Google or Facebook account? That seamless experience is powered by OAuth 2.0 and OpenID Connect (OIDC).</p><p>There’s also a lot of conflicting information out there. The goal here is to explain how these standards work. Let’s get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQ9NntZhyiG3drFRPpRaBw.png" /><figcaption>Monishaa...use oAuth2.... log in with password is so middle-class</figcaption></figure><p>In the Stone Age days of the Internet, sharing information between services was easy. You simply gave your username and password for one service to another so they could log into your account and grab whatever information they wanted. However, you should never be required to share your credentials to another service. There’s no guarantee that an organization will keep your credentials safe or guarantee their service won’t access more of your personal information than necessary. It might sound crazy, but some applications still try to get away with this.</p><h3>What is OAuth 2.0</h3><p>We have agreed upon standards to securely allow one service to access data from another. <strong>OAuth 2.0 </strong>is a security standard where you give <strong>one application</strong> permission to access your data in <strong>another application</strong>. You can essentially give one app a key that gives them specific permission to access your data or do things on your behalf in another application. The steps to grant permission or consent are often referred to as authorization or delegated authorization. What’s more, you can take back that key whenever you wish. Awesome!</p><p>As an example, let’s say you’ve discovered a website named “Dad Jokes Daily” and created an account to have it send a Dad Joke as a text message every day to your phone. You love it so much that you want to share this site with everyone you’ve ever met online. Who wouldn’t want to read a terrible Dad Joke every day, am I right? However, writing an email to every person in your contacts list sounds like a lot of work, and if you’re like me, you’ll go to great lengths to avoid anything that smells like work. Fortunately, “Dad Jokes Daily” has a feature to invite your friends.</p><p>Let’s clear out some terminologies before going further.</p><ol><li><strong>Resource Owner </strong>— That’s you. You are the owner of your identity, your data, and any actions that can be performed with your accounts.</li><li><strong>Client</strong> — This is the application in our example, “Dad Jokes Daily,” that wants to access data or perform actions on behalf of you, the resource owner.</li><li><strong>Authorization Server</strong> — This is the application that knows the resource owner, where the resource owner already has an account.</li><li><strong>Resource Server</strong> — The API or service the client wants to use on behalf of the resource owner.</li><li><strong>Redirect URI </strong>— URL the Authorization Server will redirect the resource owner back to after granting permission to the client. This is sometimes referred to as the callback URL.</li><li><strong>Response Type</strong> — A type of information the client expects to receive. The most common response type is “<strong>code</strong>,” where the client expects to receive an authorization code.</li><li><strong>Scope</strong> — Granular permissions the client wants, such as access to data or to perform actions.</li><li><strong>Consent</strong> — When the Authorization Server takes the Scopes the client is requesting and verifies with the resource owner whether or not they want to give the client permission.</li><li><strong>Client ID</strong> — An ID used to identify the client with the Authorization Server.</li><li><strong>Client secret </strong>— A secret password that only the client and the Authorization Server know. This allows them to securely share information privately behind the scenes.</li><li><strong>Authorization Code</strong> — A short-lived, temporary code the Authorization Server sends back to the client.</li><li><strong>Access token</strong> — The key client will use from that point forward to communicate with the Resource Server.</li></ol><p>Now that we have some of the OAuth 2.0 vocabulary handy, let’s revisit our example with a closer look at what’s going on throughout the OAuth flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*U24a2INO3jkorz0M.jpg" /><figcaption>Amazing illustration by David Neal</figcaption></figure><ol><li>You, (<strong>Resource Owner</strong>), want to allow “Dad Jokes Daily” (<strong>Client</strong>), to access your contacts so they can send invitations to all your friends.</li><li>The client redirects your browser to the <strong>Authorization Server</strong> and includes with the request the <strong>client ID</strong>, <strong>redirect URI</strong>, <strong>response type</strong>, and one or more <strong>scopes</strong> it needs.</li><li>The Authorization Server <strong>verifies</strong> who you are and, if necessary, prompts for a <strong>login</strong>.</li><li>The Authorization Server then presents you with a <strong>form</strong> based on the Scopes requested by the client, and you have the opportunity to <strong>grant</strong> or <strong>deny</strong> <strong>permission</strong>.</li><li>The Authorization Server redirects back to the client using the <strong>redirect URI</strong>, along with a temporary <strong>authorization code</strong>.</li><li>The client then contacts the Authorization Server directly (it does not use the resource owner’s browser) and securely sends its client ID, <strong>client secret</strong>, and authorization code.</li><li>The Authorization Server verifies the data and responds with an <strong>access token</strong>. The access token is a value the client doesn’t understand. As far as the client is concerned, the access token is just a string of gibberish.</li><li>The client can use the access token to send requests to the <strong>Resource Server</strong>. The client is like, “Here’s an access token, I would like the contacts associated with the resource owner of this token.”</li><li>The Resource Server verifies the access token, and if valid, responds with the contacts requested.</li></ol><p>“Dad Jokes Daily” can now send emails to everyone you know, and you’ll be the most popular person ever. OAuth for the win!</p><blockquote>Before all this, the client and the Authorization Server established a working relationship. The Authorization Server generated a client ID and client secret and gave them to the client to use for all future exchanges. This is how the Authorization Server can verify the client.</blockquote><p>The OAuth flow in this example is made of visible steps to grant consent as well as some invisible state, where the two services agree on a secure way of exchanging information.</p><h3>What is OpenID Connect (OIDC)?</h3><p>Now, let’s talk about <strong>OpenID Connect</strong>. OIDC is a thin layer that sits on top of OAuth 2.0 that adds functionality to get profile information about the person who is logged in. Instead of a key, OIDC is like giving the client application a badge. The badge not only gives the client specific permissions but also provides some basic information about who you are.</p><ul><li><strong>OAuth</strong> enables <strong>authorization</strong> (one app accessing another on your behalf).</li><li><strong>OIDC</strong> enables <strong>authentication</strong> (verifying who you are) and provides <strong>identity</strong> information about the resource owner.</li></ul><p>When an Authorization Server supports OIDC, it is called an <strong>Identity Provider</strong> since it provides information about the resource owner back to the client. OpenID Connect enables scenarios where one login can be used across multiple applications, also known as <strong>Single Sign-On</strong> or <strong>SSO</strong>.</p><p>One way you might think of OIDC is kind of like using an ATM. <br>The ATM is the client. Its job is to access data such as your bank balance and perform banking transactions. Your bank card is the token that’s issued by the bank. It not only gives the ATM access to your account (the authorization), but it also has some basic information about who you are, your identity, such as your name and authentication information such as when the card expires, who issued the card, and the bank’s phone number. An ATM can’t work without the underlying bank infrastructure.</p><p>Similarly, OIDC sits on top of OAuth and cannot work without the underlying OAuth framework. The OpenID Connect flow looks the same as OAuth. The only difference is, that a specific scope of <strong>OpenID</strong> is used. This lets the Authorization Server know this will be an OpenID Connect exchange. The Authorization Server goes through all the same steps and the client receives an access token and an <strong>ID token</strong>. The ID token is a specifically formatted string of characters known as a <strong>JSON Web Token</strong> or <strong>JWT</strong>. A JWT may look like gibberish to you and me, but the client can extract information embedded in the JWT, such as your ID, name when you logged in, and the ID token’s expiration, and it can tell if anyone has tried to tamper with the JWT. The data inside the ID token are called claims.</p><p>Well, that’s it, folks. That is OAuth and OIDC in a nutshell. These two work together to securely authorize access to resources and authenticate users. Whether you’re logging into an app with your social media account or using Single Sign-On (SSO) at work, these technologies are the backbone of modern digital identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/0*O4oG9uzpEi0PwH4k.jpg" /><figcaption>Not possible, HA HA!</figcaption></figure><p>Further readings</p><ol><li><a href="https://youtu.be/996OiexHze0?si=x7nUEYgFNNCNUXYq">https://youtu.be/996OiexHze0?si=x7nUEYgFNNCNUXYq</a></li><li><a href="https://developer.okta.com/blog/2019/10/21/illustrated-guide-to-oauth-and-oidc">https://developer.okta.com/blog/2019/10/21/illustrated-guide-to-oauth-and-oidc</a></li><li><a href="https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce">https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=787678825d13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t panic! Let me explain how Docker works .]]></title>
            <link>https://arjavdongaonkar.medium.com/dont-panic-let-me-explain-how-docker-works-085b7ff5d44e?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/085b7ff5d44e</guid>
            <category><![CDATA[namespaces]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[cgroup]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 11:18:32 GMT</pubDate>
            <atom:updated>2024-11-28T07:41:00.573Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Containers are not the future; they are the present. Learn them, master them, and use them.</blockquote><p><a href="https://docs.docker.com/">Docker</a> — a tool for reproducible, isolated environments. Docker isn’t just about containers; it’s a mindset shift in how we build, ship, and run applications.</p><p>Ever heard the phrase, <em>‘But it works on my machine’?</em> Docker ensures you never hear that again. Here’s how it transforms software development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mXinKshl3ERf-nE1.png" /></figure><h3>Why Docker?</h3><p>Before Going into <strong>what</strong> and <strong>how</strong> Docker, let’s see <strong>why</strong> <strong>Docker</strong> first.</p><p><strong>The ‘It Works on My Machine’ Problem</strong>:</p><ul><li>Most common challenge developers face is environment inconsistency. Application breaks on another machine due to differences in OS, dependencies hell, or configurations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*IYBQX1tLzJNiPl5FAMenLg.jpeg" /><figcaption>It is was it is. Not My Problem!!</figcaption></figure><p><strong>The Challenge of Traditional Virtual Machines (VMs)</strong>:</p><ul><li>To manage multiple VMs, you need a <a href="https://aws.amazon.com/what-is/hypervisor/#:~:text=A%20hypervisor%20is%20a%20software,individual%20virtual%20machines%20as%20required."><strong>hypervisor</strong></a> — a layer that allocates resources to VMs. Although efficient for isolating environments, VMs still duplicate a lot of infrastructure.</li><li>VM requires its own complete OS, drivers, and infrastructure. While functional, this approach means high resource demands, limited scalability, and slow deployment.</li></ul><p>Docker solves these problems by packaging the application along with all its dependencies and configurations into a <strong>container</strong>. Containers provide a consistent environment regardless of where they’re deployed.</p><p>Unlike VMs, these <strong>lightweight, Isolated Containers </strong>share the host OS’s kernel while still remaining isolated. This efficiency allows containers to be created and scaled with minimal overhead, making them ideal for cloud-native applications, CI/CD pipelines, and microservices architectures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JFe21t3DICIBHuvc1iKG3g.png" /><figcaption>Some may prefer Purple, others may favour Blue, but a true DevOps finds their stride with the blend — a `bluer shade of purple` (Mixture of VMs and Containers)</figcaption></figure><h3>What Docker?</h3><p>Docker is a containerization tool designed for the ever-evolving tech industry. It allows applications to be packaged with their dependencies, ensuring <strong>consistency</strong> across environments. Docker provides a solution for <strong>scalability</strong> and <strong>isolation</strong>, enabling efficient use of resources while keeping applications <strong>secure</strong> and <strong>independent</strong> from one another. This makes it easier to manage complex applications and scale them across different platforms.</p><p>Think of Docker as your magic suitcase. No matter where you go, you have everything you need — your code, tools, and configurations neatly packed and ready to use.</p><h3>How Docker?</h3><p>Now some basic concepts to know how docker works</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*DyRz5zGTLYLcrA6OTF45wA.png" /><figcaption>So many terms, But He said not to panic !!</figcaption></figure><h4><strong>Namespaces</strong></h4><p><a href="https://man7.org/linux/man-pages/man7/namespaces.7.html">Namespaces</a> are a feature of the Linux kernel that partitions kernel resources such that one set of processes sees one set of resources while another set of processes sees a different set of resources.</p><p>Basically, Namespaces allows us to simulate a mini, private environment where each feels like it’s running on its own machine.</p><ul><li><strong>PID Namespace</strong>: Each namespace has its own process IDs, so processes in one container are invisible to others.</li><li><strong>NET Namespace</strong>: Creates isolated network interfaces, IP addresses, and routing tables.</li><li><strong>MNT Namespace</strong>: Provides each container with its own file system mount points.</li></ul><p>Let’s make a new PID namespace and run bash in it!</p><pre>$ sudo unshare --fork --pid --mount-proc bash</pre><p>What’s going on?</p><pre>root@arjav:~# ps aux<br>USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND<br>root         1  0.0  0.0  28372  4148 pts/6    S    23:01   0:00 bash<br>root         2  0.0  0.0  44432  3836 pts/6    R+   23:01   0:00 ps aux</pre><p>Wow, we’re in a whole new world! There are only 2 processes running — bash and ps. Cool, that was easy!</p><p>It’s worth noting that if I look from my regular PID namespaces, I can see the processes in the new PID namespace:</p><pre>root     14121  0.0  0.0  33264  4044 pts/6    S+   23:09   0:00 htop</pre><p>This process 14121 (regular namespace) is process 3 in my new PID namespace. So they’re two views on the same thing, but one is a lot more restricted.</p><h4>cgroups (Control Groups)</h4><p><a href="https://man7.org/linux/man-pages/man7/cgroups.7.html">cgroups</a> (abbreviated from control groups) is a Linux kernel feature that <strong>limits, accounts for, and isolates the resource usage </strong>such as CPU time, system memory, network bandwidth<strong> of a collection of processes</strong></p><p>A very brilliant video explaining namespaces and cgroups is <a href="https://youtu.be/-YnMr1lj4Z8?si=Y2pPaGKjoMyjxl0w">here</a>.</p><h4>Containers</h4><p>At its core, a <strong>container</strong> is a lightweight, standalone unit that includes an application and all its dependencies. Containers are much smaller and faster than traditional VMs because they don’t need a full OS; they simply share the host OS kernel.</p><h4>containerd</h4><p><a href="https://containerd.io/docs/"><strong>containerd</strong></a> is the container runtime. Think of it as a resource manager, responsible for creating, managing, and deleting containers, managing image storage, and pulling images from a registry. While it’s mostly behind the scenes, containerd is essential for managing container lifecycles.</p><h4>runc</h4><p><a href="https://www.docker.com/blog/runc/"><strong>runc</strong></a> is a lightweight, low-level container runtime. It provides the container’s environment for <strong><em>creating and running containers </em></strong>as specified by the <strong>Open Container Initiative (OCI)</strong> standards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*Vc7nn7urBPkfUui8.png" /><figcaption>And that’s how it’s done!</figcaption></figure><p>Understanding containers has never been so simple as it is explained <a href="https://youtu.be/EnJ7qX9fkcU?si=yDvfizLYQ-Sb9hZU">here</a>.</p><h4>UnionFS (Union File System)</h4><p><a href="https://man.freebsd.org/cgi/man.cgi?unionfs">UnionFS</a> is a filesystem layer. When a container runs, UnionFS stacks the layers to create a single, cohesive filesystem. Think of UnionFS as Lego blocks. Each layer builds on top of the other to create a complete, reusable application FS.</p><p>Okay, now that you’ve seen these Linux features you might think “wow, yeah, I could build a bunch of scripts around all these features and have something really cool!” It would be really lightweight and my processes would be isolated from each other, and, wow!</p><p>And that’s how Docker was born! Of course Docker has a lot of features these days, but a lot of it is built on these basic Linux kernel primitives.</p><h3>Docker Architecture</h3><p>Docker can create an isolated environment (thanks to <strong>namespaces</strong>), limit resources (using <strong>cgroups</strong>), and manage the entire lifecycle of containers (with <strong>containerd</strong> and <strong>runc</strong>), all while ensuring the efficient reuse of files (through <strong>UnionFS</strong>).</p><p>Imagine you want to share <em>misal pav </em>with Anushka, who lives in Boston. Instead of sending her the cooked dish, you send the recipe and special spices you created. That’s essentially what a <strong>Docker image</strong> is — a blueprint that can be used to recreate the application anywhere. Docker image is created from <strong>Dockerfile </strong>(recipe), which defines each step to build the environment the application needs.</p><p>A <strong>Docker container</strong> is the running instance of this image. The Docker platform uses standards set by the <strong>Open Container Initiative (</strong><a href="https://opencontainers.org/"><strong>OCI</strong></a><strong>)</strong> to ensure compatibility and portability of these containers across environments.</p><h3>Key Components of Docker Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*NjsMTnMvVKfXwkJHHKA_9g.png" /><figcaption>Simple, Isn’t It?</figcaption></figure><h4>Docker Engine</h4><p>The Docker Engine is the core of Docker. It manages the full lifecycle of Docker images and containers. The Engine consists of both the <strong>Docker Daemon</strong> and <strong>Docker CLI</strong>.</p><h4>Docker Daemon</h4><p>The Docker Daemon (dockerd) is a background service that manages everything Docker does. It listens to Docker API requests, manages images, containers, network connections, and handles interactions with the underlying OS.</p><h4>CLI (Command-Line Interface)</h4><p>Docker’s CLI provides a user-friendly command line for users to interact with Docker, such as building images, running containers, or pushing images to a registry. Using commands like docker pull, docker run, and docker stop, you control and automate Docker’s functionality.</p><h4>Docker Registry</h4><p>The Docker Registry is like a “warehouse” where Docker images are stored and retrieved. <strong>Docker Hub</strong> is the default public registry, containing a wide variety of prebuilt images (like Ubuntu or Nginx) that can be downloaded. Users can also set up private registries to store custom images securely.</p><h3>Docker Image Layers</h3><p>Docker images are composed of <strong>layers</strong>, and each line in a Dockerfile represents one layer. Docker’s layer-based system enables efficient, lightweight images by caching each layer. When changes are made to a Dockerfile, only the changed layers are rebuilt, while the rest are reused from the cache. This layer caching makes deployments faster and reduces image size significantly, as unchanged layers don’t need to be recreated or sent again. The <strong>Union File System (UnionFS)</strong> allows these layers to be stacked and combined to form a single, unified image.</p><h3>How Docker Communicates:</h3><p>To handle communications, Docker uses <a href="https://grpc.io/docs/"><strong>gRPC</strong></a>. gRPC is an open-source framework that allows <strong>R</strong>emote <strong>P</strong>rocedure <strong>C</strong>alls (RPC) between services. Think of it as a high-speed highway for exchanging messages and commands between the Docker CLI and Docker Daemon.</p><h3>Docker Networking</h3><p>Networking in Docker allows containers to communicate with each other and with external networks. Docker provides three primary networking modes to accommodate different use cases: <strong>Bridge</strong>, <strong>Host</strong>, and <strong>Overlay</strong>.</p><h4>Bridge Mode</h4><p>The <strong>Bridge mode</strong> is Docker’s default networking setting. It’s like setting up a private club. Containers can mingle with each other, but outsiders can’t just walk in uninvited. When containers are created in bridge mode, Docker sets up a private, isolated network that containers can use to communicate with each other. This network has a NAT (<strong>N</strong>etwork <strong>A</strong>ddress <strong>T</strong>ranslation) firewall.</p><h4>Host Mode</h4><p>In <strong>Host mode</strong>, containers are directly connected to the host’s network interface without isolation. Instead of a private bridge, they share the host’s IP address, which removes the extra layer of abstraction. Host mode is like throwing open your house to guests. No walls, no barriers — just direct, fast access.</p><h4>Overlay Mode</h4><p><strong>Overlay networks</strong> are used to connect containers across multiple Docker hosts, typically in a Swarm or Kubernetes setup. Docker uses an encrypted virtual network layer that allows containers to communicate with each other securely, regardless of the physical location of each container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*IBFkL8fYGh0D0d2y" /><figcaption>I will decide who talks with whom!!</figcaption></figure><h3>Docker Volumes</h3><p>Docker volumes are the solution to managing and persisting data independently from containers. Containers are ephemeral by nature, meaning any data saved directly in a container is lost once the container is removed.</p><ul><li>Volumes are stored in Docker’s data directory on the host machine, separate from the container itself. This allows data to persist / shared across containers.</li></ul><blockquote>Docker is best understood by doing. Head to <a href="https://labs.iximiuz.com/playgrounds/docker">Docker Playground</a>.</blockquote><p>With Docker, we’ve left behind the chaos of ‘it works on my machine’.</p><p>But, Imagine you’re running your application in a Docker container, and the container goes down. Your app is now non responsive until you spin the container back up. Now Imagine this situation on a scale where you have hundreds or thousands of containers running.</p><p>What would you do in such a scenario? How do you ensure that containers self-heal and scale automatically ?</p><p>The containerized world is just getting started. <strong>Keep thinking…..</strong></p><figure><a href="https://www.linkedin.com/in/arjav-dongaonkar-a94728173"><img alt="" src="https://cdn-images-1.medium.com/max/545/0*O17_U-BZ4Oqj7Uep.jpeg" /></a><figcaption>if you liked it…</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=085b7ff5d44e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[प्रिय अमुचा एक महाराष्ट्र देश हा !]]></title>
            <link>https://arjavdongaonkar.medium.com/%E0%A4%AA%E0%A5%8D%E0%A4%B0%E0%A4%BF%E0%A4%AF-%E0%A4%85%E0%A4%AE%E0%A5%81%E0%A4%9A%E0%A4%BE-%E0%A4%8F%E0%A4%95-%E0%A4%AE%E0%A4%B9%E0%A4%BE%E0%A4%B0%E0%A4%BE%E0%A4%B7%E0%A5%8D%E0%A4%9F%E0%A5%8D%E0%A4%B0-%E0%A4%A6%E0%A5%87%E0%A4%B6-%E0%A4%B9%E0%A4%BE-0e690df0d8eb?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e690df0d8eb</guid>
            <category><![CDATA[shivaji-maharaj]]></category>
            <category><![CDATA[kolhatkar]]></category>
            <category><![CDATA[lata-mangeshkar]]></category>
            <category><![CDATA[marathi]]></category>
            <category><![CDATA[maharashtra]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Fri, 12 Jul 2024 06:52:45 GMT</pubDate>
            <atom:updated>2024-07-17T13:40:27.276Z</atom:updated>
            <content:encoded><![CDATA[<h3>प्रिय अमुचा एक महाराष्ट्र देश हा !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F_Vh2RV57m1O9r5Q.jpg" /></figure><p>राजगडच्या भव्य दगडांवर उभा राहिलो तेव्हा समोरच्या दृश्याने इतिहासाचा एक चित्रपट उलगडला. किल्ल्याभोवती धुकं एका जुन्या काळाच्या कथा कुजबुजत होतं. मला छत्रपती शिवाजी महाराजांचे शब्द आणि लढाईसाठी तयार असलेल्या मावळ्यांचे “हर हर महादेव” ऐकू येत होते. किल्ल्याचा विशाल विस्तार, त्याच्या जीर्ण भिंती आणि शाश्वत बुरूज, जणू धाडसाचा साक्षात्कार होता. येथे मराठा साम्राज्य घडवणारे निर्णय घेतले गेले आणि शौर्य, बुद्धीमत्ता आणि न्यायाच्या आदर्श उभा केला गेला. राजगड बालेकिल्ल्याच्या मधोमध उभा राहून माझ्या डोळ्यात अश्रू आले आणि माझ्या समोर असलेल्या परंपरेची जाणीव होऊन मी भारावून गेलो.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ifAVX6XS-65YBc6N" /></figure><p>हा किल्ला, मराठा साम्राज्याची पहिली <strong>राजधानी</strong>, केवळ एक लष्करी ठाणे नव्हते. हे मराठा साम्राज्याचे हृदय होते, जिथे छत्रपती शिवाजी महाराजांच्या नेतृत्वाखाली स्वराज्यात शौर्य, बुद्धीमत्ता आणि न्यायाच्या आदर्शांना आकार देण्यात आला. मला भूतकाळाशी एक नाते जाणवत होते — एक असे नाते ज्यामुळे मला आमच्या भूमीबद्दल खोल अभिमान आणि आदराची भावना निर्माण झाली. दारिद्र्याच्या उन्हात थिजलेल्या आणि निढळाच्या घामाने भिजलेल्या या आपल्या महाराष्ट्र देशाने कैक जिकरीचे दिवस पहिले आहेत. पण वरवार होणाऱ्या सुलतानी स्वाऱ्या, दुष्काळी, परकीय आक्रमणे, यामधून सुद्धा महाराष्ट्र ची पवित्र परंपरा ही जनमानसात वाहत राहिली.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XJS5HsS6xQSae664.png" /></figure><h4><strong>मराठी भाषा आणि संस्कृतीचा समृद्ध वारसा</strong></h4><p>या ऐतिहासिक स्थळासोबतच माझे विचार मराठी भाषा आणि संस्कृतीकडे वळले. महाराष्ट्राचा वारसा केवळ स्मारके आणि ऐतिहासिक स्थळांमध्येच जतन केला गेला नाही, तर तो आपली बोली भाषा मराठी आणि आपली गाणी यात देखील जिवंत आहे. <strong>मराठी</strong>, तिच्या काव्यात्मक सौंदर्य आणि समृद्ध परंपरांसह, कथा, मूल्ये आणि भावना यांचा खजिनाच आहे, ज्यांना युगानुयुगे जपले आहे.</p><p>लावणीच्या तालबद्ध ठेक्यापासून ते नाट्य संगीताच्या आत्मीय स्वरांपर्यंत, मराठी गाणी महाराष्ट्राच्या हृदयाचे दर्शन घडवतात. यामध्ये ऐतिहासिक महाकाव्यांपासून ते जीवनाच्या साध्या आनंदापर्यंत सर्व काही साजरे केले जाते.</p><h4>प्रिय अमुचा एक महाराष्ट्र देश</h4><p><strong>श्रीपाद कृष्ण कोल्हटकरां</strong>नी लिहिलेले आणि महान गायिका <strong>लता मंगेशकरांनी</strong> सजीव केलेले हे प्रसिद्ध सुंदर गीत. हे गाणं आपल्या महाराष्ट्र देशाला एक मनःपूर्वक श्रद्धांजली आहे, ज्यात महाराष्ट्राच्या सौंदर्य, शौर्य आणि सांस्कृतिक अभिमानाचे सार सामावले आहे. <br>खुप सुंदर रचना असलेले हे गाणे फार कमी लोकांना माहिती आहे. या गाण्याच्या भावार्था बद्दल आपण माहिती करून घ्यायला हवी. सर्व लोकांपर्येन्त हा अर्थ पोहोचवण्याचा हाच माझा छोटा प्रयत्न</p><blockquote><strong>बहु असोत सुंदर संपन्न की महा । प्रिय अमुचा एक महाराष्ट्र देश हा ।</strong></blockquote><blockquote>अनेक प्रदेश महाराष्ट्रापेक्षा सुंदर आणि समृद्ध होऊ दे,<br>पण आपला लाडका महाराष्ट्र सर्वांत श्रेष्ठ आहे.</blockquote><blockquote>(Let many regions be beautiful and prosperous,<br>But our beloved Maharashtra is the greatest of all)</blockquote><blockquote><strong>गगनभेदि गिरिविण अणु नच जिथे उणे । आकांक्षापुढति जिथे गगन ठेंगणे ।</strong></blockquote><blockquote>महाराष्ट्रात भलेही प्रचंड हिमालय नसेल, पण जिथे आकाशाला छेद देणारे पर्वत नसले तरी कणभरही कमतरता नाही. जिथे आकांक्षांपुढे आकाश ही ठेंगणे वाटते.</blockquote><blockquote>(Maharashtra may not have the towering Himalayas, but where even without sky-piercing mountains, not a particle is lacking. Where aspirations make the sky seem small)</blockquote><blockquote><strong>अटकेवर जेथले तुरंगी जल पिणे । तेथ अडे काय जलाशय नदाविणे ।</strong></blockquote><blockquote>शूर मराठा योद्ध्यांनी लढाया जिंकल्या आणि मराठा साम्राज्याचा झेंडा (साध्या पाकिस्तानातील ) टकेपार लावला. मराठा घोडे तर अटक येथील पाणी पितात, त्यामुळे जलाशयांची किंवा मोठमोठ्या नद्यांची गरज नाही.</blockquote><blockquote>(The valorous Maratha warriors won battles and extended the Maratha Empire’s borders to Attock, Pakistan. Where Maratha horses drink water at Attock, there is no need for reservoirs or rivers.)</blockquote><blockquote><strong>पौरुषासि अटक गमे जेथ दुःसहा ।</strong></blockquote><blockquote>जिथे शौर्याला मर्यादा घालणे असह्य होते.</blockquote><blockquote>(Where restricting valor becomes unbearable.)</blockquote><blockquote><strong>प्रासाद कशास जेथ हृदयमंदिरें। सद्‍भावांचीच भव्य दिव्य आगरें।</strong></blockquote><blockquote>महाराष्ट्रात दिल्ली, आग्रा, राजस्थान सारखे सुंदर राजवाडे नसतील पण ह्रदयमंदिरे असताना राजवाड्यांची काय गरज तिथे. सद्भावनेचे भव्य आणि दैवी भांडारच जणू!</blockquote><blockquote>(Maharashtra may not have beautiful palaces like Delhi, Agra, and Rajasthan, but where palaces are not needed, hearts are temples. Grand and divine stores of goodwill.)</blockquote><blockquote><strong>रत्‍नां वा मौक्तिकांहि मूल्य मुळी नुरे। रमणीची कूस जिथे नृमणिखनि ठरे।</strong></blockquote><blockquote>महाराष्ट्र कदाचित दिल्ली सल्तनत किंवा राजस्थानच्या राजांइतका श्रीमंत नसेल, पण रत्न-मोत्यांना तिथे किंमत नाही कारण येथील माणसे हि हिऱ्या सारखी आहेत. येथील स्त्रियांनी रत्नांच्या तोलामोलाची संतती जन्मास घातली आहे.</blockquote><blockquote>(Maharashtra may not be as rich as the Delhi Sultanate or the Kings of Rajasthan, but where gems or pearls have no value. Where a woman’s is like a diamond mine.)</blockquote><blockquote><strong>शुद्ध तिचे शीलहि उजळवि गृहा गृहा।</strong></blockquote><blockquote>तिची पवित्रता प्रत्येक घराला उजळून टाकते.</blockquote><blockquote>(Her purity brightens every home.)</blockquote><blockquote><strong>नग्‍न खड्ग करिं, उघडे बघुनि मावळे। चतुरंग चमूचेही शौर्य मावळे।</strong></blockquote><blockquote>शूर मराठा योद्ध्यांनी चालवलेल्या तलवारी पाहून, चतुरंग (सैन्य विभाग: पायदळ, घोडदळ, हत्ती आणि रथ) सैन्याचे शौर्य देखील फिके पडते.</blockquote><blockquote>(By viewing Naked swords wielded by brave Maratha warriors, Even the valor of the four-fold (referring to the army divisions: infantry, cavalry, elephants, and chariots) army fades.)</blockquote><blockquote><strong>दौडत चहुकडुनि जवें स्वार जेथले। भासत शतगुणित जरी असति एकले।</strong></blockquote><blockquote>येथील घोडेस्वार जेव्हा चारही दिशांनी धावत असतात, तेव्हा ते एकटे असले तरी शंभरपट दिसतात.</blockquote><blockquote>(Maratha Horse Riders rushing from all directions, Seeming a hundredfold even if they are alone.)</blockquote><blockquote><strong>यन्‍नामा परिसुनि रिपु शमितबल अहा।</strong></blockquote><blockquote>थोर शिवरायांचे नाव ऐकले की शत्रूच्या शक्तीची हानी होते.</blockquote><blockquote>(Hearing the great Shivaji’s name, the enemy’s strength diminishes.)</blockquote><blockquote><strong>विक्रम वैराग्य एक जागि नांदती। जरी पटका भगवा झेंडाहि डोलती।</strong></blockquote><blockquote>जिथे शौर्य आणि वैराग्य एकत्र फुलतात. जिथे सार्वभौमत्वाचा जरी पटका आणि धार्मिक अभिमानाचे प्रतीक असलेला भगवा ध्वज दोन्ही एकत्र फडकतात.</blockquote><blockquote>(Valor and renunciation together flourish. Where both the flag of sovereignty and the saffron flag, symbolizing religious pride, wave together.)</blockquote><blockquote><strong>धर्म-राजकारण समवेत चालती। शक्तियुक्ति एकवटुनि कार्य साधिती।</strong></blockquote><blockquote>धर्म आणि राजकारण या दोन्ही क्षेत्रे हातात हात घालून कार्य करतात, शक्ती व युक्ती एकवटून ध्येय पूर्ण होते.</blockquote><blockquote>(Operating in both religion and politics, harnessing power to achieve goals.)</blockquote><blockquote><strong>पसरे यत्कीर्ति अशी विस्मयावहा।</strong></blockquote><blockquote>अशी महाराष्ट्राची अद्भुत कीर्ती सर्वत्र पसरली आहे.</blockquote><blockquote>(Spreading such renowned glory, truly marvellous.)</blockquote><blockquote><strong>गीत मराठ्यांचे श्रवणीं मुखीं असो। स्फूर्ति दीप्‍ति धृतिहि जेथ अंतरी ठसो।</strong></blockquote><blockquote>मराठ्यांचे गाणे कानांवर आणि ओठांवर असू दे, प्रेरणा आणि धैर्याचा प्रकाश अंतः कारणात वसू दे.</blockquote><blockquote>(Let the song of the Marathas be on their ears and lips, Let the light of inspiration and courage stay within.)</blockquote><blockquote><strong>वचनिं लेखनींहि मराठी गिरा दिसो। सतत महाराष्ट्रधर्म मर्म मनिं वसो।</strong></blockquote><blockquote>मराठी वाणी शब्दात आणि लेखणीत दिसू दे, महाराष्ट्राच्या धर्माचे आणि कर्तव्याचे मर्म हृदयात वास करू दे.</blockquote><blockquote>(Let the Marathi voice be seen in words and writings, Let the essence of Maharashtra’s religion and duty dwell in the heart.)</blockquote><blockquote><strong>देह पडो तत्कारणि ही असे स्पृहा।</strong></blockquote><blockquote>महाराष्ट्र हित कारणास्तव माझे शरीर कामी पडू दे, अशीच माझी इच्छा आहे.</blockquote><blockquote>(May my body fall for this reason, such is my desire.)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KfuYSGs9kiPp57Jc0BXRpg.jpeg" /></figure><p>माझ्या प्रज्ञा आजीद्वारे मला हा गहन अर्थ कळाला. प्रत्येक मराठी माणसाने ह्या मौल्यवान खजिन्याबद्दल जागरूक असणं आवश्यक आहे.</p><p>हे सुंदर गाणे तुम्ही येथे ऐकू शकता, नक्कीच ऐका : <a href="https://youtu.be/TCQ-buWLtSY?si=ZF-nGK0U76WfMafS">https://youtu.be/TCQ-buWLtSY?si=ZF-nGK0U76WfMafS</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e690df0d8eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nuts and Bolts of ChatGPT !]]></title>
            <link>https://arjavdongaonkar.medium.com/nuts-and-bolts-of-chatgpt-972b9d09cc8b?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/972b9d09cc8b</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Thu, 02 May 2024 07:38:14 GMT</pubDate>
            <atom:updated>2024-05-02T07:38:14.476Z</atom:updated>
            <content:encoded><![CDATA[<h3>Nuts and Bolts of ChatGPT !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*-2y7VtQywa9s5VbM.png" /></figure><p>Have you ever wondered how ChatGPT effortlessly performs engaging conversations or provides insightful responses? It’s like chatting with a friend guru who always knows just what to say. But have you ever wondered how it works its magic?</p><p>As daily users of ChatGPT, many software developers like myself wonder at its capabilities without fully understanding the underlying mechanisms that power its magic. The inner workings of ChatGPT — the nuts and bolts that make it tick — have remained somewhat elusive.</p><p>ChatGPT is a large language model developed by <a href="https://openai.com/">OpenAI</a>. In this article, we’re going to peel back the layers and take a closer look at what makes ChatGPT truly remarkable.</p><h3>The Transformer Architecture: A Paradigm Shift</h3><p>ChatGPT is based on Transformer architecture. It is a neural network architecture for processing sequential data, such as text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*otpvzeBr5t47wJ5-" /><figcaption>A Thrilling Ride of Game Changer</figcaption></figure><h4>Limitations of Traditional Sequence-to-Sequence Models</h4><ol><li>Traditional sequence-to-sequence models, such as those based on recurrent neural networks (<a href="https://www.ibm.com/topics/recurrent-neural-networks">RNNs</a>) and convolutional neural networks (<a href="https://www.ibm.com/topics/convolutional-neural-networks">CNNs</a>), have limitations when it comes to processing long sequences.</li><li>The CNN output sequence heavily relies on the context defined by the hidden state in the final output of the encoder, posing challenges for handling long sentences. Models like RNNs suffer from issues like vanishing gradients and difficulty in capturing long-range dependencies.</li></ol><h4>Overview of the Transformer Architecture and Its Key Innovations</h4><ul><li>The Transformer architecture, introduced in the landmark paper “<a href="https://arxiv.org/pdf/1706.03762">Attention is All You Need</a>” in 2017, represents a significant departure from traditional models.</li><li>Instead of relying on sequential processing, the Transformer processes the entire input sequence in parallel.</li><li>The architecture consists of an encoder and a decoder, each composed of several layers.</li></ul><blockquote>GPT models consist of only the decoder part of the Transformer architecture. This decoder is autoregressive, meaning it generates output tokens one by one.</blockquote><h4>Layers of Transformer:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*x6ugEnNQBx5FjldnZorPpg.png" /><figcaption>Transformer architecture. Taken from “Attention Is All You Need”.</figcaption></figure><ol><li><strong>Input Embeddings</strong>: The input sequence is converted into embeddings. It is easier for a computer to understand a numerical representation, which represents the meaning of each word in a high-dimensional space.</li><li><strong>Positional Encoding</strong>: Since the Transformer doesn’t inherently understand the order of words, positional encoding is added to provide information about the position of each word in the sequence.</li><li><strong>Multi-Headed Self-Attention Mechanism</strong>: <br>This is the Game changer. This mechanism allows the model to weigh the importance of different words in the input sequence. When processing each word, it captures long-range dependencies and contextual information effectively.</li><li><strong>Feed-Forward Neural Network</strong>: After the self-attention mechanism, each sub-layer in the Transformer includes a feed-forward neural network. It processes the information with the self-attention mechanism and produces the final output for that layer.</li><li><strong>Normalization and Residual Connections: </strong>After every instance of multi-head attention and the feed-forward neural network, or you could say after each sub-layer in both the encoder and decoder, there is a residual connection, which is then followed by layer normalization. The residual connection helps in avoiding the vanishing gradient problem, and the layer normalization helps in faster and more stable training.</li></ol><h3>Self-attention</h3><p>Imagine you’re reading a story, and there’s a word that seems important. It’s like the star of the sentence, grabbing your attention and helping you understand what’s going on. Now, think about how you decide which word is important as you read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tg4YIyaitrk1opYd" /><figcaption>Attention is everywhere!</figcaption></figure><blockquote><strong><em>What is QUERY, KEY and VALUE?</em></strong></blockquote><ul><li><strong>Key, Query, and Value</strong>: In our story, each word has three identities: a key, a query, and a value. The key is like a hint that tells us what other words are related to it. The query is like a question we ask to find out which words are important for understanding the current word. The value is the actual information that the word holds.</li><li><strong>Paying Attention</strong>: When we come across a word, we don’t just look at it, we pay attention to the other words around it too. We ask ourselves, “Which other words are related to this one?” This is where the self-attention mechanism comes in. It helps the model decide how much attention to give to each word in a sentence.</li><li><strong>Calculating Attention Scores</strong>: The model calculates attention scores for each word by comparing its query with the keys of all the other words in the sentence. If a word’s query matches well with another word’s key, it means they’re related, and the model gives them a high attention score. If they’re not related, the score is lower.</li><li><strong>Weighted Sum</strong>: Once we have the attention scores, we use them to calculate a weighted sum of all the words’ values. This sum represents the importance of each word in understanding the sentence. Words with higher attention scores contribute more to the final understanding, while words with lower scores have less impact.</li><li><strong>Putting it Together</strong>: By paying attention to how each word relates to others in the sentence, the model can understand the context better and generate more accurate responses. It’s like having a conversation where you listen carefully to what the other person is saying and respond based on what you’ve heard.</li></ul><blockquote>Attention Everywhere!</blockquote><blockquote>As you now understand, attention is a revolutionary idea.</blockquote><p>If you want to play around a transformer, Using <a href="https://huggingface.co/">Hugging Face</a>’s <a href="https://transformer.huggingface.co/">Write With Transformer</a> application, we can do just that.</p><h4>Pre-training: The Foundation of Language Understanding</h4><p>The pre-training process begins with exposing the model to a vast corpus of text data. Books and articles to websites and databases. This text data serves as the raw material for the model to learn the patterns, structures, and nuances of language. The pre-training objective, known as Masked Language Modeling (<a href="https://www.techtarget.com/searchenterpriseai/definition/masked-language-models-MLMs">MLM</a>), is a self-supervised learning task that helps the model understand the context and relationships within the text.</p><p>Here’s how MLM works:</p><ul><li>The model is presented with sentences from the text corpus, with some words randomly masked or replaced with a special token.</li><li>The model’s task is to predict the original, masked words based on the surrounding context.</li><li>By learning to accurately predict these masked words, the model develops a deep understanding of language, capturing the intricate relationships between words, their meanings, and their contexts.</li></ul><p>Imagine learning a new language by trying to fill in the blanks in sentences based on the words surrounding the blank spaces. As you practice this exercise repeatedly, with countless sentences and contexts, you gradually develop an intuitive understanding of the language’s grammar, vocabulary, and idiomatic expressions.</p><p>Pre-training on massive text corpora allows language models like ChatGPT to build robust language representations, like developing a rich mental lexicon and understanding of language nuances. This pre-training phase is computationally intensive, often requiring billions of parameters and vast amounts of data to achieve high-quality language understanding.</p><p>However, the true power of pre-training lies in its ability to enable t<a href="https://builtin.com/data-science/transfer-learning">ransfer learning</a>. Once the model has developed a strong foundation of language understanding through pre-training, it can be fine-tuned for specific tasks, such as open-ended conversation generation, with significantly less data and computational resources required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZJtyNq9b-sfPuMm-.png" /><figcaption>ChatGPT’s Training Process</figcaption></figure><p>This transfer learning approach has revolutionized the field of natural language processing, allowing models like ChatGPT to achieve remarkable performance on a wide range of language tasks while requiring relatively smaller task-specific datasets for fine-tuning.</p><h4><strong>Multilingual Support: Bridging Language Barriers</strong></h4><p>One day, I asked ChatGPT about the <a href="https://redis.io/">Redis</a> — but there was a twist. I posed the question in Hindi, curious to see how ChatGPT would handle a different language.</p><p>To my amazement, ChatGPT responded with a perfect Hindi sentence, seamlessly, keeping the context and using the correct vocabulary and grammar. It was as if I was conversing with a fluent Hindi speaker who is a seasoned Software developer, and an expert in Redis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Naluho75wRqqt3KIvvcBOQ.png" /><figcaption>Dekh Bhai, ye to sb kuch kr sakta h</figcaption></figure><p>Language is diverse and rich, with each language bringing its nuances and intricacies. Then how ChatGPT is so smooth in responding in multiple languages?</p><ul><li><strong>Pre-training on Multilingual Text Data</strong>: Just as a polyglot learns multiple languages by exposure to various linguistic contexts, ChatGPT is pre-trained on multilingual text data. This means it’s exposed to conversations, articles, and texts in multiple languages during its training process.</li><li><strong>Shared Representations Across Languages</strong>: Like finding common ground between different languages, ChatGPT learns to represent words and phrases in a shared semantic space across languages. This allows it to understand and generate text in multiple languages using a unified model.</li></ul><h4><strong><em>Amazing, isn’t it?</em></strong></h4><p>As we conclude our exploration into the inner workings of ChatGPT, it’s clear that its architectural innovations have revolutionized the landscape of natural language processing. The power of the Transformer architecture, the multilingual prowess and attention mechanisms, ChatGPT stands as a testament to the advancements in AI technology.</p><p>The potential applications of ChatGPT are boundless, From language translation and content generation to Financial adviser and beyond. Its impact on industries and daily interactions is profound, changing the way we interact with technology. ☕</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*y-tBv4C_4dtQnK55.gif" /><figcaption>You gotta get schwifty in here!!</figcaption></figure><blockquote>In the end, ChatGPT is more than just a language model — it’s a catalyst for innovation and understanding, in an increasingly digital world. 🚀</blockquote><blockquote><strong><em>References:</em></strong></blockquote><blockquote>1. Illustrated Guide to Transformers- Step by Step Explanation: <a href="https://towardsdatascience.com/illustrated-guide-to-transformers-step-by-step-explanation-f74876522bc0">https://towardsdatascience.com/illustrated-guide-to-transformers-step-by-step-explanation-f74876522bc0</a></blockquote><blockquote>2: Attention Is All You Need: <a href="https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf">https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf</a></blockquote><blockquote>3:Attention Networks: A simple way to understand Self Attention: <a href="https://medium.com/@geetkal67/attention-networks-a-simple-way-to-understand-self-attention-f5fb363c736d">https://medium.com/@geetkal67/attention-networks-a-simple-way-to-understand-self-attention-f5fb363c736d</a></blockquote><blockquote>4. How Does ChatGPT Actually Work?<a href="https://www.scalablepath.com/machine-learning/chatgpt-architecture-explained">https://www.scalablepath.com/machine-learning/chatgpt-architecture-explained</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=972b9d09cc8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hampi — A Historical Heritage]]></title>
            <link>https://arjavdongaonkar.medium.com/hampi-a-historical-heritage-de896e81a564?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/de896e81a564</guid>
            <category><![CDATA[temples-of-india]]></category>
            <category><![CDATA[ruins]]></category>
            <category><![CDATA[solo-travel]]></category>
            <category><![CDATA[ancient-india]]></category>
            <category><![CDATA[hampi]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sun, 14 Jan 2024 04:34:32 GMT</pubDate>
            <atom:updated>2024-01-14T04:34:32.447Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hampi — A Historical Heritage</h3><p>There’s a famous saying in Hampi that goes something like this:</p><blockquote>If you have good eyes, visit Kashmir, but if you have good <strong>legs</strong>, then visit Hampi.</blockquote><p>After reading the history of Hampi and a couple of the places to see around Hampi, I realized that the best way to explore Hampi is to get lost in Hampi. As a solo traveller, I started on a journey to explore the layers of history, culture, and spirituality that Hampi has to offer. From majestic temples and ruins to vast landscapes, my experience was nothing short of mesmerizing. Join me as I recount my adventure, trying to reach deep into Hampi’s rich heritage.</p><p>Hampi’s name has evolved throughout the history. Initially known as <strong>Pampapuri</strong>, the city derived its name from Pampa, another name for Goddess Parvati. During the Tretayug, it was known as the capital of the Monkey Kingdom, referred to as <strong>Kishkindha</strong> Nagari in Hindu mythology. We can see references to kings Vali and Sugreiv in a lot of temples in Hampi. As time progressed, the city transitioned to Vidyanagari before reaching its zenith as <strong>Vijayanagar</strong>, under the Vijayanagara Empire.</p><p>The name transformed as Pampa..Pampa…Pampi…Pampi…Hampi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jB5adibhgMv7rNiIA7sW9A.jpeg" /></figure><h3>Day 1: Exploring the Ruins</h3><p>I rented a bike and set out to explore the vast capital of the Vijayanagara Empire. Everywhere I looked, ruins told me tales of glory and resilience from a bygone era. It was as if they were calling out to me, to listen and learn from their silent echoes.</p><p>On my first day, I went into the less-travelled paths, discovering ruins of lesser-known temples hidden between boulders. These were ancient paths that were no longer in use. These temples, though smaller in scale, had beautiful carvings on the pillars. They reflected Hampi’s rich architectural heritage rooted in the Vijayanagara style.</p><p>In the evening, I made my way to <strong>Hemkuta Hill</strong>, hoping to see a breathtaking sunset. Though the clouds had other plans, hiding the sun’s descent, the view of the Virupaksha Temple and the surrounding serenity was marvellous. At the top of the hill stood a simple two-story structure made of solid rock pillars. A silent witness to countless sunsets and stories yet to be told.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RvJjjlw0_drRqJLiWHtFLg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnDo5PHhUerik8qc5fpRDA.jpeg" /><figcaption>Ruins, or shall I say memories from the past, are scattered all over Hampi. How can you figure out how many days you need to see this place?</figcaption></figure><p>Capturing Hampi’s beauty in photographs felt like trying to fit an elephant into a matchbox.</p><h3>Day 2: Immersion in Hampi’s Royal Past</h3><p>Waking up refreshed on my second day in Hampi, I decided to take it slow and immerse myself in the local atmosphere.</p><p>I set out to explore Hampi’s royal structures. My first stop was the <strong>Lotus Palace</strong>. Next, I visited the <strong>Queen’s Bath</strong> and <strong>Mahanavmi Dibba</strong>, the <strong>royal court and festival place.</strong> Each structure gave me a sense of regality and importance. The <strong>Elephant Stables</strong> are built in the Indo-Islamic architectural style.</p><p>As I explored these remnants of Hampi’s royal past, I couldn’t help but imagine the city’s former splendour. Before the devastating Bahamani attack, Hampi must have been a sight to behold. With majestic buildings and crowded streets echoing with laughter, music, and festivities. Today, only base structures are there serving as silent reminders of a glorious era lost to time.</p><blockquote>The city of Vijayanagara is such that the pupil of the eye has never seen a place like it, and the ear of intelligence has never been informed that there existed anything to equal it in the world.</blockquote><blockquote><strong>- Abdur Razzak (15th Century Persian Traveler)</strong></blockquote><p>I climbed the Hemkuta hill again hoping for a beautiful sunset, But nature again denied me to see the sunset with cloudy weather. As if it was Hampi’s way of telling me that the sun was never to set on the mighty empire of Vijayanagara.</p><p>As darkness fell, I attended the <strong>Hampi by Night</strong> sound and audio show, a captivating experience that showcased Hampi’s history, mythology, and significance. The show narrated Hampi’s evolution, from its naming to its rule by different kings and dynasties, weaving together myths, legends, and historical facts into a mesmerizing narrative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQMvlu7LbMjlmeAELoAVeg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kiphfIzMpTqp2FUJI0A8RQ.jpeg" /><figcaption>A nocturnal journey through Hampi reveals its hauntingly beautiful landscapes and architectural wonders</figcaption></figure><p>After the show, I took a stroll along the ancient <strong>Hampi Bazaar</strong>, experiencing the sights and sounds of the night. The ghastly palaces and temples reflected in the night lights, created an audacious vision.</p><h3>Day 3: Architectural Wonders</h3><p>My third day in Hampi began with an early start at 5:30 a.m., as I started on a trek up <strong>Matunga Hill</strong>, the highest point in Hampi. As the Sun God slowly ascended in the sky, I witnessed a magnificent sunrise that offered panoramic views of Hampi in all directions</p><p>Afterwards, I began my temple visits, starting with the <strong>Virupaksha Temple</strong>. As the only functional live temple in Hampi, it was full of chants and temple bells. it also had divine vibes along with playful monkeys.</p><p>Next, I explored the <strong>Achyutaraya Temple</strong> and <strong>Ekashila Nandi</strong>, wondering about the Vijayanagara-style architecture. Here I met Chris, a fellow solo traveller from Germany, who shared my appreciation for Hampi’s peace, tranquillity, and architectural wonders. Following temple visits, I went on a<strong> coracle boat ride</strong> along the Tungabhadra River. It was such a relaxing and unique experience. As I strolled along the ancient Kampabhu Road, I saw various temple ruins and caves that lined the path, each echoing stories of Hampi’s glorious past.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2oNI0kSt5j1Rnos-jLMCcA.jpeg" /><figcaption>Calmness: A peaceful journey in the traditional coracle in Hampi</figcaption></figure><blockquote>What I saw from thence seemed to me as large as Rome, and very beautiful to the sight.</blockquote><blockquote>— <strong>Domingo Paes (Portuguese Traveler, 16th Century)</strong></blockquote><p>I continued my journey, to arrive at the complex of the V<strong>ijaya Vitthala Temple</strong>. The famous stone chariot at the temple’s entrance captured my attention. I felt that it defied modern engineering advancements. Inside the temple, the musical stone pillars resonated with melodies, creating a mesmerizing ambience. The layout, containing porches, main entrances, and sanctums, sabha mandapas shows the spiritual and cultural significance of these structures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yEWXqWYj3OLBJih8uWdXVQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzEwmjy4TQJSNqS8WFRTUw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAFmxBlKpHV9ctYinlxS5A.jpeg" /><figcaption>One of the many Hampi wonders. At times I feel very proud of these beautiful artworks that India is dense with.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2CJmOiDFGRm3pVTB6rKLNA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUDqY6Al8oSgSApq181Y2w.jpeg" /><figcaption>Walking through history: Achyutaraya Temple, Krishna Temple, timeless masterpieces in the heart of Hampi.</figcaption></figure><p>The decline of the Vijayanagara Empire started the <strong>Battle of</strong> <strong>Talikota</strong> in 1565, where the combined forces of the Deccan Sultanates — the Bijapur <strong>Adilshah</strong>, Ahmadnagar <strong>Nijamsham</strong>, Golkonda <strong>kutubshah</strong>, and <strong>Bidar</strong> Sultanates — defeated the Vijayanagara forces. Following the defeat, the empire faced widespread destruction and looting, leading to its downfall. It took them 6 months to loot and destroy Vijay Nagar. The Islamic rulers with zero appreciation for art and architecture and sentiment for other religions ruthlessly hammered and cracked open every stone and every pillar to find the hidden loot of Vijaynagar. Today also its very likely to find hidden, buried treasurers in Hampi.</p><p>The air grew heavy as I walked through the ruins, feeling the weight of history pressing down upon me. The once-thriving empire, with its majestic temples and rick markets, bore witness to a cataclysmic event that forever changed its fate.</p><p>As evening approached, I returned to Hemkuta Hill, hoping to witness the sunset. Today proved to be my lucky day, as I encountered travellers from Russia, France, Czechoslovakia, Japan, Mongolia, Italy, and beyond, everyone was there for the most awaited sunset view from Hemkuta Hill. As the sun descended behind Hampi’s rocky mountains, I experienced a moment of calm and composure.</p><p>As I concluded my third day in Hampi, I felt a profound sense of gratitude and connection to this ancient city.</p><h3>Final Day: Exploring As Much As I Can</h3><p>As my time in Hampi neared its end, I felt a sense of urgency to explore as much as I could.</p><p>I went to the <strong>UGRA NARSINHA</strong>, <strong>the underwater temple</strong>, and <strong>Badavi Linga</strong>.</p><p>Continuing my journey, I visited a myriad of temples dedicated to deities like <strong>Sasilekadu Ganpati</strong>, <strong>Kadilekadu Ganpati</strong>, <strong>Krishna</strong>, <strong>Narasimha</strong>, <strong>Vamana</strong>, <strong>Shiva</strong>, <strong>Hajar Rama</strong>, <strong>Chandikeshwara</strong>, and <strong>Chandrashekhara</strong>. Each adds layers to Hampi’s rich heritage.</p><p>After exploring these sacred sites, I was drawn back to the Achyutaraya Temple, my favourite spot in Hampi. As the wind caressed my face and the vast land stretched before me, devoid of human presence, I felt a connection to both myself and the ancient times that once thrived here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ea-rpNSeDx_09wJ6RSCsAA.jpeg" /><figcaption>Folded hand. Inside Achutraya temple, Hampi, Karnataka.</figcaption></figure><p>While exploring, I couldn’t help but imagine the lively life that once thrived within these walls, long before they became silent witnesses to time’s passage. What if, in a twist of time, a traveller from our present, knowing all the history, could step into the past when Vijayanagara stood at its zenith?</p><p>Imagine the awe that would fill her eyes as she witnessed the city teeming with life. People moving around on horses, the live markets, the echoes of marketmen, the vibrant colours of festivities, the sounds of temple bells, the chants of prayers coming from all temples standing tall and proud.</p><p>Yet, in this fantastical journey, there’s a poignant realization waiting to unfold. The same streets now echo with silence, broken only by the flowing wind through the remnants of structures. The temples, now weathered by time and human conflict, stand as stoic witnesses to the passage of centuries.</p><p>My favourite part about Hampi was the nature that cradles Hampi in her lap as if sympathizing with her for the tragedies the empire suffered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*foObqMfORP0vkLVqqeBjSQ.jpeg" /><figcaption>You can just wander around the Hampi, and you wouldn’t even know how the days would pass by.</figcaption></figure><p>If you are visiting this amazing destination, stretch your vacation for more than 3 days. Feel free to reach out for any information or contacts. Thou shall thank me later!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*McoizjCRecvUMgFCSP5tyQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de896e81a564" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debugging Magic for Young Wizards ]]></title>
            <link>https://arjavdongaonkar.medium.com/debugging-magic-for-young-wizards-337e4062f03e?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/337e4062f03e</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sat, 02 Dec 2023 13:26:08 GMT</pubDate>
            <atom:updated>2023-12-02T13:26:08.639Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*vuj7_SMLNZH3aNwR.jpg" /></figure><p>In the <strong>ever-changing</strong> startup industry, software development faces unique challenges due to limited resources and developing processes. The importance of effective debugging cannot be overstated in this context.</p><p>This article aims to delve into important debugging techniques mainly to address the specific challenges faced by mid-level startups. Join us on a journey through the debugging magic that will empower the young wizards to overcome common challenges.</p><h3>1. Mindset of a Debugger: Like Sherlock, but with More Coffee ☕</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V9bxAlj3LDzEBZel" /><figcaption>Develop, Debug, Learn</figcaption></figure><p>Adopting the mindset of a debugger is key to getting into solid software development in mid-level startups. <strong>Patience</strong>, <strong>Attention to Detail</strong>, and a <strong>Comprehensive Understanding of Context</strong> are the cornerstones of this mindset, enabling developers to approach challenges systematically.</p><p>Consider a scenario where a critical bug appears in the production environment. The debugger’s mindset requires careful analysis of the codebase, tracing the bug’s origin with patience, and demonstrating an understanding of code flow to quickly resolve the issue.</p><p>Developing the habits necessary to acquire the debugger’s mindset is not an overnight effort. But In the dynamic landscape of mid-level startups, cultivating the mindset of a debugger is an invaluable asset. These developments greatly enhance problem solving capabilities and encourage a flexible approach to software development.</p><h3>2. Understanding the Bug Lifecycle: The Startup Survival Guide</h3><p>In the startup wilderness, bugs lurk like creatures from “Stranger Things,” waiting to emerge from the shadows. The urgency to resolve bugs is a must to surviving the Upside Down — quick thinking and immediate action are essential.</p><p>For startup, consider a debugging system that involves <strong>Detection</strong>, <strong>Reproduction</strong>, <strong>Isolation</strong>, and <strong>Resolution</strong>. This methodology ensures a strategic and efficient approach to bugs and contributes to a smooth development process.</p><p>Let’s consider the following code:</p><pre>public static void main(String[] args) {<br>    Flux&lt;String&gt; detectiveSkills = Flux.just(&quot;Attention to Detail&quot;, &quot;Patience&quot;, &quot;Coffee Addiction&quot;);<br>    Flux&lt;String&gt; debuggerMindset = detectiveSkills<br>            .map(skill -&gt; skill.substring(0, 1).toUpperCase() + skill.substring(1)) // Bug: Incorrect substring index<br>            .filter(skill -&gt; skill.length() &gt; 8) // Bug: Incorrect condition for filtering<br>            .map(skill -&gt; skill.concat(&quot; is Key&quot;));<br>    debuggerMindset.subscribe(<br>            skill -&gt; System.out.println(&quot;Debugger Mindset: &quot; + skill),<br>            error -&gt; System.err.println(&quot;Error: &quot; + error),<br>            () -&gt; System.out.println(&quot;Debugger Mindset Exploration Complete&quot;)<br>    );<br>}</pre><pre>Debugger Mindset: Attention to Detail is Key<br>Debugger Mindset: Coffee Addiction is Key<br>Debugger Mindset Exploration Complete</pre><p>Successfully replicating a bug on a developer’s computer means half the battle is won. The next challenge is to identify and isolate specific affected areas. With experience, a developer can identify the bug’s origin, whether it is in the database, code logic, or infrastructure. Once isolation and replication are achieved, fixing the bug becomes a matter of time.</p><h3>3. Logging and Instrumentation: Lightweight Strategies</h3><p>Logging is an important ally in debugging, serving as a virtual breadcrumb trail that developers follow to identify anomalies and bugs. Log messages should give a reasonable impression without overusing limited resources.</p><p>Consider a scenario where user complaints about slow page load times on an e-commerce platform suddenly increase. Using lightweight logging allows you to select relevant information, such as response times, error codes, and important user interactions. This allows developers to quickly identify and address performance bottlenecks without drowning in log data overload. A good article <a href="https://surenraju.medium.com/microservice-observability-strategies-and-best-practices-48bb78c40112">here</a>.</p><p>At the same time, it’s important for developers to follow the basic logging principles. For example, care must be taken to avoid placing logs in potentially problematic areas. Developers should <strong>avoid</strong> including log messages in <strong>loops</strong>, as this can have undesirable consequences. Care must be taken to ensure that log messages are not polluting the entire log file by logging <strong>unnecessary</strong> data. The purpose of log messages should be to help the debugger identify and trace exactly what went wrong.</p><h3>4. Interactive Debugging in a Lean Development Environment</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*aRCZTpU11w_Iqi4E" /><figcaption>Just for a laugh</figcaption></figure><p>In a world of ifs and fors and Monos and Fluxes, An Interactive debugging, acts as a wand in the hands of the wizard. IDEs like <strong>IntelliJ</strong> and <strong>VSCode</strong> provide many features that make it easy to find and fix bugs. Find some good practices <a href="https://medium.com/@slamflipstrom/debugging-with-visual-studio-code-857904a8a590">VSCode</a> &amp; <a href="https://medium.com/swlh/intellij-idea-debugging-best-practices-e374ae9a7ed8">Intelli</a>J</p><p>Using <strong>breakpoints</strong> and <strong>watches</strong> strategically is key to ensuring that interactive debugging enhances the development project. By applying breakpoints appropriately and using watches to monitor specific variables, developers can zoom in on problematic parts of the code.</p><h3>5. Targeting Common Types of Bugs in Startups</h3><h4>1. Database-Related Bugs:</h4><p>Common database-related issues often revolve around performance bottlenecks, inefficient queries, or data inconsistency. These issues can significantly impact the overall functionality and user experience.</p><ol><li><strong>Query Optimization:</strong> Analyze and optimize database queries for efficiency. Proper place where the query is fired, indexing and analyzing execution plans can drastically improve performance.</li><li><strong>Logging and Monitoring:</strong> Implement logging to capture database interactions. Use monitoring tools to detect anomalies and potential performance issues early.</li><li><strong>Importance of Indexing:</strong> The significance of maintaining proper indexes on frequently queried columns is topmost. Unindexed queries can lead to slow response times and degraded performance.</li></ol><h4>2. Infrastructure-Related Bugs:</h4><p>Startup infrastructure issues encompass challenges like server downtime, scalability bottlenecks, and resource limitations.</p><ol><li><strong>Scalability Planning:</strong> Proactively plan for scalability by monitoring server load and usage trends. Address potential bottlenecks before they impact performance.</li><li><strong>Downtime Analysis:</strong> Develop strategies to minimize downtime, including redundant servers, failover mechanisms, and efficient deployment procedures. Perform deep analysis on downtime logs to avoid such incidents.</li><li><strong>Monitoring Tools:</strong> It is recommended to use monitoring tools to track server health, resource usage, and potential issues. This allows for early detection and preventive action. Tools such as <a href="https://medium.com/ibm-cloud/tagged/instana">Instana</a>, <a href="https://medium.com/@pgulshetty/application-monitoring-and-alerting-using-datadog-f0f08c3f7696">Datadog</a>, <a href="https://medium.com/tensult/what-is-new-relic-8106dfde903d">New Relic</a> and many more help in Monitoring<strong>.</strong></li></ol><h4>3. Coding Logic Bugs:</h4><p>Coding logic bugs can range from simple syntax errors to complex logical issues. Detecting and addressing these bugs is crucial to maintain the integrity of the software.</p><ol><li><strong>Code Reviews:</strong> A thorough code review is as important as writing the code itself. <strong>Pair</strong> code review also helps as A fresh pair of eyes can catch logical errors that might be overlooked during development.</li><li><strong>Unit Testing:</strong> The implementation of unit tests validate the correctness of individual functions and components.</li></ol><blockquote><em>“Two heads are better than one” — by working together, you can draw on each other’s strengths and identify bugs more quickly and accurately.</em></blockquote><p>To share a real life story</p><p>In a high-stakes release of a project, a subtle bug triggered a wave of increased latency. <strong>Detecting</strong> the bug was like finding a needle in a haystack, but a thorough code and pair review unveiled a mistakenly fired database query inside a loop, adversely affecting data retrieval. <strong>Reproducing</strong> the issue on a stage environment was tricky, requiring precise replication conditions. <strong>Isolating</strong> the problem line involved analysis of service and database logs. Once replicated and isolated, the <strong>resolution</strong> was swift — a correction to the query placement inside the list. <br>The lesson? In the quest for optimal performance, even minor bugs can snowball into major disruptions.</p><blockquote>Don’t aim for perfect code; aim for maintainable code</blockquote><p>This experience emphasized the importance of thorough testing and post-release monitoring.</p><h4>4. Handling Edge Cases:</h4><p>Edge cases represent scenarios that are rare and different from typical user interactions. Failing to account for these scenarios can result in unexpected bugs and usability issues.</p><blockquote>Document not just <strong>how</strong>, but <strong>why</strong>.</blockquote><p>Analyze potential user scenarios to identify edge cases. Write <a href="https://medium.com/levi-niners-crafts/crafting-a-winning-test-strategy-a-roadmap-to-software-quality-and-reliability-c1ee28539746"><strong>Strategy Docs</strong></a> before starting the development. This will help in visualising all the scenarios to take into account.</p><h4>5. Third-Party Integration Bugs:</h4><p>Integrating third-party services introduces complexities related to API changes, downtime, or unexpected behaviour. These issues can disrupt the normal functioning of the application.</p><ol><li><strong>Thorough Testing:</strong> Rigorously test integrations during development and before deploying updates. Account for potential changes in third-party APIs.</li><li><strong>Error Handling:</strong> Implement robust error-handling mechanisms to gracefully handle situations where third-party services are unavailable or return unexpected results.</li><li><strong>Communication Protocols:</strong> Establish clear communication protocols with third-party service providers to stay informed about updates, changes, and potential issues.</li></ol><h4>6. Memory Leaks and Resource Management Bugs:</h4><p>Memory leaks and inefficient resource management can lead to performance degradation and service instability.</p><ol><li><strong>Memory Profiling:</strong> Use memory profiling tools to identify memory leaks and inefficient resource usage patterns.</li><li><strong>Resource Monitoring:</strong> Implement monitoring tools to track resource consumption, identifying potential issues before they impact performance.</li><li>Incorporate code reviews focusing on <strong>resource</strong> management to ensure efficient allocation and deallocation of resources. <strong>Load testing</strong> can reveal the bugs hidden in shadows. There is no harm in running load testing on a newly developed as well as older impacting API to identify any <strong>regression</strong> or <strong>latency</strong> issue.</li></ol><p>In conclusion, tackling the most common types of bugs requires a multifaceted approach. It involves a combination of proactive planning, strategic debugging, and continuous improvement processes. It is achievable by understanding the nuances of each bug type and adopting targeted debugging strategies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*aBUQ6UYY2Yk-oVc5.gif" /></figure><p>Debugging is an epic series with ongoing seasons. Each bug conquered is a cliffhanger, and every improvement made ensures your story has more thrilling episodes to come. So, keep debugging and let the coding saga continue! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=337e4062f03e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cosmic Deception: When a Cometary Encounter Blurs the Boundaries]]></title>
            <link>https://arjavdongaonkar.medium.com/cosmic-deception-when-a-cometary-encounter-blurs-the-boundaries-caa3c9bc07d1?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/caa3c9bc07d1</guid>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[nuclear]]></category>
            <category><![CDATA[random]]></category>
            <category><![CDATA[cosmos]]></category>
            <category><![CDATA[comet]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sun, 28 May 2023 15:44:16 GMT</pubDate>
            <atom:updated>2023-05-28T15:44:16.590Z</atom:updated>
            <content:encoded><![CDATA[<p>As i am writing this, a random thought is taking shape in the form of words. Picture this: a colossal cometary fragment hurtles towards our planet. the fragment is large enough to cause a major explosion and terror while entering the atmosphere and hitting our very earth. This event is provoking thought and wonders about the intricacies of our universe and the depths of human perception.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*OurdBPc9hEE-4HhS" /></figure><h4>The Impact: A Cosmic Masquerade</h4><p>Imagine looking up to witness a cosmic spectacle, unlike anything you’ve ever seen. A massive cometary fragment pierces through our atmosphere, setting off an explosion that mimics the terrifying power of a nuclear blast. The mushroom cloud billows, casting an eerie shadow over the landscape, inducing a rush of fear and awe. It’s a jaw-dropping performance that tests the boundaries of our perception and challenges our understanding of the cosmos.</p><h4>Panic and Uncertainty: Questioning Reality</h4><p>As the cometary masquerade unfolds, chaos ensues. People are thrown into a state of panic and confusion, struggling to make sense of the unimaginable. The line between reality and fiction blurs, triggering a cascade of questions and doubts. Is this truly a nuclear catastrophe, or are we witnessing the cosmic theatre at play? The uncertainty fuels a whirlwind of thoughts, prompting us to question the very nature of our existence.</p><h4>Beyond the Ordinary: Expanding Our Perceptions</h4><p>This mind-bending cosmic scenario invites us to contemplate the vastness of our universe and the limitations of our understanding. It challenges us to embrace the unknown and to question the boundaries we have placed upon ourselves. What lies beyond our conventional notions of reality? How can we broaden our perceptions and open ourselves to the wonders that await beyond our grasp? The cometary encounter beckons us to ponder these profound mysteries.</p><h4>Puzzling Responses: Unraveling the Quandary of Human Behavior</h4><p>Some people believe that the comet was a nuclear attack, and they launch their own nuclear weapons in retaliation. This leads to a chain reaction of nuclear attacks, and eventually, the entire human race is wiped out.<br>This scenario is not as far-fetched as it may seem. In the past, there have been several close calls with nuclear war. For example, in 1962, during the Cuban Missile Crisis, the world came within a hair’s breadth of nuclear annihilation. If a small comet had hit the Earth during that time, it is possible that the crisis would have escalated into a full-scale nuclear war.<br>It is important to remember that nuclear weapons are still very real, and they pose a serious threat to our existence. We may find ourselves facing the same fate as the dinosaurs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*_C5-0Gies2DR2xKZ.gif" /><figcaption>The Atomic Chicken Wrench</figcaption></figure><h4>Quotes to Ponder:</h4><p>As we contemplate the cosmic deception unfolding above, the words of renowned astrophysicist Carl Sagan come to mind:</p><blockquote>“Somewhere, something incredible is waiting to be known.”</blockquote><p>Indeed, our cometary encounter is a reminder that the universe is teeming with mysteries, beckoning us to explore the unknown.</p><blockquote>Two possibilities exist: either we are alone in the universe or we are not. Both are equally terrifying.</blockquote><p>I think there’s a strong likelihood that the future will be better than the past</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*M7bVbK-NAfsdIIBz.gif" /><figcaption>vastness</figcaption></figure><h4>Conclusion:</h4><p>In the depths of the cosmic abyss, where comets dance and collisions captivate, we find ourselves confronted with a tantalizing enigma. The masquerade of a cometary encounter, disguised as a nuclear explosion, ignites a cascade of thoughts and queries, urging us to expand our perceptions and challenge the boundaries of our understanding. As we gaze upon the heavens, let us embrace the provocative questions that arise, for in their pursuit lies the potential to unlock the secrets of our universe and to delve deeper into the mysteries that lie just beyond our reach. The cometary encounter serves as a poignant reminder that the cosmos is a realm of endless wonder, inviting us to peer beyond the veil of our own limitations and explore the uncharted territories of our universe.<br>Anyways, in such a strange scenario: a small comet hits the Earth, as millions of them have, and the response of our civilization is promptly to self-destruct. 💥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=caa3c9bc07d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Odyssey of VPCs: Migrating a Common Service in a Galaxy Far Far Away ]]></title>
            <link>https://arjavdongaonkar.medium.com/an-odyssey-of-vpcs-migrating-a-common-service-in-a-galaxy-far-far-away-12b82078fefb?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/12b82078fefb</guid>
            <category><![CDATA[transit-gateway]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sat, 13 May 2023 12:45:29 GMT</pubDate>
            <atom:updated>2023-05-13T17:42:06.551Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*U0sjBuEdO50Gw4YCngyKtg.jpeg" /><figcaption>An Odyssey of VPCs</figcaption></figure><p>The journey of migrating a common service from one Virtual Private Cloud (VPC) to another can be a daunting task. It’s like moving your entire house from one neighbourhood to another but with the added complexity of ensuring that your precious belongings (in this case, your service) are safe and secure during the move. In this article, we will walk you through the journey of migrating a common service from VPC 1 to VPC 2, highlighting the key steps that we took to ensure a smooth transition.</p><p>Let’s call our original VPC “Rohan” and our new VPC “Gondor”.</p><h4><strong>Step 1: Decoupling the Tightly Coupled Common Service</strong></h4><p>Our common service was tightly coupled with our vertical services in Rohan, making it difficult to move without disrupting the entire ecosystem. It was like trying to remove a brick from a wall without bringing the whole thing crashing down.</p><p>In order to proceed, two tasks were necessary. The first was to establish a uniform format for the request body. The second involved moving all current data to this new format.</p><p>We also implemented some changes in the mapping query to help with the transition and ensure compatibility with Gondor. These changes allowed us to move the common service without disrupting the rest of our system.</p><p>When decoupling the vertical services and the common service, it was necessary to make changes to the common service. However, it was important to ensure that these changes did not cause any disruptions to the existing functionality of the system. To achieve this, we took a backward-compatible approach to the changes.</p><p>This means that any changes made to the common service were designed to be compatible with the existing interfaces, APIs, and workflows used by the vertical services. This allowed the vertical services to continue using the common service without any interruptions.</p><h4>Step 2: Taking Care of Security</h4><p>When migrating a common service from one VPC to another, it’s crucial to ensure that security is taken care of. There are several ways to establish secure communication between VPCs, including VPC peering, transit gateway, and public call (with API Gateway in the picture).</p><ol><li><a href="https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html"><strong><em>VPC peering</em></strong></a> is a straightforward method of connecting two VPCs within the same region. It allows for secure communication between VPCs over the Amazon network, without the need for a VPN connection. However, VPC peering has some limitations, such as the fact that it only supports communication between VPCs within the same region.</li><li><strong><em>Public call</em></strong> is another option, where the service is exposed publicly, and requests are made to the public endpoint. However, this approach has significant security implications and should be avoided wherever possible. It requires robust security measures, such as API Gateway, to ensure that only legitimate requests are accepted and that sensitive data is protected.</li><li><a href="https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html"><strong><em>Transit Gateway</em></strong></a> is a service that allows for centralized management of VPCs, enabling secure communication between VPCs across different accounts and regions. It acts as a hub that connects multiple VPCs and can be used to route traffic securely between them. Transit Gateway has several advantages over other options, such as VPC peering, including:</li></ol><ul><li><strong><em>Scalability</em></strong>: Transit Gateway can handle a much larger number of VPCs than VPC peering, making it an excellent choice for the future plans of Gondor.</li><li><strong><em>Simplified</em></strong> <strong><em>management</em></strong>: Transit Gateway provides a central point of management for all VPCs, simplifying configuration and troubleshooting.</li><li><strong><em>Security</em></strong>: Transit Gateway provides additional security features, such as network segmentation and access control lists, to ensure that traffic between VPCs is secure.</li></ul><p>For these reasons, we chose Transit Gateway as the method for establishing secure communication between Rohan and Gondor during our migration. It provided us with a scalable, secure, and easy-to-manage solution that ensured the integrity of our services.</p><h4>Step 3: Pragmatics of API-gateway</h4><p>One of the most effective ways to secure your service is by implementing a filter in the API Gateway that can remove any potentially spoofed headers from incoming requests.</p><p>We implemented such a filter in the API Gateway to ensure that only legitimate requests were accepted, and any requests with spoofed headers were filtered out. This involved <em>removing all incoming headers</em> in the request. We used a <em>special token header</em> value to look into the application configuration of the API Gateway and find out the required <strong><em>headers to set and their values</em></strong>. This made the entire process more secure and ensured that the migrated common service would work seamlessly across VPCs.</p><p>In addition to this, we also implemented <strong><em>IP whitelisting</em></strong> to restrict access to the service only to authorized sources. This further ensured that requests were only accepted from trusted sources, and helped prevent attacks from malicious actors.</p><p>Furthermore, we added several important features like <strong><em>quota</em></strong> and <em>t</em><strong><em>ime-to-live (TTL)</em></strong> in the API Gateway to improve the service’s reliability and availability. Quotas can limit the number of requests a user can make within a specific time frame, while TTL can ensure that data is not stored for longer than necessary, improving the performance and security of the service.</p><p>In conclusion, it’s evident that securing the migrated common service across VPCs was crucial to maintaining the integrity of the service. By implementing an API Gateway with robust filtering and security features, we were able to create a safe end-to-end request journey from Gondor to Rohan and Rohan to Gondor. With these measures in place, we can be confident that our common service is secure, reliable, and available across VPCs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*UQSQCr_KsCuyhM7V569cHg.jpeg" /><figcaption>YOU SHALL NOT PASS!</figcaption></figure><p>Just as <a href="https://youtu.be/mJZZNHekEQw">Gandalf stood guard at the bridge of Khazad-dûm to prevent the Balrog from passing</a>, the filter in the API Gateway stands guard to prevent unauthorized requests from passing through. 🧙‍♂️</p><h4>Step 4: Making Changes in Vertical Services</h4><p>To ensure that our vertical services were able to access the common service after it was migrated, we had to make changes to their configuration. Each vertical service had to be updated to point to the Gondor where the common service was now hosted. This involved modifying the network settings of each service to ensure that requests were being routed to the correct destination.</p><h4>Step 5: Testing and Validation</h4><p>Testing and validation are critical components of any migration project. It’s essential to ensure that all aspects of the system are functioning properly and securely before and after the migration. Without proper testing, there is a risk of introducing errors, vulnerabilities, and other issues that could potentially compromise the security and performance of the system.</p><p>We followed a rigorous testing and validation process to ensure that the system was functioning as expected. We conducted <em>unit tests</em>, <em>manual tests</em>, and <em>system tests</em> to verify that all components of the system were working correctly and that there were no issues or errors. We also conducted <em>security testing</em> to identify and address any vulnerabilities or potential threats to the system.</p><p>After the migration, we continued to monitor the system closely and perform regular testing and validation to ensure that everything was still functioning correctly. This allowed us to identify and address any issues or problems that may have arisen due to the migration.</p><h4>Step 6: Releasing the Changes</h4><p>In the final stage of the migration process, we released the changes during a designated window to minimize business impact. This involved meticulously coordinating with all stakeholders to ensure a smooth transition and minimize any potential disruptions to our services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*AUsjYkcFVRby9uSC3rMLSQ.gif" /></figure><p>It was like launching a rocket into space — a momentous occasion that required careful planning, coordination, and execution. 🚀</p><h4>Conclusion</h4><p>In conclusion, the migration of our common service to a new VPC was no easy feat, but with careful planning, execution, and the use of robust security measures, we were able to make the transition with minimal disruption. Not only did this help us to streamline our operations and improve our security posture, but it also gave me a newfound confidence in the ability to tackle even the most complex challenges. We can now move forward with the knowledge that we have a solid foundation for our services and can continue to innovate and improve our offerings.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12b82078fefb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Gateways Unleashed: Discovering the Amazing Power and Practical Uses of Modern Software…]]></title>
            <link>https://arjavdongaonkar.medium.com/api-gateways-unleashed-discovering-the-amazing-power-and-practical-uses-of-modern-software-958267b09f07?source=rss-e5805b0dd52e------2</link>
            <guid isPermaLink="false">https://medium.com/p/958267b09f07</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Arjavdongaonkar]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 04:07:55 GMT</pubDate>
            <atom:updated>2023-04-30T04:07:55.329Z</atom:updated>
            <content:encoded><![CDATA[<h3>API Gateways Unleashed: Discovering the Amazing Power and Practical Uses of Modern Software Superhero</h3><p>API gateways have become an essential component in modern software architecture, enabling seamless communication between various microservices and external applications. They act as a single entry point for managing, securing, and routing API requests to the appropriate backend services. In this article, we will explore some amazing facts about API gateways and delve into their practical uses in real-world scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ECTWiXSmem5bK51yXS1yuQ.png" /><figcaption>Visual Representation</figcaption></figure><h3>Amazing Facts about API Gateways</h3><ol><li><strong>Enhanced Security:</strong></li></ol><p>API gateways provide a robust security layer by implementing authentication, authorization, and rate limiting. They can integrate with popular identity providers like <em>OAuth</em>, <em>JWT</em>, and <em>SAML</em>, ensuring that only authorized users can access the backend services.</p><p>2. <strong>Simplified API Management:</strong></p><p>API gateways offer a centralized platform for managing APIs, making it easier to monitor, analyze, and maintain them. They provide detailed analytics and logging capabilities, allowing developers to track usage patterns, identify bottlenecks, and optimize performance.</p><p>3. <strong>Load Balancing and Failover:</strong></p><p>API gateways can distribute incoming requests across multiple backend services, ensuring optimal load balancing and high availability. They can also detect unresponsive services and reroute traffic to healthy instances, minimizing downtime and improving overall system resilience.</p><p>4. <strong>Protocol Transformation:</strong></p><p>API gateways can convert between different communication protocols, such as <em>HTTP/HTTPS</em>, <em>WebSocket</em>, and <em>gRPC</em>. This enables seamless integration between services that use different protocols, simplifying the development process and reducing the need for additional infrastructure.</p><p>5. <strong>Customizable Middleware:</strong></p><p>API gateways support custom middleware, allowing developers to extend their functionality and tailor them to specific use cases. This can include caching, request/response transformation, and custom authentication mechanisms.</p><p>6. <strong>Supports API Versioning</strong></p><p>API gateway supports API versioning, which allows developers to update the APIs without affecting the client. This ensures that the client can continue to use the APIs even as they are being updated.</p><h3>Practical Uses of API Gateways</h3><ol><li><strong>Microservices Architecture:</strong></li></ol><p>In a microservices-based system, API gateways act as a single entry point for all external requests, routing them to the appropriate microservices. This simplifies the system’s architecture, improves security, and enables developers to manage APIs more efficiently.</p><p>2. <strong>Serverless Computing:</strong></p><p>API gateways can integrate with serverless platforms like AWS Lambda, Azure Functions, and Google Cloud Functions. This allows developers to build scalable, event-driven applications without the need to manage any underlying infrastructure.</p><p>3. <strong>Mobile and Web Applications:</strong></p><p>API gateways can optimize the communication between mobile and web applications and backend services. They can aggregate multiple API calls into a single response, reducing latency and improving the user experience.</p><p>4.<strong> IoT and Edge Computing:</strong></p><p>API gateways can be deployed at the edge of a network, enabling secure and efficient communication between IoT devices and backend services. This reduces the amount of data transmitted over the network and minimizes latency, which is crucial for real-time IoT applications.</p><p>5.<strong> API Monetization:</strong></p><p>API gateways can help businesses monetize their APIs by implementing usage-based billing, subscription plans, and access control. This enables organizations to generate revenue from their APIs and foster a thriving ecosystem of third-party developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vtL_mZnEtIzbWPs_V_yOLA.png" /></figure><p>Let&#39;s try to implement a Filter to Check Request Headers and Set API Gateway Configurations.</p><ol><li>Creating the application.conf File</li></ol><p>let’s create the application.conf file and define our configurations:</p><pre>api {<br>  whitelist-ips = [&quot;127.0.0.1&quot;, &quot;192.168.0.1&quot;]<br>  new-header = &quot;X-My-New-Header&quot;<br>  new-header-value = &quot;my-new-header-value&quot;<br>  ttl = 60<br>  quota-limit = 1000<br>}</pre><p>This configuration file defines the IP addresses allowed to access the API, a new header to be added to the request, a time-to-live (<em>TTL</em>) value for the API response, and a quota limit for the number of API requests.</p><p>2. Filter implementation</p><pre>public class MyFilter extends Filter {<br><br>    private final Configuration config;<br><br>    @Inject<br>    public MyFilter(Materializer mat, HttpExecutionContext ec, Configuration config) {<br>        super(mat, ec);<br>        this.config = config;<br>    }<br><br>    @Override<br>    public CompletionStage&lt;Result&gt; apply(Http.RequestHeader requestHeader, <br>                                         Function&lt;Http.RequestHeader, CompletionStage&lt;Result&gt;&gt; next) {<br>        // Get the value of the custom header<br>        String headerValue = requestHeader.getHeaders().get(&quot;X-My-Custom-Header&quot;);<br><br>        // Check if the header value is valid<br>        if (headerValue != null &amp;&amp; headerValue.equals(&quot;my-custom-header-value&quot;)) {<br>            // Set the IP whitelist<br>            String[] whitelistIps = config.getStringList(&quot;api.whitelist-ips&quot;).toArray(new String[0]);<br>            List&lt;String&gt; whitelist = Arrays.asList(whitelistIps);<br>            requestHeader = requestHeader.withHeader(&quot;X-Forwarded-For&quot;, String.join(&quot;, &quot;, whitelist));<br><br>            // Add a new header to the request<br>            requestHeader = requestHeader.withHeader(config.getString(&quot;api.new-header&quot;), <br>                                                      config.getString(&quot;api.new-header-value&quot;));<br><br>            }<br><br>        // Call the next filter or action<br>        return next.apply(requestHeader);<br>    }<br>}</pre><p>This code defines a filter that checks for the presence of a custom header named “X-My-Custom-Header”. If the header is present and has the expected value, the filter sets the IP whitelist, adds a new header to the request</p><p>One way to implement quota with tokens is to use a token bucket algorithm. In this approach, a token bucket is created for each API client, and tokens are added to the bucket at a fixed rate. When an API request is made, a token is removed from the bucket. If the bucket is empty, the API request is rejected.</p><p>To implement this, you would need to create a data store to store token bucket information for each client. When a request is made, the filter would check the token bucket for the client associated with the request and decrement the token count. If the token count is zero, the request would be rejected.</p><h3>Conclusion</h3><p>API gateways have emerged as a powerful tool for managing, securing, and optimizing APIs in modern software systems. Their versatility and wide range of features make them an indispensable component in microservices, serverless computing, mobile and web applications, IoT, and API monetization. By harnessing the power of API gateways, developers can build more scalable, resilient, and efficient applications that cater to the ever-evolving needs of today’s digital landscape.</p><p>Basically, API Gateway represents <em>Gandalf</em> from <em>LOTR</em> 🧙‍♂️, standing firm in the way of unauthorized requests saying <strong><em>YOU SHALL NOT PASS</em></strong>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=958267b09f07" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>