<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Drona Raj Gyawali]]></title><description><![CDATA[Sharing lessons learned the hard way and the technical expertise gained along the way]]></description><link>https://blogs.dorna.com.np</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Drona Raj Gyawali</title><link>https://blogs.dorna.com.np</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 04:53:43 GMT</lastBuildDate><atom:link href="https://blogs.dorna.com.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why I Built My Own Caching Proxy Server in Go]]></title><description><![CDATA[I recently built a proxy server specifically for caching purposes, and I am going to use it for a side project that I will be hosting soon. The reason behind it is simple: not all internet requests ne]]></description><link>https://blogs.dorna.com.np/building-caching-proxy-server-go</link><guid isPermaLink="true">https://blogs.dorna.com.np/building-caching-proxy-server-go</guid><category><![CDATA[cache]]></category><category><![CDATA[Proxy Server]]></category><category><![CDATA[web cache reverse-proxy server HTTP]]></category><category><![CDATA[LRU Cache]]></category><category><![CDATA[Go Language]]></category><category><![CDATA[backend]]></category><dc:creator><![CDATA[Drona Raj Gyawali]]></dc:creator><pubDate>Sat, 06 Jun 2026 15:54:35 GMT</pubDate><content:encoded><![CDATA[<p>I recently built a proxy server specifically for caching purposes, and I am going to use it for a side project that I will be hosting soon. The reason behind it is simple: not all internet requests need to be fetched directly from the database if the data is static and rarely changes.</p>
<p><a href="https://github.com/drona-gyawali/Cache-Proxy"><img src="https://cdn.hashnode.com/uploads/covers/68317ce564376efe1ee7bccd/57ca114a-3103-4ee5-bc0e-bd0b2b340f30.png" alt="Proxy Sever  Architecture " style="display:block;margin:0 auto" /></a></p>
<p>The working mechanism of this server is quite straightforward. It points to the origin backend API responsible for the data, and it caches that data in memory for super-fast retrieval with a customizable TTL (Time-To-Live).</p>
<p>Under the hood, I am using an LRU cache implemented with a hash map and a doubly linked list to keep our server RAM predictable while maintaining the best possible performance. However, as we know, this implementation is good for textbooks but not ideal for highly scalable systems. The primary reason behind building this was simply to test my boundaries and learn something new.</p>
<p>In this proxy server implementation, I have added several features like session-based authentication, manual deployment, and a forwarding server list to ensure that every request is predictable and monitored by us. I know we can make it even better, but to be frank, this project was solely built to learn Go and explore some of its built-in libraries, like <code>sync</code>, to understand concurrency.</p>
<p>If you loved my article, I am sure you will love my <a href="https://github.com/drona-gyawali/Cache-Proxy">code</a> too! Please star the repo and follow me on <a href="https://github.com/drona-gyawali">GitHub</a> :)</p>
]]></content:encoded></item><item><title><![CDATA[Designing an Order Execution Engine: Why Traditional Scaling Laws Break Down ?]]></title><description><![CDATA[Imagine it is 10:00 AM. A hot stock like Apple (AAPL) opens for trading.

10 Million People open their mobile apps and smash the BUY button.

1 Million People smash the SELL button.


How does a compu]]></description><link>https://blogs.dorna.com.np/designing-an-order-execution-engine</link><guid isPermaLink="true">https://blogs.dorna.com.np/designing-an-order-execution-engine</guid><category><![CDATA[hft]]></category><category><![CDATA[trading, ]]></category><category><![CDATA[order-execution-engine]]></category><category><![CDATA[Buy Sell Signals]]></category><category><![CDATA[Interview experience]]></category><dc:creator><![CDATA[Drona Raj Gyawali]]></dc:creator><pubDate>Fri, 15 May 2026 13:57:41 GMT</pubDate><content:encoded><![CDATA[<p>Imagine it is 10:00 AM. A hot stock like Apple (<code>AAPL</code>) opens for trading.</p>
<ul>
<li><p><strong>10 Million People</strong> open their mobile apps and smash the <strong>BUY</strong> button.</p>
</li>
<li><p><strong>1 Million People</strong> smash the <strong>SELL</strong> button.</p>
</li>
</ul>
<p>How does a computer system match these people up instantly without crashing, getting confused, or losing money?</p>
<p>If you ask a regular web developer, they might say: <em>"Just add more servers! If one server gets full, turn on Server 2, Server 3, and Server 4!"</em></p>
<p><strong>But that is a trap!</strong> If a buyer is on Server 1 and a seller is on Server 4, how do they talk to each other? For Server 1's memory to talk to Server 4's memory over the internet takes time (latency). In high-speed trading, even a tiny delay of a millisecond means failure.</p>
<p>So, how do the richest trading companies in the world actually solve this? They use a <strong>3-Step System</strong>.</p>
<h2>Step 1: The "Dumb Mailmen" (The Ingress Servers)</h2>
<p>When 10 million people click BUY, they don't actually talk to the trading machine. They talk to a front row of basic servers. Think of these servers as <strong>Dumb Mailmen</strong>.</p>
<p>They do not keep any records of who bought what. They only do the boring, basic checks:</p>
<ul>
<li><p><em>"Is this user logged in?"</em></p>
</li>
<li><p><em>"Do they have enough money in their bank account to buy this stock?"</em></p>
</li>
</ul>
<p>Because this job is simple, you can spin up 10, 20, or 100 of these servers. If a billion people click buy, you just add more mailmen. This handles the heavy traffic noise.</p>
<h2>Step 2: The Ticket Dispenser (The Sequencer)</h2>
<p>Once the mailmen check that the users have money, they take all those millions of orders and send them to a single machine called the <strong>Sequencer</strong>.</p>
<p>Think of the Sequencer like the little machine at a bank that gives you a token number (Token #1, Token #2, Token #3).</p>
<p>Even if 10 million people press the button at the exact same microsecond, the Sequencer forces them to stand in a single, straight line. It slaps a strict number on every order so the system knows exactly who arrived first.</p>
<h2>Step 3: The King Core (The Matching Engine)</h2>
<p>Now, that single straight line of orders enters <strong>Server 3</strong>.</p>
<p>This is a special, super-powerful server. Inside this server, there is <strong>one single CPU core</strong> handling the actual order book for Apple stock.</p>
<p><strong>This is the golden rule of trading systems: The actual matching book for a single stock lives on exactly ONE thread on ONE server.</strong> It is never split up.</p>
<p>Because this single CPU core doesn't have to talk to other servers, doesn't have to check bank balances, and doesn't use a slow database, it is blindingly fast. It uses a super-fast memory structure called a <strong>Doubly Linked List or similar DS</strong> directly inside its RAM.</p>
<p>It takes only <strong>200 nanoseconds</strong> to process an order. How fast is that?</p>
<ul>
<li>In just <strong>1 second</strong>, this single core can process <strong>5,000,000 orders!</strong></li>
</ul>
<p>So, even if 10 million people hit the system all at once, this single core clears the entire crowd in just <strong>2 seconds</strong> without sweating .</p>
<h2>What Happens to the Rest of the Orders?</h2>
<p>As we said, 10 million people wanted to buy, but only 1 million wanted to sell. The King Core matches 1 million buyers with 1 million sellers instantly.</p>
<p>Now, <strong>9 million buyers are left waiting.</strong> What happens to them?</p>
<h3>1. Does the RAM run out of space?</h3>
<p>No. An order is just a tiny piece of text data (User ID, Price, Quantity). It takes up almost zero space. Even if 1 billion orders are waiting in a line, they only take up about 64 Gigabytes of memory. A high-end trading server easily has 512 Gigabytes of RAM. It fits like a drop of water in a bucket.</p>
<h3>2. Does the price change?</h3>
<p>Yes! Because there are 9 million buyers waiting and 0 sellers left at that low price, the price of the stock shoots up. Sellers start demanding more money, and the single matching core starts matching trades at higher and higher prices.</p>
<h3>3. What happens at 7:00 PM when the market closes?</h3>
<p>Do the remaining orders get lost? No!</p>
<ul>
<li><p><strong>Day Orders:</strong> If a user just placed a normal order for the day, the server automatically deletes it from RAM at closing time, cancels it, and gives the user their money back.</p>
</li>
<li><p><strong>Good 'Til Canceled (GTC) Orders:</strong> If a user said <em>"keep my order active until I cancel it manually,"</em> the server takes that order out of the super-fast RAM at night and saves it safely onto a hard disk database. The next morning, before the market opens, the server reads the hard disk and loads those orders back into the fast RAM so they are ready to go again.</p>
</li>
</ul>
<p>To sum up, I hadn't prepared for this specific system design scenario, I panicked and also I had to pivot on the spot and answer purely based on my engineering intuition which I expand in this article which might be wrong approach :( .</p>
<p>Because my headspace was compromised, I ended up messing up the subsequent mathematics, statistics, and machine learning segments, including a round where I had to implement a minimal predictive analysis algorithm completely from scratch without using any external libraries.</p>
<p>However, I learned a lot from this , I will implement this execution engine and share the live code link soon :)</p>
]]></content:encoded></item><item><title><![CDATA[How I got Selected into Google Summer of Code '26 from Nepal
]]></title><description><![CDATA[Hi, I am Drona Raj Gyawali who loves his time to spend on AI and Distributed system also a 2nd year student from Butwal, Nepal. I am currently pursuing my Bachelor of Information and Communication Tec]]></description><link>https://blogs.dorna.com.np/gsoc-nepal-2026</link><guid isPermaLink="true">https://blogs.dorna.com.np/gsoc-nepal-2026</guid><category><![CDATA[gsoc]]></category><category><![CDATA[gsoc2026]]></category><category><![CDATA[gsoc-nepal]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[cybersecurity]]></category><category><![CDATA[greedybear]]></category><dc:creator><![CDATA[Drona Raj Gyawali]]></dc:creator><pubDate>Fri, 01 May 2026 10:47:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/68317ce564376efe1ee7bccd/aae1c3a6-0488-4e07-81c9-633aeb90718d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi, I am Drona Raj Gyawali who loves his time to spend on AI and Distributed system also a 2nd year student from Butwal, Nepal. I am currently pursuing my Bachelor of Information and Communication Technology Education (BICTE) at Butwal Multiple Campus, which is affiliated with Tribhuvan University (TU) under the Faculty of Education.</p>
<p>Last year, I thought I knew what Open Source was. I had 26 <a href="https://github.com/certego/BuffaLogs/pulls?q=is%3Apr+author%3Adrona-gyawali+is%3Aclosed">PRs merged</a>, I was solving bugs, and I was writing complex features. But when the results for GSoC '25 came out, it was a hard rejection. I was crushed, but more importantly, I was confused.</p>
<img src="https://cdn.hashnode.com/uploads/covers/68317ce564376efe1ee7bccd/8bcc506f-a673-4833-9a81-21b1eb755ab2.png" alt="" style="display:block;margin:0 auto" />

<p><strong>I realized I was treating code like a volume game, when it’s actually a conversation.</strong></p>
<p>This year, I returned to the GSoC arena with a completely different spirit. I joined <strong>IntelOwl</strong> (and specifically the <a href="https://github.com/GreedyBear-Project/GreedyBear"><strong>GreedyBear</strong></a> project), a powerhouse in the threat intelligence space.</p>
<p>I made a conscious choice: <strong>Stop chasing the "obvious."</strong> In an era where AI can fix a syntax error or a basic bug in seconds, those "easy wins" have lost their signal. Instead, I went looking for the <strong>friction</strong>. I hunted for the issues that couldn't be solved in a solo, the ones that required deep design discussions, architectural debates, and the courage to defend my logic against the scrutiny of expert mentors.</p>
<p>The result? I ended up with fewer merges than last year org, but the depth was incomparable.</p>
<p>I had Pull Requests with <strong>26+ comments</strong>, threads of intense collaboration, feedback, and refinement. Those 26 comments taught me more than 100 solo commits ever could. They proved that the true power of engineering isn't found in your "self-assumptions," but in the <strong>collaborative friction</strong> that polishes a good idea into a great one.</p>
<img src="https://cdn.hashnode.com/uploads/covers/68317ce564376efe1ee7bccd/b338e215-7cb8-4b91-807f-b8993d159e0c.png" alt="this i the image illustrating my contributions to the greedybear project" style="display:block;margin:0 auto" />

<p>In a world where LLMs can generate syntax instantly, it’s easy to develop a "collector" mindset, where you feel like you know everything because you can search for everything. But that’s a trap for the ego. I decided that I’d rather take <strong>10 deep, painful learnings from one single PR</strong> than a dozen easy wins, and which push me to discuss more and more about problems, in most of the PR my core discussion used to be about latency , db internals and scope, which also helped me to think out of the box.</p>
<img src="https://cdn.hashnode.com/uploads/covers/68317ce564376efe1ee7bccd/2a304761-7106-4697-8cb1-cb39728b68de.png" alt="my discussion on some issues with mentors" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/68317ce564376efe1ee7bccd/78e4e8b5-b7b0-42ae-bba0-0722b5f5a3ec.png" alt="" style="display:block;margin:0 auto" />

<p>I stepped into a world of threat intelligence with <strong>zero</strong> prior knowledge of the field. I didn’t know IP clustering, tpots, honeypots, and many more things about cyber-security and threat intelligence . But because I kept my engineering fundamentals solid, I could learn the concepts on the fly. Today, the boy who knew nothing can lead a discussion for hours on these topics. That is the magic of the Open Source community, it doesn't just build software; it builds people like me.</p>
<p>One more thing: when it comes to your proposal, start long before the official submission window opens. Use that extra time to discuss your ideas openly with your mentors. This collaborative "pre-draft" phase allows you to refine your technical approach based on real feedback, and more importantly, it gives you the genuine confidence that you can, and will, finish what you start. However, This summer, I’ll be building a <strong>Event Injector API.</strong> It’s a massive undertaking, but I’m going in with a clear lessons I learned.</p>
<p>To sum up, <strong>Collaboration is the master key.</strong> No matter how hard the problem is, it can be solved through better communication. If you want to be the next contributor, don't just write code. Talk. Listen. Defend your ideas and more important Keep your fundamentals so sharp that they help you when nothing else can.</p>
]]></content:encoded></item></channel></rss>