<?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>Forem: VikthurrDev</title>
    <description>The latest articles on Forem by VikthurrDev (@vikthurrdev).</description>
    <link>https://forem.com/vikthurrdev</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%2F2259321%2F6fdf2d2d-c30b-4cd1-bbbc-d3afb7053612.jpg</url>
      <title>Forem: VikthurrDev</title>
      <link>https://forem.com/vikthurrdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vikthurrdev"/>
    <language>en</language>
    <item>
      <title>So You Want to Pick an Open-Source License? Let’s Talk</title>
      <dc:creator>VikthurrDev</dc:creator>
      <pubDate>Fri, 22 Aug 2025 11:28:50 +0000</pubDate>
      <link>https://forem.com/vikthurrdev/so-you-want-to-pick-an-open-source-license-lets-talk-19l4</link>
      <guid>https://forem.com/vikthurrdev/so-you-want-to-pick-an-open-source-license-lets-talk-19l4</guid>
      <description>&lt;p&gt;I still remember the first time I uploaded code to GitHub. Felt like dropping my diary in the middle of a busy café and walking away. Anyone could read it, scribble notes in the margin, or—worst case—claim it as their own. That’s when I learned (the hard way) about open-source licenses. I’d picked “no license,” thinking it meant “free for all.” Nope. In practice, it meant &lt;em&gt;nobody could legally use it&lt;/em&gt;. Rookie mistake.&lt;/p&gt;

&lt;p&gt;If you’re just getting started in open source—especially here in Africa, where the community is bubbling with fresh talent and energy—understanding licenses isn’t optional. It’s the seatbelt on your road trip. Doesn’t make the journey less fun, but it stops you flying out the window.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wait, What’s an Open-Source License Anyway?
&lt;/h2&gt;

&lt;p&gt;At its simplest, an open-source license is like a house rule for your code. It says: &lt;em&gt;yes, you can enter, yes, you can rearrange the furniture, but here’s what you owe me in return.&lt;/em&gt; Sometimes it’s just credit. Sometimes it’s keeping your changes open too. Think of it as setting boundaries so collaboration doesn’t turn into chaos.&lt;/p&gt;

&lt;p&gt;Without one, the law assumes “all rights reserved.” Meaning no one can use your project—not even to fix a typo—without risking trouble.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two Big Buckets: Copyleft vs. Permissive
&lt;/h2&gt;

&lt;p&gt;Here’s where things get spicy. Most licenses fall into two camps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copyleft&lt;/strong&gt; (the “share alike” crew): You can use my code, but if you change it, you must share your changes under the same license. Example? The GNU General Public License (GPL). It’s strict. Some people love that because it keeps the ecosystem fair. Others find it… stifling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Permissive&lt;/strong&gt; (the “do what you like” gang): MIT, BSD, Apache. These are chill. They say, “Sure, take my code, build a business around it, sell a product, just keep my name somewhere in the credits.” That’s it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quick analogy: Copyleft is like lending someone a recipe and insisting their version stays free for everyone. Permissive is like tossing your recipe into the wind—you don’t mind if it shows up in a restaurant menu tomorrow.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Story from the Trenches
&lt;/h2&gt;

&lt;p&gt;A friend of mine in Nairobi built a small Python tool for scraping public data. At first, no license. A fintech startup spotted it, improved it, then—surprise—closed it up inside their product. He couldn’t complain because, legally, he hadn’t licensed it. Had he slapped on the GPL, they’d have been forced to release their changes back. Instead? Lesson learned.&lt;/p&gt;

&lt;p&gt;On the flip side, I once MIT-licensed a little JavaScript library for charts. A company in Cape Town used it inside a paid app. They sent me a thank-you email months later. Didn’t owe me money. Didn’t need to share improvements. But that project spread farther than I could’ve imagined. So—depends on your goal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Picking Your First License (Without Losing Your Mind)
&lt;/h2&gt;

&lt;p&gt;Alright, you don’t need a law degree. Here’s the shortcut:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Want your code to stay open forever? Pick &lt;strong&gt;GPL&lt;/strong&gt; or &lt;strong&gt;AGPL&lt;/strong&gt; (if it’s server stuff).&lt;/li&gt;
&lt;li&gt;Want the world to use your code however they like? Pick &lt;strong&gt;MIT&lt;/strong&gt; or &lt;strong&gt;Apache 2.0&lt;/strong&gt; (bonus: Apache covers patents).&lt;/li&gt;
&lt;li&gt;Not sure? Honestly, MIT is the safe starter pack. Short, sweet, easy to read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pro tip: GitHub makes this super easy. When you create a new repo, it literally asks, “Add a license?” Click the dropdown, pick one. Done.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Few “But What Ifs…”
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What if someone steals my code?&lt;/strong&gt;&lt;br&gt;
If it’s licensed, they can’t just claim it as theirs. Worst case, you’ve got the law (and community shame) on your side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What if I don’t want businesses profiting off my work?&lt;/strong&gt;&lt;br&gt;
Go with copyleft. But keep in mind—some companies may avoid your project entirely because it’s “too open.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What if I change my mind later?&lt;/strong&gt;&lt;br&gt;
Tricky. You can re-license &lt;em&gt;future&lt;/em&gt; versions, but old releases stay under the old license. That’s why picking upfront is smart.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why This Matters (Especially Here)
&lt;/h2&gt;

&lt;p&gt;Africa’s dev scene is exploding—check the number of Lagos, Nairobi, Cape Town contributors on GitHub lately. But too many promising projects stall because licensing gets ignored. Imagine you build a tool that could help farmers predict rainfall. A university wants to integrate it, but their lawyers see “no license” and back off. Opportunity lost.&lt;/p&gt;

&lt;p&gt;Licenses aren’t just legal fluff. They’re your handshake with the world.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrapping It Up Over Coffee
&lt;/h2&gt;

&lt;p&gt;Here’s the thing: open-source licenses aren’t about lawyers in suits. They’re about trust, clarity, and making sure your late-night coding experiments can actually live beyond your laptop. Don’t overthink it. Start simple. Pick MIT if you’re unsure. Pick GPL if you’re a stickler for openness.&lt;/p&gt;

&lt;p&gt;And don’t wait until “later.” I’ve seen too many good projects rot in the corner because no one could figure out what they were &lt;em&gt;allowed&lt;/em&gt; to do with them.&lt;/p&gt;

&lt;p&gt;So—next time you push code, add that license file. It’s five minutes that could save you five years of headaches.&lt;/p&gt;

&lt;p&gt;Now, tell me: what’s the first project of yours that’s getting a license today?&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%2Fzj9jyb1ebcbqjjb723b7.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%2Fzj9jyb1ebcbqjjb723b7.png" alt="Open-Source License" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Power of Sports Visibility: Why Southeast Entrepreneurs Should Partner with Football Clubs</title>
      <dc:creator>VikthurrDev</dc:creator>
      <pubDate>Sat, 16 Aug 2025 22:28:11 +0000</pubDate>
      <link>https://forem.com/vikthurrdev/the-power-of-sports-visibility-why-southeast-entrepreneurs-should-partner-with-football-clubs-2d3d</link>
      <guid>https://forem.com/vikthurrdev/the-power-of-sports-visibility-why-southeast-entrepreneurs-should-partner-with-football-clubs-2d3d</guid>
      <description>&lt;p&gt;&lt;strong&gt;The Power of Sports in Bridging Business and Culture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Picture a stadium roaring with fans, united by a single goal that sparks joy across communities. In Nigeria’s Southeast, football is more than a sport—it’s a cultural heartbeat that inspires resilience and connection. As a tech expert, I’ve witnessed how technology has transformed local clubs into global brands, extending their reach from fields to fans’ smartphones. For Southeast entrepreneurs, this is a unique opportunity to grow your business by tapping into the passion for football. Partnering with clubs like Rangers International can elevate your brand and forge deep community ties. Let’s explore why this matters and how you can act.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Magic of Sports Visibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sports visibility is about leveraging a club’s influence to boost your brand. Through sponsorships, athlete endorsements, and events, businesses gain access to a loyal, engaged audience. In the Southeast, where football is a way of life, clubs like Rangers International hold immense sway. Technology has amplified this reach, with fans following matches, sharing highlights, and engaging with brands on platforms like X and Instagram. A single sponsored post or a player wearing your logo can reach thousands instantly, offering exposure that traditional ads can’t match. For entrepreneurs, this is a chance to connect with a passionate community in a meaningful way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rangers International: A Symbol of Resilience and Unity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rangers International, based in Enugu, is more than a football club—it’s a symbol of hope with deep roots in the Southeast. Founded in 1970 after the Nigerian Civil War, Rangers emerged as a beacon for the Igbo community. In the post-war years, their victories in national tournaments lifted spirits and fostered national healing. Defeating the Nigerian Army team 2-1 in a historic match, Rangers proved that resilience could triumph over adversity, embodying their motto: “Never Say Die.” This legacy makes Rangers a powerful partner for entrepreneurs seeking authentic connections with the Southeast’s vibrant culture. &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%2Fxpik6y9pafrfmuq2280i.webp" 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%2Fxpik6y9pafrfmuq2280i.webp" alt="ranger international fc 1970" width="312" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.vanguardngr.com/2017/07/rangers-intl-football-club-2-biafran-army-versus-nigerian-army/" rel="noopener noreferrer"&gt;Rangers International Football Club, Biafran Army versus Nigerian Army&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case Study: Afrinvest and Rangers’ Winning Partnership&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A shining example of sports visibility in action is the partnership between Rangers International and Afrinvest (West Africa) Limited, a leading financial services firm. In October 2023, Afrinvest signed a three-year jersey sponsorship deal worth N50 million per season, with clauses for renewal. The agreement, initiated six years earlier under Rangers’ former team manager Davison Owumi, aimed to professionalize the club and attract business investment.&lt;br&gt;
 afriinvest image&lt;/p&gt;

&lt;p&gt;The results were remarkable. By June 2024, Rangers won the Nigeria Premier Football League (NPFL) for the eighth time, earning a spot in the 2024/25 CAF Champions League. Afrinvest’s logo, emblazoned on Rangers’ jerseys during victory parades, gained massive visibility across the Southeast and beyond, amplified by social media and fan-generated content. Dr. Ike Chioke, Afrinvest’s Group Managing Director and an Enugu native, emphasized that the partnership was about more than branding—it was about uplifting talent and inspiring hope in a region facing economic challenges. He noted, “A victory for Rangers is a victory for all of us, victory for our human capacity to succeed.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rangersintl.com/news/64" rel="noopener noreferrer"&gt;AFRINVEST COMMITS TO FURTHER PARTNERSHIP WITH RANGERS&lt;/a&gt;&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%2Fts9ids4fsievwmjkf7mf.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%2Fts9ids4fsievwmjkf7mf.jpg" alt="AFRINVEST COMMITS TO FURTHER PARTNERSHIP WITH RANGERS" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This partnership gave Afrinvest a strong local appeal in the Southeast. By aligning with Rangers, a club synonymous with Igbo resilience, Afrinvest connected authentically with fans, positioning itself as a brand that supports community pride and excellence. The partnership’s success, celebrated at events attended by Enugu State officials, showcased how businesses can gain trust and visibility through sports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why This Connection Matters for Entrepreneurs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For Southeast entrepreneurs, partnering with Rangers offers a chance to build trust and relevance. The club’s history resonates with fans who see it as a symbol of perseverance. Sponsoring a match or collaborating with players aligns your brand with this legacy, creating emotional connections. Technology makes this accessible—social media posts or live streams can amplify your message to fans’ phones instantly. For instance, a local startup could sponsor a matchday event, gaining exposure through Rangers’ digital platforms. Small businesses can start with affordable options like social media shoutouts or branded giveaways, making an impact without breaking the bank. The Afrinvest case shows how such partnerships deliver tangible results, enhancing local appeal and credibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Southeast Market: A Growing Opportunity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Southeast’s market is a goldmine for entrepreneurs. With over 20 million people across five states (Abia, Anambra, Ebonyi, Enugu, and Imo), the region is an economic hub driven by cities like Onitsha and Aba. Nigeria’s sports market, fueled by football, is growing, with technology boosting fan engagement. Over 80% of Nigerians own smartphones, meaning your brand can reach this market instantly through a club’s digital channels. Partnering with Rangers taps into this vibrant, tech-savvy audience, connecting with consumers eager for innovative products.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rangers International FC visit Billionaire Entrepreneur, Blord Group&lt;/strong&gt;&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%2Fcobz7u00q642vo2ron2p.jpeg" 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%2Fcobz7u00q642vo2ron2p.jpeg" alt="Rangers International FC visit Billionaire Entrepreneur, Blord Group" width="800" height="1066"&gt;&lt;/a&gt;&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%2Fykfoa17xuz7sdyoyjrls.jpeg" 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%2Fykfoa17xuz7sdyoyjrls.jpeg" alt="Rangers International FC visit Billionaire Entrepreneur, Blord Group" width="800" height="758"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These images capture a recent visit by Rangers International Football Club to a leading Southeast entrepreneur, Mr Linus William, CEO of Blord Group, sparking discussions on partnerships like youth academies and branded campaigns. Such engagements show how Rangers actively connect with the business community, offering entrepreneurs a platform to gain visibility and trust.&lt;/p&gt;

&lt;p&gt;The Afrinvest partnership proves that working with Rangers delivers results, from local appeal to national recognition. Don’t wait—reach out to Rangers International today to score big in the Southeast.&lt;/p&gt;




</description>
    </item>
    <item>
      <title>Tutorial to run a Gensyn Testnet Node on Quickpod</title>
      <dc:creator>VikthurrDev</dc:creator>
      <pubDate>Wed, 06 Aug 2025 12:34:30 +0000</pubDate>
      <link>https://forem.com/vikthurrdev/tutorial-to-run-a-gensyn-testnet-node-1o09</link>
      <guid>https://forem.com/vikthurrdev/tutorial-to-run-a-gensyn-testnet-node-1o09</guid>
      <description>&lt;p&gt;Here's a step-by-step guide to run a Gensyn RL Swarm Testnet node:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Prepare Your Environment
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Rent a Cloud GPU&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;QuickPod&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Sign up at &lt;a href="https://quickpod.io" rel="noopener noreferrer"&gt;QuickPod&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Deposit crypto, rent a CUDA 12.4 GPU (e.g., RTX 4090, RTX 3090)&lt;/li&gt;
&lt;li&gt;Connect via web terminal or SSH&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  Step 2: Install Dependencies
&lt;/h3&gt;

&lt;p&gt;Run these commands in your terminal (remove &lt;code&gt;sudo&lt;/code&gt; when using QuickPod):&lt;/p&gt;

&lt;h3&gt;
  
  
  Update System
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Basic Tools
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;screen curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev &lt;span class="nb"&gt;tar &lt;/span&gt;clang bsdmainutils ncdu unzip libleveldb-dev &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Python
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;python3 python3-pip python3-venv python3-dev &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Node.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://deb.nodesource.com/setup_22.x | bash -
 apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; nodejs
 npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Yarn
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; curl &lt;span class="nt"&gt;-o-&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; https://yarnpkg.com/install.sh | bash
 &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.yarn/bin:&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.config/yarn/global/node_modules/.bin:&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
 &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clone the GitHub repository
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/gensyn-ai/rl-swarm/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Move into the cloned repository directory
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd rl-swarm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Open a virtual terminal that runs in the background
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt install tmux  

tmux new -s gensyn_node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install swarm
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; python3 -m venv .venv

 . .venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Start gensyn node
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ./run_rl_swarm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. &lt;strong&gt;Log in to your node&lt;/strong&gt;
&lt;/h3&gt;




&lt;p&gt;&lt;strong&gt;1. Wait for User Data Creation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Action&lt;/strong&gt;: Monitor your logs until you see:
&lt;code&gt;Waiting for userData.json to be created...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Note&lt;/strong&gt;: This confirms the node is ready for login.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;2. Access the Login Page&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPU Cloud/VPS Users&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open a new terminal&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install localtunnel&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; localtunnel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Get your password (VPS IP)&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   curl https://loca.lt/mytunnelpassword
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Generate a public URL&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   lt &lt;span class="nt"&gt;--port&lt;/span&gt; 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Access the URL&lt;/strong&gt; in your browser and enter the password (your VPS IP).
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;3. Choose your Login&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Action&lt;/strong&gt;: Use your preferred login method (e.g., GitHub, email).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What Happens Next&lt;/strong&gt;: After login, the terminal automatically starts the installation process.
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;4. Complete Setup Prompts&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hugging Face Hub Upload&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prompt:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; Would you like to push models you train to the Hugging Face Hub? &lt;span class="o"&gt;[&lt;/span&gt;y/N]
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;a. - &lt;strong&gt;Testnet Users&lt;/strong&gt;: Press &lt;code&gt;N&lt;/code&gt; (no upload).  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Select a Model&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prompt:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; Enter the name of the model &lt;span class="o"&gt;(&lt;/span&gt;repo/name&lt;span class="o"&gt;)&lt;/span&gt; or &lt;span class="o"&gt;[&lt;/span&gt;Enter] &lt;span class="k"&gt;for &lt;/span&gt;default:
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. Verify Node Operation&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Action&lt;/strong&gt;: Check the terminal for a message like:
&lt;code&gt;Hello, [your node name]&lt;/code&gt; (e.g., "whistling hulking armadillo").
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tip&lt;/strong&gt;: Use &lt;code&gt;CTRL+SHIFT+F&lt;/code&gt; to search for "Hello" in logs.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  6. Detach from the termux terminal
&lt;/h3&gt;

&lt;p&gt;Press Ctrl + B, then release and press D (Detach).&lt;/p&gt;




&lt;h3&gt;
  
  
  7. Backup your secret identity
&lt;/h3&gt;

&lt;p&gt;Move into your cloned repository directory, e.g, rl-swarm.&lt;/p&gt;

&lt;p&gt;Copy the swarm.pem file into your computer using the SCP protocol.&lt;/p&gt;

&lt;p&gt;scp -P {PORT} {USER}@{IP ADDRESS}:{REMOTE PATH TO FILE} {PATH TO WHERE YOU WANT TO SAVE THE FILE IN YOUR COMPUTER}&lt;/p&gt;

&lt;p&gt;Create a folder named backup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;e.g scp -P 41200 36****f-***-43c0-a339-038c8***234@74.133. .***.***.248:/***/****/swarm.pem /home/****/backup

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






</description>
      <category>web3</category>
      <category>ai</category>
      <category>cloud</category>
      <category>gensyn</category>
    </item>
    <item>
      <title>When Web3 + Machine Learning + Cloud Computing collide (Simplified).</title>
      <dc:creator>VikthurrDev</dc:creator>
      <pubDate>Wed, 06 Aug 2025 08:27:09 +0000</pubDate>
      <link>https://forem.com/vikthurrdev/run-rl-swarm-testnet-node-3mf5</link>
      <guid>https://forem.com/vikthurrdev/run-rl-swarm-testnet-node-3mf5</guid>
      <description>&lt;h2&gt;
  
  
  🧩 What is Gensyn AI?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gensyn AI&lt;/strong&gt; is basically a &lt;strong&gt;decentralized AI training network&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Instead of all AI training being done on giant, expensive, centralized servers owned by a few companies, Gensyn lets &lt;strong&gt;anyone&lt;/strong&gt; with computing power contribute and get rewarded.&lt;/p&gt;

&lt;p&gt;Think of it like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Uber for AI compute&lt;/strong&gt; 🚗💻 — you bring your “car” (GPU or CPU), they match you with AI workloads, and you earn for your contribution.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🌍 Why Does It Exist?
&lt;/h2&gt;

&lt;p&gt;AI training is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Expensive&lt;/strong&gt; — high-end GPUs are rare and costly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Centralized&lt;/strong&gt; — a handful of tech giants control most compute.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Underutilized&lt;/strong&gt; — many GPUs sit idle (e.g., gamers, universities, labs).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gensyn’s goal is to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Spread AI training across the world&lt;/strong&gt; (decentralization).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make it cheaper&lt;/strong&gt; for researchers and developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Let regular people earn&lt;/strong&gt; by renting out their unused computing power.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ⚙️ How It Works (Simplified)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;People request AI training jobs&lt;/strong&gt; on the network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The network splits the work&lt;/strong&gt; into smaller pieces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nodes&lt;/strong&gt; do the training tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gensyn verifies&lt;/strong&gt; you did the work correctly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You get rewarded&lt;/strong&gt; (currently testnet, but mainnet will have crypto rewards).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🤖 What’s RL‑Swarm?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RL‑Swarm&lt;/strong&gt; is the &lt;strong&gt;node software&lt;/strong&gt; you run to connect to Gensyn’s network.&lt;br&gt;&lt;br&gt;
When you run RL‑Swarm:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You join the swarm of nodes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You receive AI workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can see your performance in a web dashboard.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s like installing the &lt;strong&gt;“driver app”&lt;/strong&gt; for your GPU so it can work on the Gensyn network.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Current Status (as of now)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Running in testnet&lt;/strong&gt; — rewards are for testing/tracking only, but mainnet will pay.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supports CPU &amp;amp; GPU&lt;/strong&gt; — but GPU is much faster and preferred.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Community-driven&lt;/strong&gt; — many people run it from home, on cloud services like QuickPod, or even on idle gaming rigs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 In Short
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Gensyn AI is building a &lt;strong&gt;global, shared AI supercomputer&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
powered by people’s GPUs and CPUs, rewarding them for training AI models.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To win rewards, check out this tutorial for setting up a node &lt;/p&gt;

</description>
      <category>web3</category>
      <category>machinelearning</category>
      <category>blockchain</category>
      <category>gensyn</category>
    </item>
    <item>
      <title>Designing a webhook service: A practical guide to event-driven architecture.</title>
      <dc:creator>VikthurrDev</dc:creator>
      <pubDate>Mon, 28 Oct 2024 09:32:12 +0000</pubDate>
      <link>https://forem.com/vikthurrdev/designing-a-webhook-service-a-practical-guide-to-event-driven-architecture-3lep</link>
      <guid>https://forem.com/vikthurrdev/designing-a-webhook-service-a-practical-guide-to-event-driven-architecture-3lep</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Many organizations depend on third-party vendors for services e.g payment processing and merchandise reselling. While these partnerships can enhance efficiency but it comes with challenges such as   how to keep track of vendor performance and transparency. &lt;br&gt;
One effective way to tackle these challenges is through an event-driven architecture (EDA). &lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem
&lt;/h3&gt;

&lt;p&gt;As my organisation grows in revenue and size. Their third party vendors network also expands. I was tasked with providing a solution that  monitors all activities in our third parties system to improve transparency and performance review. Communicating key metric like "sales per month" visually  is compulsory. A dashboard that visualize these data is a key component of the solution. &lt;/p&gt;

&lt;h2&gt;
  
  
  Event Driven Architecture
&lt;/h2&gt;

&lt;p&gt;An event-driven architecture focuses on producing, detecting, and responding to events in real time. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Webhook?
&lt;/h2&gt;

&lt;p&gt;A webhook is a simple way for one system to send data to another when a specific event occurs. For example, when a payment is processed, a webhook can instantly notify your system by sending relevant data. This eliminates the need for constant checks on the vendor’s system, providing real-time updates.&lt;br&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%2Fltg3oiywkl4fa0v9bh6c.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%2Fltg3oiywkl4fa0v9bh6c.png" alt="Event driven architecture" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of Webhooks
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Instant Updates&lt;/strong&gt;: Webhooks provide immediate notifications, keeping your organization informed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource Efficiency&lt;/strong&gt;: By avoiding constant polling, webhooks save server resources and bandwidth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt;: You can set up your own endpoints and tailor the data to your needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease of Use&lt;/strong&gt;: Webhooks are straightforward to implement with minimal changes to existing systems.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Functional Requirements
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accept Executed API Requests&lt;/strong&gt;: The webhook service should be capable of receiving incoming API calls from third-party systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Execute Corresponding Events&lt;/strong&gt;: Upon receiving a request, the service must trigger the appropriate events based on the webhook data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Persist Events and Results&lt;/strong&gt;: The service should store both the event data and the results of processed events in a database for future reference and analysis.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Non-Functional Requirements
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High Availability&lt;/strong&gt;: The webhook service must be designed for minimal downtime, ensuring it is consistently accessible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;At Least Once Delivery&lt;/strong&gt;: Every event must be delivered at least once, even in the face of system failures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Idempotency&lt;/strong&gt;: The system should handle duplicate event deliveries gracefully, ensuring that processing the same event multiple times does not lead to inconsistent states.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Traditional Architecture Flaws
&lt;/h2&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%2Fvjybm6oebe1emz2ssr2k.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%2Fvjybm6oebe1emz2ssr2k.png" alt="Traditional Webhook" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  figure 1.0  A simple webhook implementation
&lt;/h2&gt;

&lt;p&gt;In a traditional setup, the request handler directly processes incoming requests, executes the necessary business logic, and saves results to the database. While this method may seem straightforward, it has several significant drawbacks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tight Coupling&lt;/strong&gt;: Request handling and business logic are closely integrated, making it hard to scale components independently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single Point of Failure&lt;/strong&gt;: If the request handler fails, the entire system may become unresponsive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Load Buffering&lt;/strong&gt;: High traffic periods can overwhelm the system, leading to potential failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Built-in Retry Mechanism&lt;/strong&gt;: If an operation fails, there is often no automated way to retry processing the event.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution: Integrating a Message Queue
&lt;/h2&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%2Fxenilp79v2c2pt70p4wj.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%2Fxenilp79v2c2pt70p4wj.png" alt="Advance Webhook" width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  figure 1.1 An resilient webhook
&lt;/h2&gt;

&lt;p&gt;To address these challenges, adding a message queue into the architecture can significantly enhance the webhook service's performance and reliability. Here’s how this integration works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decoupling&lt;/strong&gt;: Instead of directly processing events, the request handler sends messages to a queue. This decouples the request handling from event processing, allowing for independent scaling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Load Buffering&lt;/strong&gt;: The message queue acts as a buffer, holding incoming requests during peak traffic, ensuring the system can handle bursts of activity without failure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: Additional consumers can be added to process messages from the queue, enabling horizontal scaling as demand increases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Failure Recovery&lt;/strong&gt;: If an event fails to process, the message can be retried automatically, ensuring at least once delivery.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Benefits of Message Queue Integration
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Reliability&lt;/strong&gt;: A message queue can handle traffic spikes gracefully, preventing service outages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Flexibility&lt;/strong&gt;: Components can evolve independently, simplifying maintenance and upgrades.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficient Resource Utilization&lt;/strong&gt;: Offloading processing to the queue keeps the request handler responsive, enhancing overall performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Data flow of a resilient webhook
&lt;/h2&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%2F2i7p13w4vz98c8thm5l6.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%2F2i7p13w4vz98c8thm5l6.png" alt="Data flow of an advanced webhook" width="800" height="657"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  figure 1.2 data flow of resilient webhook
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Handling Failure
&lt;/h3&gt;

&lt;p&gt;In a robust event-driven architecture, handling failures effectively is crucial to maintaining system resilience. &lt;/p&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Webhook Trigger and API Request&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;When an event occurs in the third-party system, the webhook sends an API request to your service with the event data. &lt;/p&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Message Queue Enqueueing&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Upon receiving the request, the webhook at enqueue the message into the message queue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Success Scenario:&lt;/strong&gt; If the message is successfully enqueued, the system returns a 200 response to the user, indicating that the event has been received and will be processed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Failure Scenario:&lt;/strong&gt; If the message fails to enqueue (for instance, due to a queue service outage), the system responds with an appropriate error code (e.g., 500 Internal Server Error) instead of a 200. This informs the user that the event was not successfully processed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Event Processing from the Queue&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once the message is in the queue, a consumer service will pick it up for processing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Persistence Check:&lt;/strong&gt; During processing, the consumer attempts to save the event data to the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Success Scenario:&lt;/strong&gt; If the data is successfully saved, the event can be dequeued, and processing is considered complete.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Failure Scenario:&lt;/strong&gt; If the data fails to save (due to database issues, for example):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The event remains in the queue and is not dequeued.&lt;/li&gt;
&lt;li&gt;If the maximum retry attempts are reached without success, tan alert can be generated for system administrators.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;Response Handling&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To summarize the response handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the event is not enqueued, the user receives a 500 error response.&lt;/li&gt;
&lt;li&gt;If the event is enqueued but the data fails to save to the database, the event remains in the queue, and no acknowledgment of success is provided until the data is successfully saved to the database .&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Handling Security with HMAC
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is HMAC?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HMAC (Hash-based Message Authentication Code) is a method that uses a shared secret key to create a unique hash value for a message. This ensures both integrity (the message hasn't been altered) and authenticity (the message is from a trusted source).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Implementation Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shared Secret Generation&lt;/strong&gt;: Establish a confidential shared secret between your system and the third-party service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HMAC Signature Creation&lt;/strong&gt;: When an event occurs, the vendor generates an HMAC using the shared secret and the payload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sending the Webhook&lt;/strong&gt;: The service sends the payload along with the HMAC in an HTTP header (e.g., &lt;code&gt;X-Hub-Signature&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signature Verification&lt;/strong&gt;: Your system recalculates the HMAC for the received payload and compares it with the received signature to ensure they match.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Overview of Services
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Database Service&lt;/strong&gt;: Stores webhook events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request Handler Service&lt;/strong&gt;: Receives incoming webhook requests and enqueues messages to RabbitMQ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queue Broker&lt;/strong&gt;: RabbitMQ to manage the message queue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consumer Service&lt;/strong&gt;: Processes messages from the queue and interacts with the database.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Create the Request Handler Service
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//server.js
const express = require('express');
const amqp = require('amqplib');
const bodyParser = require('body-parser');
const HMAC = require('./verfiy-hmac'); 
require('dotenv').config();

const app = express();
app.use(bodyParser.json());

const RABBITMQ_URL = process.env.QUEUE_URL;

app.post('/webhook', async (req, res) =&amp;gt; {
    const payload = req.body;


    if (!HMAC.verify(payload, req.headers['x-hub-signature'])) {
        console.log(req.headers['x-hub-signature'],"hdhdhhd")
        return res.status(403).send('Unauthorized');
    }

    try {
        const connection = await amqp.connect(RABBITMQ_URL);
        const channel = await connection.createChannel();
        await channel.assertQueue('webhook_queue');
        channel.sendToQueue('webhook_queue', Buffer.from(JSON.stringify(payload)));
        res.status(200).send('Event received');
    } catch (error) {
        console.error(error);
        res.status(500).send('Internal Server Error');
    }
});

app.listen(process.env.PORT, () =&amp;gt; {
    console.log(Request Handler Service running on port ${process.env.PORT} );
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Create HMAC Verification
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// verify-hmac.js
const crypto = require('crypto');
require('dotenv').config();
const SECRET = process.env.PW; 

module.exports.verify = (payload, signature) =&amp;gt; {
    const hmac = crypto.createHmac('sha256', SECRET);
    hmac.update(JSON.stringify(payload));
    const calculatedSignature = hmac.digest('hex');
    return calculatedSignature === signature;
};


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  step 4: create your consumer service
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const amqp = require('amqplib');
const mysql = require('mysql');
require("dotenv").config();

const RABBITMQ_URL = process.env.QUEUE_URL;

const db = mysql.createConnection({
    host: "db",
    user: "root",
    password:"rootpassword",
    database: "events_db",
    port:3306
});

db.connect((err) =&amp;gt; {
    if (err) {
        console.error("Error connecting to MySQL:", err);
        return;
    }
    console.log("Connected to MySQL database.");
});

async function consume() {
    const connection = await amqp.connect(process.env.QUEUE_URL);
    const channel = await connection.createChannel();
    await channel.assertQueue('webhook_queue');

    channel.consume('webhook_queue', async (msg) =&amp;gt; {
        if (msg !== null) {
            const payload = JSON.parse(msg.content.toString());
            db.query("INSERT INTO events (payload) VALUES (?)", [JSON.stringify(payload)], (err) =&amp;gt; {
                if (err) {
                    console.error("Error saving to database:", err);
                } else {
                    console.log("Saved to database:", payload);
                }
            });
            channel.ack(msg);
        }
    });
}

consume().catch(console.error);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  step 5: create relational database
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  db:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: events_db
    ports:
      - "3306:3306"
    volumes:
      - /var/lib/mysql
    networks:
      webhook_network:
        ipv4_address: 172.20.0.20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  step 6: create message queue
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  rabbitmq:
    image: rabbitmq:3-management
    ports:
      - "15672:15672"
      - "5672:5672"
    networks:
      webhook_network:
        ipv4_address: 172.20.0.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//docker-compose.yml
version: '3.8'

services:
  rabbitmq:
    image: rabbitmq:3-management
    ports:
      - "15672:15672"
      - "5672:5672"
    networks:
      webhook_network:
        ipv4_address: 172.20.0.10

  db:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: events_db
    ports:
      - "3306:3306"
    volumes:
      - /var/lib/mysql
    networks:
      webhook_network:
        ipv4_address: 172.20.0.20

  request-handler:
    build:
      context: ./requestHandler
      dockerfile: Dockerfile
    depends_on:
      - rabbitmq
    ports:
      - "3000:3000"
    networks:
      webhook_network:
        ipv4_address: 172.20.0.30

  consumer:
    build:
      context: ./consumer
      dockerfile: Dockerfile
    volumes:
      - ./app
    depends_on:
      - rabbitmq
      - db
    networks:
      webhook_network:
        ipv4_address: 172.20.0.40

networks:
  webhook_network:
    driver: bridge
    ipam:
      config:
        - subnet: 172.20.0.0/16

volumes:
  db-data: 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running docker-compose up, you’ll have four services up and running: RabbitMQ, MySQL, a Consumer service, and a Request Handler service. Each of these services is assigned a static IP address to ensure stable  communication within your application.&lt;/p&gt;

&lt;p&gt;You can find the code for this setup on my &lt;a href="https://github.com/victor-914/webhook" rel="noopener noreferrer"&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you found this guide helpful, please give it a like! If I receive 10 likes, I’ll create a detailed tutorial video that walks you through the entire process. &lt;/p&gt;

</description>
      <category>eventdriven</category>
      <category>webhook</category>
    </item>
  </channel>
</rss>
