<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aditya Pandey</title>
    <description>The latest articles on DEV Community by Aditya Pandey (@pandeyaditya0002).</description>
    <link>https://dev.to/pandeyaditya0002</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1279348%2Fcb495017-a4d9-42c8-8856-dec108124c07.jpeg</url>
      <title>DEV Community: Aditya Pandey</title>
      <link>https://dev.to/pandeyaditya0002</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pandeyaditya0002"/>
    <language>en</language>
    <item>
      <title>How Cursor Shipped its Coding Agent to Production</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Thu, 26 Feb 2026 15:54:48 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/how-cursor-shipped-its-coding-agent-to-production-3km</link>
      <guid>https://dev.to/pandeyaditya0002/how-cursor-shipped-its-coding-agent-to-production-3km</guid>
      <description>&lt;p&gt;On October 29, 2025, Cursor shipped Cursor 2.0 and introduced Composer, its first agentic coding model. Cursor claims Composer is 4x faster than similarly intelligent models, with most turns completing in under 30 seconds. For more clarity and detail, we worked with Lee Robinson at Cursor on this article.&lt;/p&gt;

&lt;p&gt;Shipping a reliable coding agent requires a lot of systems engineering. Cursor’s engineering team has shared technical details and challenges from building Composer and shipping their coding agent into production. This article breaks down those engineering challenges and how they solved them.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is a Coding Agent?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To understand coding agents, we first need to look at how AI coding has evolved.&lt;/p&gt;

&lt;p&gt;AI in software development has evolved in three waves. First, we treated general-purpose LLMs like a coding partner. You copied code, pasted it into ChatGPT, asked for a fix, and manually applied the changes. It was helpful, but disconnected.&lt;/p&gt;

&lt;p&gt;In the second wave, tools like Copilot and Cursor Tab brought AI directly into the editor. To power these tools, specialized models were developed for fast, inline autocomplete. They helped developers type faster, but they were limited to the specific file being edited.&lt;/p&gt;

&lt;p&gt;More recently, the focus has shifted to coding agents that handle tasks end-to-end. They don’t just suggest code; they handle coding requests end-to-end. They can search your repo, edit multiple files, run terminal commands, and iterate on errors until the build and tests pass. We are currently living through this third wave.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvahlzbwn47yo9cexpr2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvahlzbwn47yo9cexpr2z.png" alt=" " width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A coding agent is not a single model. It is a system built around a model with tool access, an iterative execution loop, and mechanisms to retrieve relevant code. The model, often referred to as an agentic coding model, is a specialized LLM trained to reason over codebases, use tools, and work effectively inside an agentic system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F38a64xr0gjgihozd2uhk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F38a64xr0gjgihozd2uhk.png" alt=" " width="800" height="824"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is easy to confuse agentic coding models with coding agents. The agentic coding model is like the brain. It has the intelligence to reason, write code, and use tools. The coding agent is the body. It has the “hands” to execute tools, manage context, and ensure it reaches a working solution by iterating until the build and tests pass.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdc2qhca2t4q3tmdjgg7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdc2qhca2t4q3tmdjgg7z.png" alt=" " width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI labs first train an agentic coding model, then wrap it in an agent system, also known as a harness, to create a coding agent. For example, OpenAI Codex is a coding agent environment powered by the GPT-5.2-Codex model, and Cursor’s coding agent can run on multiple frontier models, including its own agentic coding model, Composer. In the next section, we take a closer look at Cursor’s coding agent and Composer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekk71nsxx2cud7og9hf1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekk71nsxx2cud7og9hf1.png" alt=" " width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;System Architecture&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A production-ready coding agent is a complex system composed of several critical components working in unison. While the model provides the intelligence, the surrounding infrastructure is what enables it to interact with files, run commands, and maintain safety. The next Figure shows the key components of a Cursor’s agent system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3lu6zufpkdk80amk3iv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3lu6zufpkdk80amk3iv.png" alt=" " width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Router&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Cursor integrates multiple agentic models, including its own specialized Composer model. For efficiency, the system offers an “Auto” mode that acts as a router. It dynamically analyzes the complexity of each request to choose the best model for the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;LLM (agentic coding model)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The heart of the system is the agentic coding model. In Cursor’s agent, that model can be Composer, or any other frontier coding models picked by the router. Unlike a standard LLM trained just to predict the next token of text, this model is trained on trajectories, sequences of actions that show the model how and when to use available tools to solve a problem.&lt;/p&gt;

&lt;p&gt;Creating this model is often the heaviest lift in building a coding agent. It requires massive data preparation, training, and testing to ensure the model doesn’t just write code, but understands the process of coding (e.g., “search first, then edit, then verify”). Once this model is ready and capable of reasoning, the rest of the work shifts to system engineering to provide the environment it needs to operate.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Tools&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Composer is connected to a tool harness inside Cursor’s agent system, with more than ten tools available. These tools cover the core operations needed for coding such as searching the codebase, reading and writing files, applying edits, and running terminal commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flhd5vd9reiyyteq5tjfq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flhd5vd9reiyyteq5tjfq.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Context Retrieval&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Real codebases are too large to fit into a single prompt. The context retrieval system searches the codebase to pull in the most relevant code snippets, documentation, and definitions for the current step, so the model has what it needs without overflowing the context window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkhvtfwliilhxfrca6uk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkhvtfwliilhxfrca6uk.png" alt=" " width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Orchestrator&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The orchestrator is the control loop that runs the agent. The model decides what to do next and which tool to use, and the orchestrator executes that tool call, collects the result such as search hits, file contents, or test output, rebuilds the working context with the new information, and sends it back to the model for the next step. This iterative loop is what turns the system from a chatbot into an agent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2hcklkw11q2306nugkg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2hcklkw11q2306nugkg.png" alt=" " width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One common way to implement this loop is the ReAct pattern, where the model alternates between reasoning steps and tool actions based on the observations it receives.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Sandbox (execution environment)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Agents need to run builds, tests, linters, and scripts to verify their work. However, giving an AI unrestricted access to your terminal is a security risk. To solve this, tool calls are executed in a Sandbox. This secure and isolated environment uses strict guardrails to ensure that the user’s host machine remains safe even if the agent attempts to run a destructive command. Cursor offers the flexibility to run these sandboxes either locally or remotely on a cloud virtual machine.&lt;/p&gt;

&lt;p&gt;Note that these are the core building blocks you will see in most coding agents. Different labs may add more components on top, such as long-term memory, policy and safety layers, specialized planning modules, or collaboration features, depending on the capabilities they want to support.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Production Challenges&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;On paper, tools, memory, orchestration, routing, and sandboxing look like a straightforward blueprint. In production, the constraints are harsher. A model that can write good code is still useless if edits do not apply cleanly, if the system is too slow to iterate, or if verification is unsafe or too expensive to run frequently.&lt;/p&gt;

&lt;p&gt;Cursor’s experience highlights three engineering hurdles that general-purpose models do not solve out of the box: reliable editing, compounded latency, and sandboxing at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Challenge 1: The “Diff Problem”&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;General-purpose models are trained primarily to generate text. They struggle significantly when asked to perform edits on existing files.&lt;/p&gt;

&lt;p&gt;This is known as the “Diff Problem.” When a model is asked to edit code, it has to locate the right lines, preserve indentation, and output a rigid diff format. If it hallucinates line numbers or drifts in formatting, the patch fails even when the underlying logic is correct. Worse, a patch can apply incorrectly, which is harder to detect and more expensive to clean up. In production, incorrect edits are often worse than no edits because they reduce trust and increase cleanup time.&lt;/p&gt;

&lt;p&gt;A common way to mitigate the diff problem is to train on edit trajectories. For example, you can structure training data as triples like (original_code, edit_command, final_code), which teaches the model how an edit instruction should change the file while preserving everything else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rlf919yw7n2z7oj291h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rlf919yw7n2z7oj291h.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another critical step is teaching the model to use specific editing tools such as search and replace. Cursor emphasized that these two tools were significantly harder to teach than other tools. To solve this, they ensured their training data contained a high volume of trajectories specifically focused on search and replace tool usage, forcing the model to over-learn the mechanical constraints of these operations. Cursor utilized a cluster of tens of thousands of GPUs to train the Composer model, ensuring these precise editing behaviors were fundamentally baked into the weights.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Challenge 2: Latency Compounds&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In a chat interface, a user might tolerate a short pause. In an agent loop, latency compounds. A single task might require the agent to plan, search, edit, and test across many iterations. If each step takes a few seconds, the end-to-end time quickly becomes frustrating.&lt;/p&gt;

&lt;p&gt;Cursor treats speed as a core product strategy. The make the coding agent fast, they have employed three key techniques:&lt;/p&gt;

&lt;p&gt;Mixture of Experts (MoE) architecture&lt;/p&gt;

&lt;p&gt;Speculative decoding&lt;/p&gt;

&lt;p&gt;Context compaction&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffahw18w2om78dnxf5qgk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffahw18w2om78dnxf5qgk.png" alt=" " width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MoE architecture:&lt;/strong&gt; Composer is a MoE language model. MoE modifies the Transformer by making some feed-forward computation conditional. Instead of sending every token through the same dense MLP, the model routes each token to a small number of specialized MLP experts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3lqg0bwwf66pmha66mnb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3lqg0bwwf66pmha66mnb.png" alt=" " width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MoE can improve both capacity and efficiency by activating only a few experts per token, which can yield better quality at similar latency, or similar quality at lower latency, especially at deployment scale. However, MoE often introduces additional engineering challenges and complexity. If every token goes to the same expert, that expert becomes a bottleneck while others sit idle. This causes high tail latency.&lt;/p&gt;

&lt;p&gt;Teams typically address this with a combination of techniques. During training they add load-balancing losses to encourage the router to spread traffic across experts. During serving, they enforce capacity limits and reroute overflow. At the infrastructure level, they reduce cross-GPU communication overhead by batching and routing work to keep data movement predictable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speculative Decoding:&lt;/strong&gt; Generation is sequential. Agents spend a lot of time producing plans, tool arguments, diffs, and explanations, and generating these token by token is slow. Speculative decoding reduces latency by using a smaller draft model to propose tokens that a larger model can verify quickly. When the draft is correct, the system accepts multiple tokens at once, reducing the number of expensive decoding steps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkepnviwwc3ba90fezytl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkepnviwwc3ba90fezytl.png" alt=" " width="800" height="307"&gt;&lt;/a&gt;&lt;br&gt;
Since code has a very predictable structure, such as imports, brackets, and standard syntax, waiting for a large model like Composer to generate every single character is inefficient. Cursor confirms they use speculative decoding and trained specialized “draft” models that predict the next few tokens rapidly. This allows Composer to generate code much faster than the standard token-by-token generation rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context Compaction:&lt;/strong&gt; Agents also generate a lot of text that is useful once but costly to keep around, such as tool outputs, logs, stack traces, intermediate diffs, and repeated snippets. If the system keeps appending everything, prompts bloat and latency increases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F650g8hwuirlu35d0a0f1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F650g8hwuirlu35d0a0f1.png" alt=" " width="800" height="551"&gt;&lt;/a&gt;&lt;br&gt;
Context compaction addresses this by summarizing the working state and keeping only what is relevant for the next step. Instead of carrying full logs forward, the system retains stable signals like failing test names, error types, and key stack frames. It compresses or drops stale context, deduplicates repeated snippets, and keeps raw artifacts outside the prompt unless they are needed again. Many advanced coding agents like OpenAI’s Codex and Cursor rely on context compaction to stay fast and reliable when reaching the context window limit.&lt;/p&gt;

&lt;p&gt;Context compaction improves both latency and quality. Fewer tokens reduce compute per call, and less noise reduces the chance the model drifts or latches onto outdated information.&lt;/p&gt;

&lt;p&gt;Put together, these three techniques target different sources of compounded latency. MoE reduces per-call serving cost, speculative decoding reduces generation time, and context compaction reduces repeated prompt processing.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Challenge 3: Sandboxing at Scale&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Coding agents do not only generate text. They execute code. They run builds, tests, linters, formatters, and scripts as part of the core loop. That requires an execution environment that is isolated, resource-limited, and safe by default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttr96cbwo0b6tifjqti5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttr96cbwo0b6tifjqti5.png" alt=" " width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Cursor’s flow, the agent provisions a sandboxed workspace from a specific repository snapshot, executes tool calls inside that workspace, and feeds results back into the model. At a small scale, sandboxing is mostly a safety feature. At large scale, it becomes a performance and infrastructure constraint.&lt;/p&gt;

&lt;p&gt;Two major issues dominate when training the model:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Provisioning time becomes the bottleneck&lt;/strong&gt;. The model may generate a solution in milliseconds, but creating a secure, isolated environment can take much longer. If sandbox startup dominates, the system cannot iterate quickly enough to feel usable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Concurrency makes startup overhead a bottleneck at scale&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Spinning up thousands of sandboxes all at once very quickly is challenging. This becomes even more challenging during training. Teaching the model to call tools at scale requires running hundreds of thousands of concurrent sandboxed coding environments in the cloud.&lt;/p&gt;

&lt;p&gt;These challenges pushed the Cursor team to build custom sandboxing infrastructure. They rewrote their VM scheduler to handle bursty demand, like when an agent needs to spin up thousands of sandboxes in a short time. Cursor treats sandboxes as core serving infrastructure, with an emphasis on fast provisioning and aggressive recycling so tool runs can start quickly and sandbox startup time does not dominate the time to a verified fix.&lt;/p&gt;

&lt;p&gt;For safety, Cursor defaults to a restricted Sandbox Mode for agent terminal commands. Commands run in an isolated environment with network access blocked by default and filesystem access limited to the workspace and /tmp/. If a command fails because it needs broader access, the UI lets the user skip it or intentionally re-run it outside the sandbox.&lt;/p&gt;

&lt;p&gt;The key takeaway is to not treat sandboxes as just containers. Treat them like a system that needs its own scheduler, capacity planning, and performance tuning.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Cursor shows that modern coding agents are not just better text generators. They are systems built to edit real repositories, run tools, and verify results. Cursor paired a specialized MoE model with a tool harness, latency-focused serving, and sandboxed execution so the agent can follow a practical loop: inspect the code, make a change, run checks, and iterate until the fix is verified.&lt;/p&gt;

&lt;p&gt;Cursor’s experience shipping Composer to production points to three repeatable lessons that matter for most coding agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tool use must be baked into the model.&lt;/strong&gt; Prompting alone is not enough for reliable tool calling inside long loops. The model needs to learn tool usage as a core behavior, especially for editing operations like search and replace where small mistakes can break the edit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Adoption is the ultimate metric.&lt;/strong&gt; Offline benchmarks are useful, but a coding agent lives or dies by user trust. A single risky edit or broken build can stop users from relying on the tool, so evaluation has to reflect real usage and user acceptance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed is part of the product.&lt;/strong&gt; Latency shapes daily usage. You do not need a frontier model for every step. Routing smaller steps to fast models while reserving larger models for harder planning turns responsiveness into a core feature, not just an infrastructure metric.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Coding agents are still evolving, but the trend is promising. With rapid advances in model training and system engineering, we are moving toward a future where they become much faster and more effective.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>coding</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>How Transformers Architecture Powers Modern LLMs</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Mon, 23 Feb 2026 11:46:15 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/how-transformers-architecture-powers-modern-llms-4pco</link>
      <guid>https://dev.to/pandeyaditya0002/how-transformers-architecture-powers-modern-llms-4pco</guid>
      <description>&lt;p&gt;When we interact with modern large language models like GPT, Claude, or Gemini, we are witnessing a process fundamentally different from how humans form sentences. While we naturally construct thoughts and convert them into words, LLMs operate through a cyclical conversion process.&lt;/p&gt;

&lt;p&gt;Understanding this process reveals both the capabilities and limitations of these powerful systems.&lt;/p&gt;

&lt;p&gt;At the heart of most modern LLMs lies an architecture called a transformer. Introduced in 2017, transformers are sequence prediction algorithms built from neural network layers. The architecture has three essential components:&lt;/p&gt;

&lt;p&gt;An embedding layer that converts tokens into numerical representations.&lt;/p&gt;

&lt;p&gt;Multiple transformer layers where computation happens.&lt;/p&gt;

&lt;p&gt;Output layer that converts results back into text.&lt;/p&gt;

&lt;p&gt;See the diagram below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg2dfe45d02rdr0stew1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg2dfe45d02rdr0stew1.jpg" alt=" " width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Transformers process all words simultaneously rather than one at a time, enabling them to learn from massive text datasets and capture complex word relationships.&lt;/p&gt;

&lt;p&gt;In this article, we will look at how the transformer architecture works in a step-by-step manner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib24ce4jr5xrku8k9bpo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib24ce4jr5xrku8k9bpo.jpg" alt=" " width="800" height="683"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1: From Text to Tokens&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before any computation can happen, the model must convert text into a form it can work with. This begins with tokenization, where text gets broken down into fundamental units called tokens. These are not always complete words. They can be subwords, word fragments, or even individual characters.&lt;/p&gt;

&lt;p&gt;Consider this example input: “I love transformers!” The tokenizer might break this into: [”I”, “ love”, “ transform”, “ers”, “!”]. Notice that “transformers” became two separate tokens. Each unique token in the vocabulary gets assigned a unique integer ID:&lt;/p&gt;

&lt;p&gt;“I” might be token 150&lt;/p&gt;

&lt;p&gt;“love” might be token 8942&lt;/p&gt;

&lt;p&gt;“transform” might be token 3301&lt;/p&gt;

&lt;p&gt;“ers” might be token 1847&lt;/p&gt;

&lt;p&gt;“!” might be token 254&lt;/p&gt;

&lt;p&gt;These IDs are arbitrary identifiers with no inherent relationships. Tokens 150 and 151 are not similar just because their numbers are close. The overall vocabulary typically contains 50,000 to 100,000 unique tokens that the model learned during training.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Converting Tokens to Embeddings&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Neural networks cannot work directly with token IDs because they are just fixed identifiers. Each token ID gets mapped to a vector, a list of continuous numbers usually containing hundreds or thousands of dimensions. These are called embeddings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhswp0jwuqd6ctcc4lwsq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhswp0jwuqd6ctcc4lwsq.jpg" alt=" " width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a simplified example with five dimensions (real models may use 768 to 4096):&lt;/p&gt;

&lt;p&gt;Token “dog” becomes [0.23, -0.67, 0.45, 0.89, -0.12]&lt;/p&gt;

&lt;p&gt;Token “wolf” becomes [0.25, -0.65, 0.47, 0.91, -0.10]&lt;/p&gt;

&lt;p&gt;Token “car” becomes [-0.82, 0.34, -0.56, 0.12, 0.78]&lt;/p&gt;

&lt;p&gt;Notice how “dog” and “wolf” have similar numbers, while “car” is completely different. This creates a semantic space where related concepts cluster together.&lt;/p&gt;

&lt;p&gt;Why the need for multiple dimensions? This is because with just one number per word, we might encounter contradictions. For example:&lt;/p&gt;

&lt;p&gt;“stock” equals 5.2 (financial term)&lt;/p&gt;

&lt;p&gt;“capital” equals 5.3 (similar financial term)&lt;/p&gt;

&lt;p&gt;“rare” equals -5.2 (antonym: uncommon)&lt;/p&gt;

&lt;p&gt;“debt” equals -5.3 (antonym of capital)&lt;/p&gt;

&lt;p&gt;Now, “rare” and “debt” both have similar negative values, implying they are related, which makes no sense. Hundreds of dimensions allow the model to represent complex relationships without such contradictions.&lt;/p&gt;

&lt;p&gt;In this space, we can perform mathematical operations. The embedding for “king” minus “man” plus “woman” approximately equals “queen.” These relationships emerge during training from patterns in text data.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Adding Positional Information&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Transformers do not inherently understand word order. Without additional information, “The dog chased the cat” and “The cat chased the dog” would look identical because both contain the same tokens.&lt;/p&gt;

&lt;p&gt;The solution is positional embeddings. Every position gets mapped to a position vector, just like tokens get mapped to meaning vectors.&lt;/p&gt;

&lt;p&gt;For the token “dog” appearing at position 2, it might look like the following:&lt;/p&gt;

&lt;p&gt;Word embedding: [0.23, -0.67, 0.45, 0.89, -0.12]&lt;/p&gt;

&lt;p&gt;Position 2 embedding: [0.05, 0.12, -0.08, 0.03, 0.02]&lt;/p&gt;

&lt;p&gt;Combined (element-wise sum): [0.28, -0.55, 0.37, 0.92, -0.10]&lt;/p&gt;

&lt;p&gt;This combined embedding captures both the meaning of the word and its context of use. This is also what flows into the transformer layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4: The Attention Mechanism in Transformer Layers&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The transformer layers implement the attention mechanism, which is the key innovation that makes these models so powerful. Each transformer layer operates using three components for every token: queries, keys, and values. We can think of this as a fuzzy dictionary lookup where the model compares what it is looking for (the query) against all possible answers (the keys) and returns weighted combinations of the corresponding values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4sdsgy8anpevevwv7wo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4sdsgy8anpevevwv7wo.jpg" alt=" " width="800" height="1009"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let us walk through a concrete example. Consider the sentence: “The cat sat on the mat because it was comfortable.”&lt;/p&gt;

&lt;p&gt;When the model processes the word “it,” it needs to determine what “it” refers to. Here is what happens:&lt;/p&gt;

&lt;p&gt;First, the embedding for “it” generates a query vector asking essentially, “What noun am I referring to?”&lt;/p&gt;

&lt;p&gt;Next, this query is compared against the keys from all previous tokens. Each comparison produces a similarity score. For example:&lt;/p&gt;

&lt;p&gt;“The” (article) generates score: 0.05&lt;/p&gt;

&lt;p&gt;“cat” (noun) generates score: 8.3&lt;/p&gt;

&lt;p&gt;“sat” (verb) generates score: 0.2&lt;/p&gt;

&lt;p&gt;“on” (preposition) generates score: 0.03&lt;/p&gt;

&lt;p&gt;“the” (article) generates score: 0.04&lt;/p&gt;

&lt;p&gt;“mat” (noun) generates score: 4.1&lt;/p&gt;

&lt;p&gt;“because” (conjunction) generates score: 0.1&lt;/p&gt;

&lt;p&gt;The raw scores are then converted into attention weights that sum to 1.0. For example:&lt;/p&gt;

&lt;p&gt;“cat” receives attention weight: 0.75 (75 percent)&lt;/p&gt;

&lt;p&gt;“mat” receives attention weight: 0.20 (20 percent)&lt;/p&gt;

&lt;p&gt;All other tokens: 0.05 total (5 percent combined)&lt;/p&gt;

&lt;p&gt;Finally, the model takes the value vectors from each token and combines them using these weights. For example:&lt;/p&gt;

&lt;p&gt;Output = (0.75 × Value_cat) + (0.20 × Value_mat) + (0.03 × Value_the) + ...&lt;br&gt;
The value from “cat” contributes 75 percent to the output, “mat” contributes 20 percent, and everything else is nearly ignored. This weighted combination becomes the new representation for “it” that captures the contextual understanding that “it” most likely refers to “cat.”&lt;/p&gt;

&lt;p&gt;This attention process happens in every transformer layer, but each layer learns to detect different patterns.&lt;/p&gt;

&lt;p&gt;Early layers learn basic patterns like grammar and common word pairs. When processing “cat,” these layers might heavily attend to “The” because they learn that articles and their nouns are related.&lt;/p&gt;

&lt;p&gt;Middle layers learn sentence structure and relationships between phrases. They might figure out that “cat” is the subject of “sat” and that “on the mat” forms a prepositional phrase indicating location.&lt;/p&gt;

&lt;p&gt;Deep layers extract abstract meaning. They might understand that this sentence describes a physical situation and implies the cat is comfortable or resting.&lt;/p&gt;

&lt;p&gt;Each layer refines the representation progressively. The output of one layer becomes the input for the next, with each layer adding more contextual understanding.&lt;/p&gt;

&lt;p&gt;Importantly, only the final transformer layer needs to predict an actual token. All intermediate layers perform the same attention operations but simply transform the representations to be more useful for downstream layers. A middle layer does not output token predictions. Instead, it outputs refined vector representations that flow to the next layer.&lt;/p&gt;

&lt;p&gt;This stacking of many layers, each specializing in different aspects of language understanding, is what enables LLMs to capture complex patterns and generate coherent text.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5: Converting Back to Text&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After flowing through all layers, the final vector must be converted to text. The unembedding layer compares this vector against every token embedding and produces scores.&lt;/p&gt;

&lt;p&gt;For example, to complete “I love to eat,” the unembedding might produce:&lt;/p&gt;

&lt;p&gt;“pizza”: 65.2&lt;/p&gt;

&lt;p&gt;“tacos”: 64.8&lt;/p&gt;

&lt;p&gt;“sushi”: 64.1&lt;/p&gt;

&lt;p&gt;“food”: 58.3&lt;/p&gt;

&lt;p&gt;“barbeque”: 57.9&lt;/p&gt;

&lt;p&gt;“car”: -12.4&lt;/p&gt;

&lt;p&gt;“42”: -45.8&lt;/p&gt;

&lt;p&gt;These arbitrary scores get converted to probabilities using softmax:&lt;/p&gt;

&lt;p&gt;“pizza”: 28.3 percent&lt;/p&gt;

&lt;p&gt;“tacos”: 24.1 percent&lt;/p&gt;

&lt;p&gt;“sushi”: 18.9 percent&lt;/p&gt;

&lt;p&gt;“food”: 7.2 percent&lt;/p&gt;

&lt;p&gt;“barbeque”: 6.1 percent&lt;/p&gt;

&lt;p&gt;“car”: 0.0001 percent&lt;/p&gt;

&lt;p&gt;“42”: 0.0000001 percent&lt;/p&gt;

&lt;p&gt;Tokens with similar scores (65.2 versus 64.8) receive similar probabilities (28.3 versus 24.1 percent), while low-scoring tokens get near-zero probabilities.&lt;/p&gt;

&lt;p&gt;The model does not select the highest probability token. Instead, it randomly samples from this distribution. Think of a roulette wheel where each token gets a slice proportional to its probability. Pizza gets 28.3 percent, tacos get 24.1 percent, and 42 gets a microscopic slice.&lt;/p&gt;

&lt;p&gt;The reason for this randomness is that always picking a specific value like “pizza” would create repetitive, unnatural output. Random sampling weighted by probability allows selection of “tacos,” “sushi,” or “barbeque,” producing varied, natural responses. Occasionally, a lower-probability token gets picked, leading to creative outputs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Iterative Generation Loop&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The generation process repeats for every token. Let us walk through an example where the initial prompt is “The capital of France.” Here’s how different cycles go through the transformer:&lt;/p&gt;

&lt;p&gt;Cycle 1:&lt;/p&gt;

&lt;p&gt;Input: [”The”, “capital”, “of”, “France”]&lt;/p&gt;

&lt;p&gt;Process through all layers&lt;/p&gt;

&lt;p&gt;Sample: “is” (80 percent)&lt;/p&gt;

&lt;p&gt;Output so far: “The capital of France is”&lt;/p&gt;

&lt;p&gt;Cycle 2:&lt;/p&gt;

&lt;p&gt;Input: &lt;a href="https://dev.toincludes%20new%20token"&gt;”The”, “capital”, “of”, “France”, “is”&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Process through all layers (5 tokens now)&lt;/p&gt;

&lt;p&gt;Sample: “Paris” (92 percent)&lt;/p&gt;

&lt;p&gt;Output so far: “The capital of France is Paris”&lt;/p&gt;

&lt;p&gt;Cycle 3:&lt;/p&gt;

&lt;p&gt;Input: &lt;a href="https://dev.to6%20tokens"&gt;”The”, “capital”, “of”, “France”, “is”, “Paris”&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Process through all layers&lt;/p&gt;

&lt;p&gt;Sample: “.” (65 percent)&lt;/p&gt;

&lt;p&gt;Output so far: “The capital of France is Paris.”&lt;/p&gt;

&lt;p&gt;Cycle 4:&lt;/p&gt;

&lt;p&gt;Input: &lt;a href="https://dev.to7%20tokens"&gt;”The”, “capital”, “of”, “France”, “is”, “Paris”, “.”&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Process through all layers&lt;/p&gt;

&lt;p&gt;Sample: [EoS] token (88 percent)&lt;/p&gt;

&lt;p&gt;Stop the loop&lt;/p&gt;

&lt;p&gt;Final output: “The capital of France is Paris.”&lt;/p&gt;

&lt;p&gt;The [EoS] or end-of-sequence token signals completion. Each cycle processes all previous tokens. This is why generation can slow as responses lengthen.&lt;/p&gt;

&lt;p&gt;This is called autoregressive generation because each output depends on all previous outputs. If an unusual token gets selected (perhaps “chalk” with 0.01 percent probability in “I love to eat chalk”), all subsequent tokens will be influenced by this choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Training Versus Inference: Two Different Modes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The transformer flow operates in two contexts: training and inference.&lt;/p&gt;

&lt;p&gt;During training, the model learns language patterns from billions of text examples. It starts with random weights and gradually adjusts them. Here is how training works:&lt;/p&gt;

&lt;p&gt;Training text: “The cat sat on the mat.”&lt;/p&gt;

&lt;p&gt;Model receives: “The cat sat on the”&lt;/p&gt;

&lt;p&gt;With random initial weights, the model might predict:&lt;/p&gt;

&lt;p&gt;“banana”: 25 percent&lt;/p&gt;

&lt;p&gt;“car”: 22 percent&lt;/p&gt;

&lt;p&gt;“mat”: 3 percent (correct answer has low probability)&lt;/p&gt;

&lt;p&gt;“elephant”: 18 percent&lt;/p&gt;

&lt;p&gt;The training process calculates the error (mat should have been higher) and uses backpropagation to adjust every weight:&lt;/p&gt;

&lt;p&gt;Embeddings for “on” and “the” get adjusted&lt;/p&gt;

&lt;p&gt;Attention weights in all 96 layers get adjusted&lt;/p&gt;

&lt;p&gt;Unembedding layer gets adjusted&lt;/p&gt;

&lt;p&gt;Each adjustment is tiny (0.245 to 0.247), but it accumulates across billions of examples. After seeing “sat on the” followed by “mat” thousands of times in different contexts, the model learns this pattern. Training takes weeks on thousands of GPUs and costs millions of dollars. Once complete, weights are frozen.&lt;/p&gt;

&lt;p&gt;During inference, the transformer runs with frozen weights:&lt;/p&gt;

&lt;p&gt;User query: “Complete this: The cat sat on the”&lt;/p&gt;

&lt;p&gt;The model processes the input with its learned weights and outputs: “mat” (85 percent), “floor” (8 percent), “chair” (3 percent). It samples “mat” and returns it. No weight changes occur.&lt;/p&gt;

&lt;p&gt;The model used its learned knowledge but did not learn anything new. The conversations do not update model weights. To teach the model new information, we would need to retrain it with new data, which requires substantial computational resources.&lt;/p&gt;

&lt;p&gt;See the diagram below that shows the various steps in an LLM execution flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxehbr7i7jibbmo15m47.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxehbr7i7jibbmo15m47.jpg" alt=" " width="800" height="872"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The transformer architecture provides an elegant solution to understanding and generating human language. By converting text to numerical representations, using attention mechanisms to capture relationships between words, and stacking many layers to learn increasingly abstract patterns, transformers enable modern LLMs to produce coherent and useful text.&lt;/p&gt;

&lt;p&gt;This process involves seven key steps that repeat for every generated token: tokenization, embedding creation, positional encoding, processing through transformer layers with attention mechanisms, unembedding to scores, sampling from probabilities, and decoding back to text. Each step builds on the previous one, transforming raw text into mathematical representations that the model can manipulate, then back into human-readable output.&lt;/p&gt;

&lt;p&gt;Understanding this process reveals both the capabilities and limitations of these systems. In essence, LLMs are sophisticated pattern-matching machines that predict the most likely next token based on patterns learned from massive datasets.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>deeplearning</category>
      <category>llm</category>
    </item>
    <item>
      <title>Understanding Database Types</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Tue, 07 Oct 2025 05:59:24 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/understanding-database-types-4l4e</link>
      <guid>https://dev.to/pandeyaditya0002/understanding-database-types-4l4e</guid>
      <description>&lt;p&gt;The success of a software application often hinges on the choice of the right databases. As developers, we're faced with a vast array of database options. It is crucial for us to understand the differences between these options and how to select the ones that best align with our project's requirements. A complex application usually uses several different databases, each catering to a specific aspect of the application’s needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo0wv0efk90gtbkglvwfk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo0wv0efk90gtbkglvwfk.jpg" alt=" " width="800" height="705"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this comprehensive three-part series, we’ll explore the art of database selection. We’ll arm ourselves with the knowledge necessary to make informed decisions when faced with the challenge of choosing databases for various components of our application. We will dive into the process of database selection, examining the various types of databases, discussing factors that influence database performance and cost, and guiding ourselves toward the best choices for our application while balancing essential tradeoffs. &lt;/p&gt;

&lt;p&gt;Throughout the series, we’ll outline the key steps in the database selection process and review case studies that showcase successful database selection in practice. By the end of this series, we aim to empower ourselves with the knowledge and confidence needed to master the art of selecting the right combination of databases for our complex applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0c2xdvqtuc3lpb9u9hq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0c2xdvqtuc3lpb9u9hq.jpg" alt=" " width="800" height="1119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Understanding Database Types&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To make the best decision for our projects, it is essential to understand the various types of databases available in the market. In this section, we explore the key characteristics of different database types, including popular options for each, and compare their use cases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3fbh8bje203vkhsco6b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3fbh8bje203vkhsco6b.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Relational Databases&lt;br&gt;
Relational databases are based on the relational model, which organizes data into tables with rows and columns. These databases have been the standard choice for many applications due to their robust consistency, support for complex queries, and adherence to ACID properties (Atomicity, Consistency, Isolation, Durability). Key features and benefits of relational databases include:&lt;/p&gt;

&lt;p&gt;Structured data organization: Data in relational databases is stored in tables with a predefined schema, enforcing a consistent structure throughout the database. This organization makes it easier to manage and maintain data, especially when dealing with large amounts of structured data.&lt;/p&gt;

&lt;p&gt;Relationships and referential integrity: The relationships between tables in a relational database are defined by primary and foreign keys, ensuring referential integrity. This feature allows for efficient querying of related data and supports complex data relationships.&lt;/p&gt;

&lt;p&gt;SQL support: Relational databases use Structured Query Language (SQL) for querying, manipulating, and managing data. SQL is a powerful and widely adopted language that enables developers to perform complex queries and data manipulations.&lt;/p&gt;

&lt;p&gt;Transactions and ACID properties: Relational databases support transactions, which are sets of related operations that either succeed or fail as a whole. This feature ensures the ACID properties – Atomicity, Consistency, Isolation, and Durability – are maintained, guaranteeing data consistency and integrity.&lt;/p&gt;

&lt;p&gt;Indexing and optimization: Relational databases offer various indexing techniques and query optimization strategies, which help improve query performance and reduce resource consumption.&lt;/p&gt;

&lt;p&gt;Relational databases also have some drawbacks:&lt;/p&gt;

&lt;p&gt;Limited scalability: Scaling relational databases horizontally (adding more nodes) can be challenging, especially when compared to some NoSQL databases that are designed for distributed environments.&lt;/p&gt;

&lt;p&gt;Rigidity: The predefined schema in relational databases can make it difficult to adapt to changing requirements, as altering the schema may require significant modifications to existing data and applications.&lt;/p&gt;

&lt;p&gt;Performance issues with large datasets: As the volume of data grows, relational databases may experience performance issues, particularly when dealing with complex queries and large-scale data manipulations.&lt;/p&gt;

&lt;p&gt;Inefficient for unstructured or semi-structured data: Relational databases are designed for structured data, which may not be suitable for managing unstructured or semi-structured data, such as social media data or sensor data.&lt;/p&gt;

&lt;p&gt;Popular relational databases include MySQL, PostgreSQL, Microsoft SQL Server, and Oracle. Each of these options has its unique features, strengths, and weaknesses, making them suitable for different use cases and requirements. When considering a relational database, it is essential to evaluate the specific needs of the application in terms of data consistency, support for complex queries, and scalability, among other factors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5o2loi7y8e67blgq6sv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5o2loi7y8e67blgq6sv.jpg" alt=" " width="800" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>beginners</category>
      <category>database</category>
    </item>
    <item>
      <title>Password, Session, Cookie, Token, JWT, SSO, OAuth - Authentication Explained - Part 2</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Thu, 18 Sep 2025 11:25:04 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/password-session-cookie-token-jwt-sso-oauth-authentication-explained-part-2-2gep</link>
      <guid>https://dev.to/pandeyaditya0002/password-session-cookie-token-jwt-sso-oauth-authentication-explained-part-2-2gep</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Passwordless Authentication
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
We have covered three types of authentication so far: HTTP basic authentication, session-cookie authentication, and token-based authentication. They all require a password. However, there are other ways to prove your identity without a password. &lt;/p&gt;

&lt;p&gt;When it comes to authentication, there are three factors to consider:&lt;/p&gt;

&lt;p&gt;Knowledge factors: something you know, such as a password&lt;/p&gt;

&lt;p&gt;Ownership factors: something you own, such as a device or phone number&lt;/p&gt;

&lt;p&gt;Inherence factors: something unique to you, such as your biometric features&lt;/p&gt;

&lt;p&gt;Passwords fall under “something you know”. One-Time Passwords (OTP) prove that the user owns a cell phone or a device, while biometric authentication proves "something unique to you".&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  One-Time Passwords (OTP)
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
One-Time Passwords (OTP) are widely used as a more secure method of authentication. Unlike static passwords, which can be reused, OTPs are valid for a limited time, typically a few minutes. This means that even if someone intercepts an OTP, they can’t use it to log in later. Additionally, OTPs require “something you own” as well as “something you know” to log in. This can be a cell phone number or email address that the user has access to, making it harder for hackers to steal.&lt;/p&gt;

&lt;p&gt;However, it's important to note that using SMS as the delivery method for OTPs can be less secure than other methods. This is because SMS messages can be intercepted or redirected by hackers, particularly if the user's phone number has been compromised. In some cases, attackers have been able to hijack phone numbers by convincing the mobile carrier to transfer the number to a new SIM card. Once the attacker has control of the number, they can intercept any OTPs sent via SMS. For this reason, it's recommended to use alternative delivery methods, such as email or mobile apps, whenever possible.&lt;/p&gt;

&lt;p&gt;Here’s how OTPs work in more detail:&lt;/p&gt;

&lt;p&gt;Step 1: The user wants to log in to a website and is asked to enter a username, cell phone number, or email.&lt;/p&gt;

&lt;p&gt;Step 2: The server generates an OTP with an expiration time.&lt;/p&gt;

&lt;p&gt;Step 3: The server sends the OTP to the user’s device via SMS or email.&lt;/p&gt;

&lt;p&gt;Step 4: The user enters the OTP received in the login box.&lt;/p&gt;

&lt;p&gt;Step 5-6: The server compares the generated OTP with the one the user entered. If they match, login is granted.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpn67xb3p197mmmmv8is9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpn67xb3p197mmmmv8is9.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, a hardware or software key can be used to generate OTPs for multi-factor authentication (MFA). For example, Google 2FA uses a software key that generates a new OTP every 30 seconds. When logging in, users enter their password and the current OTP displayed on their device. This adds an extra layer of security as hackers would need access to the user’s device to steal the OTP. More on MFA later.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  SSO (Single Sign-On)
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Single Sign-On (SSO) is a user authentication method that allows us to access multiple systems or applications with a single set of credentials. SSO streamlines the login process, providing a seamless user experience across various platforms.&lt;/p&gt;

&lt;p&gt;The SSO process mainly relies on a Central Authentication Service (CAS) server. Here's a step-by-step breakdown of the SSO process:&lt;/p&gt;

&lt;p&gt;When we attempt to log in to an application, such as Gmail, we're redirected to the CAS server.&lt;/p&gt;

&lt;p&gt;The CAS server verifies our login credentials and creates a Ticket Granting Ticket (TGT). This TGT is then stored in a Ticket Granting Cookie (TGC) on our browser, representing our global session.&lt;/p&gt;

&lt;p&gt;CAS generates a Service Ticket (ST) for our visit to Gmail and redirects us back to Gmail with the ST.&lt;/p&gt;

&lt;p&gt;Gmail uses the ST to validate our login with the CAS server. After validation, we can access Gmail.&lt;/p&gt;

&lt;p&gt;When we want to access another application, like YouTube, the process is simplified:&lt;/p&gt;

&lt;p&gt;Since we already have a TGC from our Gmail login, CAS recognizes our authenticated status.&lt;/p&gt;

&lt;p&gt;CAS generates a new ST for YouTube access, and we can use YouTube without inputting our credentials again.&lt;/p&gt;

&lt;p&gt;This process reduces the need to remember and enter multiple sets of credentials for different applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh1hrpgn0hcrj3lr5c6s5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh1hrpgn0hcrj3lr5c6s5.png" alt=" " width="800" height="717"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are different protocols that facilitate SSO:&lt;/p&gt;

&lt;p&gt;SAML (Security Assertion Markup Language) is widely used in enterprise applications. SAML communicates authentication and authorization data in an XML format.&lt;/p&gt;

&lt;p&gt;OIDC (OpenID Connect) is popular in consumer applications. OIDC handles authentication through JSON Web Tokens (JWT) and builds on the OAuth 2.0 framework. More on this in the next section.&lt;/p&gt;

&lt;p&gt;For new applications, OIDC is the preferred choice. It supports various client types, including web-based, mobile, and JavaScript clients.&lt;/p&gt;

&lt;p&gt;SSO offers a streamlined and secure authentication method, providing a seamless user experience by requiring only one set of credentials for multiple applications. This approach enhances security through the use of strong, unique passwords and reduced phishing risks. It also minimizes administrative burdens for IT departments.&lt;br&gt;
**&lt;/p&gt;

&lt;p&gt;OAuth 2.0 and OpenID Connect (OIDC)&lt;br&gt;
**&lt;/p&gt;

&lt;p&gt;​​While OAuth 2.0 is primarily an authorization framework, it can be used in conjunction with OpenID Connect (OIDC) for authentication purposes. OIDC is an authentication layer built on top of OAuth 2.0, enabling the verification of a user's identity and granting controlled access to protected resources.&lt;/p&gt;

&lt;p&gt;When using "Sign in with Google" or similar features, OAuth 2.0 and OIDC work together to streamline the authentication process. OIDC provides user identity data in the form of a standardized JSON Web Token (JWT). This token contains information about the authenticated user, allowing the third-party application to create a user profile without requiring a separate registration process.&lt;/p&gt;

&lt;p&gt;In this setup, OAuth 2.0 provides "secure delegated access" by issuing short-lived tokens instead of passwords, allowing third-party services to access protected resources with the resource owner's permission. This method enhances security, as the third-party service does not handle or store the user's password directly.&lt;/p&gt;

&lt;p&gt;The diagram below shows how the protocol works in the “Sign in with Google” scenario.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86q87i6w15qnl1fwol98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86q87i6w15qnl1fwol98.png" alt=" " width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the “Sign in with Google” example, OAuth 2.0 defines four roles:&lt;/p&gt;

&lt;p&gt;Resource owner: The end user, who controls access to their personal data.&lt;/p&gt;

&lt;p&gt;Resource server: The Google server hosting user profiles as protected resources. It uses access tokens to respond to protected resource requests, ensuring that only authorized services can access the data.&lt;/p&gt;

&lt;p&gt;Client: The device (PC or smartphone) making requests on behalf of the resource owner. This device represents the third-party application seeking access to the user's data.&lt;/p&gt;

&lt;p&gt;Authorization server: The Google authorization server that issues tokens to clients, managing the secure exchange of tokens between the resource server and the client.&lt;/p&gt;

&lt;p&gt;OAuth 2.0 offers four types of authorization grants to accommodate different situations:&lt;/p&gt;

&lt;p&gt;Authorization code grant: The most complete and versatile mode, suitable for most application types. More details below.&lt;/p&gt;

&lt;p&gt;Implicit grant: Designed for applications with only a frontend, such as single-page applications or mobile apps. This is no longer recommended. More details below.&lt;/p&gt;

&lt;p&gt;Resource owner password credentials grant: Used when users trust a third-party application with their credentials, such as a trusted mobile app.&lt;/p&gt;

&lt;p&gt;Client credentials grant: Suitable for cases without a frontend, like command-line tools or server-to-server communication, where resource owner interaction is not needed.&lt;/p&gt;

&lt;p&gt;The standard provides multiple modes to cater to different application scenarios and requirements, ensuring flexibility and adaptability for diverse situations.&lt;/p&gt;

&lt;p&gt;The authorization code grant is one example worth examining. The specifications for the other three grant types are available in RFC-6749.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvhri5vh5msn3n8l2dnz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvhri5vh5msn3n8l2dnz.png" alt=" " width="800" height="574"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Password, Session, Cookie, Token, JWT, SSO, OAuth - Authentication Explained - Part 1</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Thu, 18 Sep 2025 10:14:18 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/password-session-cookie-token-jwt-sso-oauth-authentication-explained-part-1-4pm3</link>
      <guid>https://dev.to/pandeyaditya0002/password-session-cookie-token-jwt-sso-oauth-authentication-explained-part-1-4pm3</guid>
      <description>&lt;p&gt;When we use various applications and websites, three essential security steps are continuously at play:&lt;/p&gt;

&lt;p&gt;Identity &lt;/p&gt;

&lt;p&gt;Authentication&lt;/p&gt;

&lt;p&gt;Authorization&lt;/p&gt;

&lt;p&gt;The diagram below shows where these methods apply in a typical website architecture and their meanings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4p7gajbbmapy0w29kdq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4p7gajbbmapy0w29kdq.png" alt=" " width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this 2-part series, we dive into different authentication methods, including passwords, sessions, cookies, tokens, JWTs (JSON Web Tokens), SSO (Single Sign-On), and OAuth2. We discuss the problems each method solves and how to choose the right authentication method for our needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Password Authentication&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Password authentication is a fundamental and widely used mechanism for verifying a user's identity on websites and applications. In this method, users enter their unique username and password combination to gain access to protected resources. The entered credentials are checked against stored user information in the system, and if they match, the user is granted access.&lt;/p&gt;

&lt;p&gt;While password authentication is a foundational method for user verification, it has some limitations. Users may forget their passwords, and managing unique usernames and passwords for multiple websites can be challenging. Furthermore, password-based systems can be vulnerable to attacks, such as brute-force or dictionary attacks, if proper security measures aren't in place.&lt;/p&gt;

&lt;p&gt;To address these issues, modern systems often implement additional security measures, such as multi-factor authentication, or use other authentication mechanisms (e.g., session-cookie or token-based authentication) to complement or replace password-based authentication for subsequent access to protected resources.&lt;/p&gt;

&lt;p&gt;In this section, we will cover password-based authentication first to understand its history and how it functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;HTTP Basic Access Authentication&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;HTTP basic access authentication requires a web browser to provide a username and a password when requesting a protected resource. The credentials are encoded using the Base64 algorithm and included in the HTTP header field Authorization: Basic.&lt;/p&gt;

&lt;p&gt;Here's how it typically works:&lt;/p&gt;

&lt;p&gt;The client sends a request to access a protected resource on the server.&lt;/p&gt;

&lt;p&gt;If the client has not yet provided any authentication credentials, the server responds with a 401 Unauthorized status code and includes the WWW-Authenticate: Basic header to indicate that it requires basic authentication.&lt;/p&gt;

&lt;p&gt;The client then prompts the user to enter their username and password, which are combined into a single string in the format username:password.&lt;/p&gt;

&lt;p&gt;The combined string is Base64 encoded and included in the "Authorization: Basic" header in the subsequent request to the server, e.g., Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=.&lt;/p&gt;

&lt;p&gt;Upon receiving the request, the server decodes the Base64-encoded credentials and separates the username and password. The server then checks the provided credentials against its user database or authentication service.&lt;/p&gt;

&lt;p&gt;If the credentials match, the server grants access to the requested resource. If not, the server responds with a 401 Unauthorized status code.&lt;/p&gt;

&lt;p&gt;HTTP Basic Access Authentication has limitations. The username and password, encoded using Base64, can be easily decoded. Most websites use TLS (Transport Layer Security) to encrypt data between the browser and server, improving security. However, users' credentials may still be exposed to interception or man-in-the-middle attacks.&lt;/p&gt;

&lt;p&gt;With HTTP Basic Access Authentication, the browser sends the Authorization header with the necessary credentials for each request to protected resources within the same domain. This provides a smoother user experience, without repeatedly entering the username and password. But, as each website maintains its own usernames and passwords, users may find it difficult to remember their credentials.&lt;/p&gt;

&lt;p&gt;This authentication mechanism is obsolete for modern websites.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpem6dtkgsmmo0hp2z94n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpem6dtkgsmmo0hp2z94n.png" alt=" " width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Session-Cookie Authentication
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Session-cookie authentication addresses HTTP basic access authentication's inability to track user login status. A session ID is generated to track the user's status during their visit. This session ID is recorded both server-side and in the client’s cookie, serving as an authentication mechanism. It is called a session-cookie because it is a cookie with the session ID stored inside. Users must still provide their username and password initially, after which the server creates a session for the user's visit. Subsequent requests include the cookie, allowing the server to compare client-side and server-side session IDs.&lt;/p&gt;

&lt;p&gt;Let’s see how it works:&lt;/p&gt;

&lt;p&gt;The client sends a request to access a protected resource on the server. If the client has not yet authenticated, the server responds with a login prompt. The client submits their username and password to the server.&lt;/p&gt;

&lt;p&gt;The server verifies the provided credentials against its user database or authentication service. If the credentials match, the server generates a unique session ID and creates a corresponding session in the server-side storage (e.g., server memory, database, or session server).&lt;/p&gt;

&lt;p&gt;The server sends the session ID to the client as a cookie, typically with a Set-Cookie header.&lt;/p&gt;

&lt;p&gt;The client stores the session cookie.&lt;/p&gt;

&lt;p&gt;For subsequent requests, it sends the cookie along with the request headers.&lt;/p&gt;

&lt;p&gt;The server checks the session ID in the cookie against the stored session data to authenticate the user.&lt;/p&gt;

&lt;p&gt;If validated, the server grants access to the requested resource. When the user logs out or after a predetermined expiration time, the server invalidates the session, and the client deletes the session cookie.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy119ksf3143mooqxbvp8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy119ksf3143mooqxbvp8.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🌐 Why Are RESTful APIs So Popular?</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Fri, 20 Jun 2025 08:15:08 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/why-are-restful-apis-so-popular-45go</link>
      <guid>https://dev.to/pandeyaditya0002/why-are-restful-apis-so-popular-45go</guid>
      <description>&lt;p&gt;REST is the most common communication standard between computers over the internet. What is it? Why is it so popular?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8vdregakd64ub8hus7q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8vdregakd64ub8hus7q.jpg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The common API standard used by most mobile and web applications to talk to the servers is called REST. It stands for REpresentational State Transfer.&lt;/p&gt;

&lt;p&gt;REST is not a specification. It is a loose set of rules that has been the de facto standard for building web API since the early 2000s.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg0a3lw2vknhyq3b94jp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg0a3lw2vknhyq3b94jp.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An API that follows the REST standard is called a RESTful API. Some real-life examples are Twilio, Stripe, and Google Maps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faaoap16uskld7pt3rjrn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faaoap16uskld7pt3rjrn.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s look at the basics of REST. A RESTful API organizes resources into a set of unique URIs or Uniform Resource Identifiers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzhxabgcc12n7qyhln19c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzhxabgcc12n7qyhln19c.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The resources should be grouped by noun and not verb. An API to get all products should be&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslrolfpdvy6pzztetzi2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslrolfpdvy6pzztetzi2.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A client interacts with a resource by making a request to the endpoint for the resource over HTTP. The request has a very specific format. &lt;/p&gt;

&lt;p&gt;POST /products HTTP/1.1&lt;/p&gt;

&lt;p&gt;The line contains the URI for the resource we’d like to access. The URI is preceded by an HTTP verb which tells the server what we want to do with the resource.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayyuaenfl10mh6nsk8zx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayyuaenfl10mh6nsk8zx.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might have heard of the acronym CRUD. This is what it stands for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4wa8lbp1096ae8uid1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4wa8lbp1096ae8uid1v.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the body of these requests there could be an optional HTTP request body that contains a custom payload of data, usually encoded in JSON.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7cklcytw46rwozn8ue8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7cklcytw46rwozn8ue8.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The server receives the request, processes it, and formats the result into a response.&lt;/p&gt;

&lt;p&gt;The first line of the response contains the HTTP status code to tell the client what happened to the request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2gvh22jtzetcviuzmj2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2gvh22jtzetcviuzmj2t.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A well-implemented RESTful API returns proper HTTP status codes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5po3zkog0k8jfcvzw7ud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5po3zkog0k8jfcvzw7ud.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A well-behaved client could choose to retry a failed request with a 500-level status code.&lt;/p&gt;

&lt;p&gt;We said “could choose to retry” because some actions are not idempotent and those require extra care when retrying. When an API is idempotent, making multiple identical requests has the same effect as making a single request. This is usually not the case for a POST request to create a new resource.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6626ydxoyvakakc7xdp3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6626ydxoyvakakc7xdp3.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The response body is optional and could contain the data payload and is usually formatted in json.&lt;/p&gt;

&lt;p&gt;There is a critical attribute of REST that is worth discussing more.&lt;/p&gt;

&lt;p&gt;A REST implementation should be stateless. It means that the two parties don’t need to store any information about each other and every request and response is independent from all others.&lt;/p&gt;

&lt;p&gt;This leads to web applications that are easy to scale and well-behaved.&lt;/p&gt;

&lt;p&gt;There are two finer points to discuss to round out a well-behaved RESTful API.&lt;/p&gt;

&lt;p&gt;If an API endpoint returns a huge amount of data, use pagination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj075jj5v0yc0mf1ghwxp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj075jj5v0yc0mf1ghwxp.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A common pagination scheme uses limit and offset. Here is an example:&lt;/p&gt;

&lt;p&gt;If they are not specified, the server should assume sensible default values.&lt;/p&gt;

&lt;p&gt;Lastly, versioning of an API is very important.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p37pz60pa6yvbpkdh4s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p37pz60pa6yvbpkdh4s.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Versioning allows an implementation to provide backward compatibility so that if we introduce breaking changes from one version to another, consumers get enough time to move to the next version.&lt;/p&gt;

&lt;p&gt;There are many ways to version an API. The most straightforward is to prefix the version before the resource on the URI. For instance:&lt;/p&gt;

&lt;p&gt;There are other popular API options like GraphQL and gRPC. We will discuss those and compare them separately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fluf1tdbf8xsb1k4eou0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fluf1tdbf8xsb1k4eou0p.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🐦 **How Would You Design Twitter?** (Plus: Threads vs Processes, Choosing Databases, and Unique ID Generation)</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Mon, 19 May 2025 10:17:10 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/how-would-you-design-twitter-plus-threads-vs-processes-choosing-databases-and-unique-id-39np</link>
      <guid>https://dev.to/pandeyaditya0002/how-would-you-design-twitter-plus-threads-vs-processes-choosing-databases-and-unique-id-39np</guid>
      <description>&lt;p&gt;In this deep-dive post, we explore system design insights, foundational CS concepts, and architecture patterns from real-world use cases. Let’s unpack 👇&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjs9yx4hpoqhfg0qc3fn9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjs9yx4hpoqhfg0qc3fn9.jpg" alt="Image description" width="800" height="844"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Interview Essential: Process vs Thread
&lt;/h3&gt;

&lt;p&gt;Understanding the difference between &lt;strong&gt;processes&lt;/strong&gt; and &lt;strong&gt;threads&lt;/strong&gt; is a must-have for any backend or systems engineer.&lt;/p&gt;

&lt;p&gt;🔹 A &lt;strong&gt;Program&lt;/strong&gt; is just a passive set of instructions on disk.&lt;/p&gt;

&lt;p&gt;🔹 A &lt;strong&gt;Process&lt;/strong&gt; is a program in action — it’s loaded into memory, with its own resources (stack, registers, etc.)&lt;/p&gt;

&lt;p&gt;🔹 A &lt;strong&gt;Thread&lt;/strong&gt; is the smallest unit of execution, running within a process — multiple threads can share memory and resources.&lt;/p&gt;

&lt;p&gt;Key differences:&lt;/p&gt;

&lt;p&gt;🔹 Processes are isolated; threads run within the same memory space.&lt;br&gt;
🔹 Context switching is heavier for processes than threads.&lt;br&gt;
🔹 Threads allow faster communication but require careful synchronization.&lt;br&gt;
🔹 Creating processes is resource-intensive; threads are lightweight.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Over to you&lt;/strong&gt;:&lt;br&gt;
1️⃣ How do coroutines differ from threads in languages like Go or Python?&lt;br&gt;
2️⃣ How would you list all running processes in Linux?&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8m49x448dodt2c40dzu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8m49x448dodt2c40dzu.jpg" alt="Image description" width="800" height="1085"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🛠️ System Design Interview: Design Twitter
&lt;/h3&gt;

&lt;p&gt;Based on a 2013 Twitter tech talk, here’s how a tweet travels through Twitter’s architecture:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Life of a Tweet&lt;/strong&gt;&lt;br&gt;
1️⃣ Tweet comes in via the Write API&lt;br&gt;
2️⃣ Routed to the &lt;strong&gt;Fanout&lt;/strong&gt; service&lt;br&gt;
3️⃣ Stored and processed in &lt;strong&gt;Redis cache&lt;/strong&gt;&lt;br&gt;
4️⃣ Timeline service locates the relevant Redis shard&lt;br&gt;
5️⃣ User pulls the timeline via the Timeline service&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Search &amp;amp; Discovery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Ingester&lt;/strong&gt;: Tokenizes tweets for indexing&lt;br&gt;
🔹 &lt;strong&gt;Earlybird&lt;/strong&gt;: Stores the searchable index&lt;br&gt;
🔹 &lt;strong&gt;Blender&lt;/strong&gt;: Builds search and discovery timelines&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push Compute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 HTTP Push&lt;br&gt;
🔹 Mobile Push&lt;/p&gt;

&lt;p&gt;🔍 &lt;em&gt;Note: Based on Twitter’s 2013 architecture — still valuable for understanding scalable social media backends.&lt;/em&gt; &lt;a href="https://bit.ly/3vNfjRp" rel="noopener noreferrer"&gt;Original Talk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💬 What are the &lt;strong&gt;architecture differences&lt;/strong&gt; between LinkedIn and Twitter? How do their use cases influence design?&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wbhs9wtio7dopkp92ir.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wbhs9wtio7dopkp92ir.jpg" alt="Image description" width="800" height="1120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 Choosing the Right Database – A Visual Guide
&lt;/h3&gt;

&lt;p&gt;Databases are not one-size-fits-all. Always choose the right DB for the workload:&lt;/p&gt;

&lt;p&gt;Common types:&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Relational&lt;/strong&gt; (SQL) – Great for structured data and ACID compliance&lt;br&gt;
🔹 &lt;strong&gt;Key-Value / In-Memory&lt;/strong&gt; – Speed first (e.g., Redis)&lt;br&gt;
🔹 &lt;strong&gt;Time Series&lt;/strong&gt; – Optimized for time-stamped data&lt;br&gt;
🔹 &lt;strong&gt;Document / JSON&lt;/strong&gt; – Flexible schema (e.g., MongoDB)&lt;br&gt;
🔹 &lt;strong&gt;Graph&lt;/strong&gt; – Best for relationships (e.g., Neo4j)&lt;br&gt;
🔹 &lt;strong&gt;Blob / Text Search / Geospatial / Ledger&lt;/strong&gt; – Specialized needs&lt;/p&gt;

&lt;p&gt;💬 Which databases have you used? How did they perform for your workload?&lt;/p&gt;

&lt;p&gt;Thanks to &lt;strong&gt;Satish Chandra Gupta&lt;/strong&gt; for the visual inspiration!&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdrao8qbtxda9lkwdg74.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdrao8qbtxda9lkwdg74.jpg" alt="Image description" width="800" height="892"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🔐 Unique ID Generator – A Must for Scalable Systems
&lt;/h3&gt;

&lt;p&gt;Large-scale systems like Facebook, Twitter, and LinkedIn need &lt;strong&gt;unique IDs&lt;/strong&gt; that meet tough requirements:&lt;/p&gt;

&lt;p&gt;🔹 Globally unique&lt;br&gt;
🔹 Roughly time-sorted&lt;br&gt;
🔹 Numeric-only&lt;br&gt;
🔹 64-bit&lt;br&gt;
🔹 Low-latency &amp;amp; scalable&lt;/p&gt;

&lt;p&gt;Think of this as the backbone of tweet IDs, post IDs, user IDs. The implementation details vary, but the goal remains the same — fast, distributed, and conflict-free identity.&lt;/p&gt;

&lt;p&gt;💬 What kind of ID generation strategies have you used (UUIDs, Snowflake, etc.)?&lt;/p&gt;




&lt;p&gt;Let’s keep learning from real-world architectures and build scalable, resilient systems together!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>📄 How Would You Design Google Docs? (Plus: Deployment Strategies, Trends &amp; a Book Giveaway!)</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Mon, 19 May 2025 09:51:19 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/how-would-you-design-google-docs-plus-deployment-strategies-trends-a-book-giveaway-bde</link>
      <guid>https://dev.to/pandeyaditya0002/how-would-you-design-google-docs-plus-deployment-strategies-trends-a-book-giveaway-bde</guid>
      <description>&lt;p&gt;In this edition, we dive into real-world system design, safe deployment strategies, a signed book giveaway, and the latest trends in software architecture 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftafvhphe6wkiziknquuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftafvhphe6wkiziknquuq.png" alt="Image description" width="800" height="910"&gt;&lt;/a&gt;&lt;br&gt;
🚀 How to Deploy Services Without Downtime&lt;br&gt;
Deploying services can be risky. Choosing the right deployment strategy matters:&lt;/p&gt;

&lt;p&gt;🔹 Multi-Service Deployment&lt;br&gt;
Simple to implement, but high risk — all services are upgraded at once, and rollbacks are complex.&lt;/p&gt;

&lt;p&gt;🔹 Blue-Green Deployment&lt;br&gt;
Two identical environments: “blue” for staging, “green” for production. After testing, traffic is routed to the new version. Easier rollback, but expensive.&lt;/p&gt;

&lt;p&gt;🔹 Canary Deployment&lt;br&gt;
Roll out updates gradually to small user groups. Safer and cheaper than blue-green but harder to monitor.&lt;/p&gt;

&lt;p&gt;🔹 A/B Testing&lt;br&gt;
Multiple versions run simultaneously for user segments. Great for experimentation — but needs careful handling to avoid accidental exposure.&lt;/p&gt;

&lt;p&gt;💬 Over to you – Which strategy do you use in production? Any horror stories?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzornwcr2sl963pxdyw26.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzornwcr2sl963pxdyw26.jpg" alt="Image description" width="800" height="1073"&gt;&lt;/a&gt;&lt;br&gt;
🧠 Google Docs: Real-Time Collaborative Editing Architecture&lt;br&gt;
Designing a real-time editor like Google Docs isn’t trivial:&lt;/p&gt;

&lt;p&gt;1️⃣ Clients send edits via WebSocket.&lt;br&gt;
2️⃣ WebSocket Server manages real-time communication.&lt;br&gt;
3️⃣ Operations go to a Message Queue for durability.&lt;br&gt;
4️⃣ A File Operation Server applies collaboration algorithms.&lt;br&gt;
5️⃣ Data stored: metadata, content, and edit history.&lt;/p&gt;

&lt;p&gt;Conflict resolution algorithms include:&lt;br&gt;
🔹 Operational Transformation (used by Google Docs)&lt;br&gt;
🔹 Differential Synchronization&lt;br&gt;
🔹 CRDT (actively researched)&lt;/p&gt;

&lt;p&gt;💬 Have you ever faced issues using Google Docs? What do you think caused them?&lt;/p&gt;

&lt;p&gt;📊 Software Architecture Trends – What’s Changing?&lt;br&gt;
Insights from InfoQ’s Architecture &amp;amp; Design Trends Report:&lt;/p&gt;

&lt;p&gt;🔹 "Data + Architecture" – Architects now consider data pipelines, quality &amp;amp; traceability alongside systems.&lt;/p&gt;

&lt;p&gt;🔹 Architecture is becoming a shared responsibility — not just for those with “architect” in their title.&lt;/p&gt;

&lt;p&gt;🔹 Asynchronous collaboration (like ADRs) is a positive shift from remote work culture.&lt;/p&gt;

&lt;p&gt;🔹 Better distributed teams = Better distributed systems.&lt;/p&gt;

&lt;p&gt;💬 What trends are you seeing in 2022 and beyond?&lt;/p&gt;

&lt;p&gt;Let’s connect and share insights on system design, cloud architecture, and engineering leadership!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>📦 At Most Once, At Least Once, Exactly Once: What Do These Really Mean?</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Mon, 05 May 2025 10:57:15 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/at-most-once-at-least-once-exactly-once-what-do-these-really-mean-1a39</link>
      <guid>https://dev.to/pandeyaditya0002/at-most-once-at-least-once-exactly-once-what-do-these-really-mean-1a39</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxlumg8rt3nqu40qeiy2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxlumg8rt3nqu40qeiy2.png" alt="Image description" width="800" height="486"&gt;&lt;/a&gt;&lt;br&gt;
In today’s distributed system architectures, we break large systems into small, independent services. These services need a reliable way to talk to each other — and &lt;strong&gt;message queues&lt;/strong&gt; or &lt;strong&gt;event streaming platforms&lt;/strong&gt; play a critical role in enabling this communication.&lt;/p&gt;

&lt;p&gt;But here's the key question:&lt;br&gt;
👉 &lt;strong&gt;How reliably is a message delivered from sender to receiver?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s break down the &lt;strong&gt;three core delivery semantics&lt;/strong&gt; you’ll encounter in real-world systems 👇&lt;/p&gt;




&lt;h3&gt;
  
  
  1️⃣ &lt;strong&gt;At-Most Once&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;🔹 Messages are delivered &lt;strong&gt;zero or one time&lt;/strong&gt;&lt;br&gt;
🔹 &lt;strong&gt;No retries&lt;/strong&gt;, so if something fails — the message is &lt;strong&gt;lost&lt;/strong&gt;&lt;br&gt;
🔹 Simple, fast, but &lt;strong&gt;no guarantee&lt;/strong&gt; of delivery&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Use case&lt;/strong&gt;: Monitoring metrics, logs, or telemetry where occasional loss is acceptable.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ &lt;strong&gt;At-Least Once&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;🔹 Messages are &lt;strong&gt;never lost&lt;/strong&gt;&lt;br&gt;
🔹 But they &lt;strong&gt;may be delivered multiple times&lt;/strong&gt;&lt;br&gt;
🔹 Systems must be able to &lt;strong&gt;deduplicate&lt;/strong&gt; on the consumer side&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Use case&lt;/strong&gt;: Order processing, notifications, analytics — where duplicates can be filtered or ignored.&lt;/p&gt;




&lt;h3&gt;
  
  
  3️⃣ &lt;strong&gt;Exactly Once&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;🔹 Each message is delivered &lt;strong&gt;only once&lt;/strong&gt;, &lt;strong&gt;no duplicates&lt;/strong&gt;, &lt;strong&gt;no loss&lt;/strong&gt;&lt;br&gt;
🔹 Sounds perfect — but it’s &lt;strong&gt;very hard to implement&lt;/strong&gt;&lt;br&gt;
🔹 Adds &lt;strong&gt;complexity, latency&lt;/strong&gt;, and often performance trade-offs&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Use case&lt;/strong&gt;: Financial transactions, trading systems, accounting — where &lt;strong&gt;idempotency&lt;/strong&gt; is not supported and every operation must be precise.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 So... Why Does It Matter?
&lt;/h3&gt;

&lt;p&gt;Choosing the right delivery guarantee isn’t just about tech — it’s about your &lt;strong&gt;use case&lt;/strong&gt; and &lt;strong&gt;business priorities&lt;/strong&gt;.&lt;br&gt;
Sometimes speed matters more than precision. Other times, &lt;strong&gt;a single duplicate message could cost thousands&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  💭 Bonus Insight:
&lt;/h3&gt;

&lt;p&gt;📌 &lt;strong&gt;Message Queue vs Event Streaming Platform?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Message Queues&lt;/strong&gt; (like RabbitMQ, SQS): Focus on reliability and order for point-to-point communication.&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Event Streaming Platforms&lt;/strong&gt; (like Kafka, Pulsar): Optimized for broadcasting, storing, and replaying high-throughput event logs. Ideal for &lt;strong&gt;event-driven systems&lt;/strong&gt; and &lt;strong&gt;real-time analytics&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;What’s your go-to strategy for delivery semantics in distributed systems?&lt;br&gt;
Let’s discuss in the comments 💬&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🧩 Vertical vs Horizontal Partitioning: How Large Systems Manage Data at Scale</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Fri, 02 May 2025 13:11:15 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/vertical-vs-horizontal-partitioning-how-large-systems-manage-data-at-scale-1gen</link>
      <guid>https://dev.to/pandeyaditya0002/vertical-vs-horizontal-partitioning-how-large-systems-manage-data-at-scale-1gen</guid>
      <description>&lt;p&gt;As systems grow, managing data efficiently becomes essential. One of the key strategies is &lt;strong&gt;partitioning&lt;/strong&gt; — splitting large datasets to improve performance, scalability, and manageability.&lt;/p&gt;

&lt;p&gt;Let’s break down the two most common types of partitioning and why they matter 👇&lt;/p&gt;




&lt;h3&gt;
  
  
  🔄 Types of Data Partitioning
&lt;/h3&gt;

&lt;p&gt;🔹 &lt;strong&gt;Vertical Partitioning&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Moves specific &lt;strong&gt;columns&lt;/strong&gt; into separate tables&lt;br&gt;&lt;br&gt;
→ All tables contain the &lt;strong&gt;same number of rows&lt;/strong&gt;, but fewer columns&lt;br&gt;&lt;br&gt;
→ Ideal when different parts of an app only access certain attributes&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Horizontal Partitioning (Sharding)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Splits tables into smaller sets of &lt;strong&gt;rows&lt;/strong&gt; across multiple databases&lt;br&gt;&lt;br&gt;
→ All shards have the &lt;strong&gt;same columns&lt;/strong&gt;, but fewer rows&lt;br&gt;&lt;br&gt;
→ Common in large-scale systems like social networks, ecommerce platforms, etc.&lt;/p&gt;




&lt;h3&gt;
  
  
  📍 Horizontal Partitioning in Detail
&lt;/h3&gt;

&lt;p&gt;Once your database is horizontally partitioned, you need a way to decide &lt;strong&gt;where each piece of data should go&lt;/strong&gt;. This is where &lt;strong&gt;routing algorithms&lt;/strong&gt; come in:&lt;/p&gt;

&lt;p&gt;🔢 &lt;strong&gt;Routing Strategies:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1️⃣ &lt;strong&gt;Range-based Sharding&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Rows are split based on ordered values (e.g., ID, timestamp)&lt;br&gt;&lt;br&gt;
→ Example: User IDs 1–2 in Shard 1, User IDs 3–4 in Shard 2&lt;/p&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Hash-based Sharding&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Applies a hash function on key columns (e.g., &lt;code&gt;User ID % 2&lt;/code&gt;)&lt;br&gt;&lt;br&gt;
→ Example: IDs 1 &amp;amp; 3 in Shard 1, IDs 2 &amp;amp; 4 in Shard 2&lt;br&gt;&lt;br&gt;
→ More balanced, but can be harder to query sequentially&lt;/p&gt;




&lt;h3&gt;
  
  
  ✅ Benefits of Partitioning
&lt;/h3&gt;

&lt;p&gt;🔹 &lt;strong&gt;Enables horizontal scaling&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Easily add more servers to spread the load&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Improves performance&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Smaller datasets = faster queries = better user experience&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚠️ Trade-offs to Watch Out For
&lt;/h3&gt;

&lt;p&gt;🔹 &lt;strong&gt;Complex queries (e.g., ORDER BY)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ May need to merge and sort data from multiple shards at the application level&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Hotspots and uneven distribution&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ One shard might handle much more traffic than others (aka “hotspot” problem)&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 Why It Matters
&lt;/h3&gt;

&lt;p&gt;If you're building or working with:&lt;/p&gt;

&lt;p&gt;🚀 Scalable architectures&lt;br&gt;&lt;br&gt;
📊 Distributed databases&lt;br&gt;&lt;br&gt;
📦 Microservices that handle large datasets  &lt;/p&gt;

&lt;p&gt;…you’ll likely encounter partitioning decisions. Knowing when and how to use &lt;strong&gt;vertical&lt;/strong&gt; vs &lt;strong&gt;horizontal partitioning&lt;/strong&gt; can make or break your system's performance.&lt;/p&gt;




&lt;p&gt;Have you faced challenges with sharding or uneven data distribution? Share your experience or tips in the comments 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title>💸 How Does Currency Conversion Really Work When You Pay Internationally?</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Wed, 30 Apr 2025 07:00:14 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/how-does-currency-conversion-really-work-when-you-pay-internationally-2ldm</link>
      <guid>https://dev.to/pandeyaditya0002/how-does-currency-conversion-really-work-when-you-pay-internationally-2ldm</guid>
      <description>&lt;p&gt;Ever wondered what happens behind the scenes when you pay $100 in &lt;strong&gt;USD&lt;/strong&gt; and the seller receives &lt;strong&gt;EUR&lt;/strong&gt; on the other side of the world?&lt;br&gt;&lt;br&gt;
Let’s demystify &lt;strong&gt;foreign exchange (forex)&lt;/strong&gt; from a &lt;em&gt;system architecture&lt;/em&gt; perspective. 🧠🌍&lt;/p&gt;




&lt;h3&gt;
  
  
  📦 Real-World Example: USD → EUR
&lt;/h3&gt;

&lt;p&gt;Let’s say &lt;strong&gt;Bob&lt;/strong&gt; (a buyer in the U.S.) pays &lt;strong&gt;$100 USD&lt;/strong&gt;, and &lt;strong&gt;Alice&lt;/strong&gt; (a seller in Europe) wants to receive &lt;strong&gt;EUR&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Here’s what typically happens under the hood, using &lt;strong&gt;PayPal&lt;/strong&gt; as a third-party payment provider:&lt;/p&gt;

&lt;p&gt;1️⃣ &lt;strong&gt;Bob sends $100 USD&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Money moves from Bob’s bank (&lt;strong&gt;Bank B&lt;/strong&gt;) to &lt;strong&gt;PayPal’s account&lt;/strong&gt; in &lt;strong&gt;Bank P1&lt;/strong&gt; (USD account).&lt;/p&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;PayPal initiates currency conversion&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ It works with its forex partner (&lt;strong&gt;Bank E&lt;/strong&gt;) and sends the $100 to its USD account in &lt;strong&gt;Bank E&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;3️⃣ &lt;strong&gt;Currency exchange takes place&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Bank E's &lt;strong&gt;funding pool&lt;/strong&gt; exchanges $100 USD for &lt;strong&gt;€88 EUR&lt;/strong&gt; (rate-dependent).&lt;/p&gt;

&lt;p&gt;4️⃣ &lt;strong&gt;PayPal’s EUR account&lt;/strong&gt; in &lt;strong&gt;Bank E&lt;/strong&gt; is credited with €88 EUR.&lt;/p&gt;

&lt;p&gt;5️⃣ PayPal moves €88 to its &lt;strong&gt;EUR account&lt;/strong&gt; in &lt;strong&gt;Bank P2&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;6️⃣ Finally, &lt;strong&gt;Alice’s account&lt;/strong&gt; in &lt;strong&gt;Bank A&lt;/strong&gt; receives the €88 EUR.&lt;/p&gt;

&lt;p&gt;📌 Result: Seamless user experience — but a &lt;em&gt;multi-layered technical operation&lt;/em&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🌐 What Powers This Behind the Scenes?
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Forex Market&lt;/strong&gt; is a massive, hierarchical engine of liquidity:&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Retail Layer&lt;/strong&gt; – Where platforms like PayPal operate&lt;br&gt;&lt;br&gt;
→ They often &lt;strong&gt;pre-purchase currencies&lt;/strong&gt; to avoid delays and reduce volatility.&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Wholesale Market&lt;/strong&gt; – Managed by large banks and forex providers&lt;br&gt;&lt;br&gt;
→ Handles bulk currency swaps and orders from many retail sources.&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Top-Level Participants&lt;/strong&gt; – Major multinational banks&lt;br&gt;&lt;br&gt;
→ These are the ultimate liquidity providers, moving billions daily.&lt;/p&gt;

&lt;p&gt;📈 When liquidity in Bank E's funding pool runs low, it goes upstream:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📤 Sell USD to the &lt;strong&gt;wholesale market&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;💶 Buy EUR in return&lt;/li&gt;
&lt;li&gt;🔁 Those EURs are cycled back to refill the retail layer&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧠 Why This Matters
&lt;/h3&gt;

&lt;p&gt;Understanding how FX works helps you see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How &lt;strong&gt;payment gateways&lt;/strong&gt;, &lt;strong&gt;banks&lt;/strong&gt;, and &lt;strong&gt;FX providers&lt;/strong&gt; cooperate
&lt;/li&gt;
&lt;li&gt;Where &lt;strong&gt;delays&lt;/strong&gt;, &lt;strong&gt;fees&lt;/strong&gt;, and &lt;strong&gt;rate differences&lt;/strong&gt; arise
&lt;/li&gt;
&lt;li&gt;Why platforms hedge currency risk using pre-purchased reserves
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;💬 Have you ever experienced a surprise fee or rate while making an international payment?  &lt;/p&gt;

&lt;p&gt;Let’s chat about what might have been happening in the background!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>💾 Storage Systems Demystified: Block vs File vs Object</title>
      <dc:creator>Aditya Pandey</dc:creator>
      <pubDate>Wed, 30 Apr 2025 06:35:55 +0000</pubDate>
      <link>https://dev.to/pandeyaditya0002/storage-systems-demystified-block-vs-file-vs-object-3j28</link>
      <guid>https://dev.to/pandeyaditya0002/storage-systems-demystified-block-vs-file-vs-object-3j28</guid>
      <description>&lt;p&gt;Every modern application relies on some form of &lt;strong&gt;data storage&lt;/strong&gt; — but not all storage systems are created equal.&lt;br&gt;&lt;br&gt;
In this post, let’s break down the &lt;strong&gt;three foundational types of storage systems&lt;/strong&gt; you’ll come across in backend architecture, cloud platforms, and infrastructure design.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 1️⃣ Block Storage: The Performance Powerhouse
&lt;/h3&gt;

&lt;p&gt;🗓️ &lt;strong&gt;Introduced in the 1960s&lt;/strong&gt;, block storage is still the foundation of most modern storage tech.  &lt;/p&gt;

&lt;p&gt;📦 It presents raw data blocks to the operating system. These blocks can then be formatted into a file system or managed directly by high-performance applications (like databases or virtual machines).&lt;/p&gt;

&lt;p&gt;🔌 &lt;strong&gt;Access types&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Directly attached (e.g. HDDs, SSDs)
&lt;/li&gt;
&lt;li&gt;Network-attached via protocols like &lt;strong&gt;iSCSI&lt;/strong&gt; or &lt;strong&gt;Fibre Channel&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔐 &lt;strong&gt;Key traits&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extremely flexible and fast
&lt;/li&gt;
&lt;li&gt;Managed by one server at a time (not shared)
&lt;/li&gt;
&lt;li&gt;Ideal for apps requiring fine-tuned performance control
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔹 2️⃣ File Storage: Familiar &amp;amp; User-Friendly
&lt;/h3&gt;

&lt;p&gt;📁 Built on top of block storage, file storage organizes data as &lt;strong&gt;files within hierarchical directories&lt;/strong&gt; — just like your computer's file system.&lt;/p&gt;

&lt;p&gt;📡 It’s commonly shared across systems using network protocols like &lt;strong&gt;NFS&lt;/strong&gt; (Linux) or &lt;strong&gt;SMB/CIFS&lt;/strong&gt; (Windows).&lt;/p&gt;

&lt;p&gt;🧩 &lt;strong&gt;Use cases&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Office file sharing
&lt;/li&gt;
&lt;li&gt;User directories
&lt;/li&gt;
&lt;li&gt;General-purpose collaboration storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 &lt;strong&gt;Why it matters&lt;/strong&gt;: File storage abstracts away block-level complexity, making it easy for multiple users/systems to interact with data.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 3️⃣ Object Storage: Scalable &amp;amp; Durable at Scale
&lt;/h3&gt;

&lt;p&gt;☁️ Popularized by the cloud, object storage was built for &lt;strong&gt;scale, resilience, and cost-efficiency&lt;/strong&gt;, not performance.&lt;/p&gt;

&lt;p&gt;📦 It stores data as &lt;strong&gt;objects&lt;/strong&gt; in a flat namespace (no folders or hierarchies), each with its own metadata and unique ID.&lt;/p&gt;

&lt;p&gt;🌐 Access is API-driven, usually via REST — ideal for cloud-native applications.&lt;/p&gt;

&lt;p&gt;🛠️ &lt;strong&gt;Use cases&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backup &amp;amp; archival
&lt;/li&gt;
&lt;li&gt;Media storage
&lt;/li&gt;
&lt;li&gt;Cold data retention
&lt;/li&gt;
&lt;li&gt;Static content hosting (e.g. images, videos)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚖️ &lt;strong&gt;Tradeoffs&lt;/strong&gt;: Lower performance, but unmatched scalability and reliability (think AWS S3, Azure Blob, GCP Cloud Storage).&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 TL;DR: When to Use What?
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Storage Type&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;th&gt;Example Tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🧱 Block&lt;/td&gt;
&lt;td&gt;High-performance apps (DBs, VMs)&lt;/td&gt;
&lt;td&gt;SSD, iSCSI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📁 File&lt;/td&gt;
&lt;td&gt;Shared files &amp;amp; collaboration&lt;/td&gt;
&lt;td&gt;NFS, SMB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🌐 Object&lt;/td&gt;
&lt;td&gt;Scalable cold data storage&lt;/td&gt;
&lt;td&gt;S3, Azure Blob&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;💬 &lt;strong&gt;Which storage type is your team using the most right now?&lt;/strong&gt; Have you encountered tradeoffs or surprises when scaling?&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
