<?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[krizz]]></title><description><![CDATA[krizz]]></description><link>https://krizzzz.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 19:25:04 GMT</lastBuildDate><atom:link href="https://krizzzz.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Zero-Config Remote Worker Mesh]]></title><description><![CDATA[I've been fascinated by distributed systems lately, especially after dealing with the pain of setting up worker clusters that require extensive…]]></description><link>https://krizzzz.hashnode.dev/zero-config-remote-worker-mesh</link><guid isPermaLink="true">https://krizzzz.hashnode.dev/zero-config-remote-worker-mesh</guid><category><![CDATA[Worker Mesh]]></category><category><![CDATA[protobuf]]></category><category><![CDATA[Go Language]]></category><category><![CDATA[high level design]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Krish Srivastava]]></dc:creator><pubDate>Tue, 22 Jul 2025 12:24:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753088417706/cc55cab0-e42e-4f2b-888a-25e227147d3c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been fascinated by distributed systems lately, especially after dealing with the pain of setting up worker clusters that require extensive configuration files, service registries, and manual IP management. What if we could build something simpler? What if worker nodes could just... find each other?</p>
<p>That's exactly what I set out to build: a zero-configuration worker mesh where nodes automatically discover peers, distribute jobs, and sync state using nothing but UDP broadcasts and Protocol Buffers.</p>
<h2 id="heading-the-problem-with-traditional-distributed-systems">The Problem with Traditional Distributed Systems</h2>
<h3 id="heading-most-distributed-task-systems-ive-worked-with-follow-this-pattern">Most distributed task systems I've worked with follow this pattern:</h3>
<ul>
<li><p>Central scheduler (like Kubernetes master)</p>
</li>
<li><p>Service registry (like etcd)</p>
</li>
<li><p>Static configuration files with hardcoded IPs</p>
</li>
<li><p>Complex networking setup</p>
</li>
</ul>
<p>This works, but it's heavy. For smaller deployments or edge computing scenarios, you often want something that "just works" without the operational overhead.</p>
<h3 id="heading-what-is-a-worker-mesh">What is a Worker Mesh?</h3>
<p>Think of it like this: instead of having a boss (central scheduler) telling workers what to do, imagine if the workers could talk directly to each other. Each worker node can:</p>
<ul>
<li><p>Broadcast "hey, I'm here and available" to the local network</p>
</li>
<li><p>Listen for work requests from any other node</p>
</li>
<li><p>Execute tasks and report results back</p>
</li>
<li><p>Keep track of who's online and who's busy</p>
</li>
</ul>
<p>No master, no configuration files, no service discovery headaches.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753081425794/0795a5d5-7f2f-46ed-9b97-e2c9fed8fece.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-why-protocol-buffers">Why Protocol Buffers?</h2>
<p>When I started this project, my first instinct was to use JSON for node communication. But then I remembered the performance issues I'd faced before with chatty microservices.</p>
<h3 id="heading-json-problems">JSON problems:</h3>
<ul>
<li><p>Verbose (lots of overhead for simple messages)</p>
</li>
<li><p>No schema enforcement</p>
</li>
<li><p>Parsing is expensive</p>
</li>
<li><p>No versioning story</p>
</li>
</ul>
<h3 id="heading-protocol-buffers-solve-all-of-this">Protocol Buffers solve all of this:</h3>
<ul>
<li><p>Binary format is compact and fast</p>
</li>
<li><p>Schema-driven with strong typing</p>
</li>
<li><p>Built-in versioning and backward compatibility</p>
</li>
<li><p>Cross-language support (Go, Python, Java, etc.)</p>
</li>
</ul>
<p>Here's a simple example. A JSON heartbeat might look like:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"node_id"</span>: <span class="hljs-string">"worker-abc123"</span>,
  <span class="hljs-attr">"address"</span>: <span class="hljs-string">"192.168.1.100:8080"</span>,
  <span class="hljs-attr">"status"</span>: <span class="hljs-string">"IDLE"</span>,
  <span class="hljs-attr">"last_heartbeat"</span>: <span class="hljs-string">"2025-07-21T10:30:00Z"</span>,
  <span class="hljs-attr">"metadata"</span>: {<span class="hljs-attr">"hostname"</span>: <span class="hljs-string">"worker01"</span>, <span class="hljs-attr">"pid"</span>: <span class="hljs-string">"1234"</span>}
}
</code></pre>
<p><strong>The equivalent Protobuf message is ~60% smaller and deserializes much faster. For a mesh broadcasting heartbeats every 5 seconds, this adds up.</strong></p>
<h2 id="heading-system-architecture-the-big-picture">System Architecture: The Big Picture</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753081906860/f8c97cd1-60f1-407e-99b7-99a09d547ddc.png" alt class="image--center mx-auto" /></p>
<p>The beauty is in the simplicity. Each node is identical and self-contained:</p>
<ul>
<li><p><strong>Discovery</strong>: UDP broadcasts for peer finding</p>
</li>
<li><p><strong>Job Engine</strong>: Execute shell commands with timeouts</p>
</li>
<li><p><strong>Database</strong>: SQLite for local state persistence</p>
</li>
<li><p><strong>API</strong>: REST interface for external control</p>
</li>
<li><p><strong>Mesh Protocol</strong>: Protobuf messages for efficiency</p>
</li>
</ul>
<h2 id="heading-the-protobuf-schema-defining-our-language">The Protobuf Schema: Defining Our Language</h2>
<p>The heart of the mesh communication is three message types:</p>
<pre><code class="lang-go"><span class="hljs-comment">// Every 5 seconds, nodes broadcast this</span>
message NodeInfo {
  <span class="hljs-keyword">string</span> node_id = <span class="hljs-number">1</span>;           <span class="hljs-comment">// "node-abc123"</span>
  <span class="hljs-keyword">string</span> address = <span class="hljs-number">2</span>;           <span class="hljs-comment">// "192.168.1.100:8080"</span>
  NodeStatus status = <span class="hljs-number">3</span>;        <span class="hljs-comment">// IDLE, BUSY, DRAINING, FAILED</span>
  google.protobuf.Timestamp last_heartbeat = <span class="hljs-number">4</span>;
  <span class="hljs-keyword">map</span>&lt;<span class="hljs-keyword">string</span>, <span class="hljs-keyword">string</span>&gt; metadata = <span class="hljs-number">5</span>;
  <span class="hljs-keyword">string</span> version = <span class="hljs-number">6</span>;           <span class="hljs-comment">// For compatibility checks</span>
}

<span class="hljs-comment">// Work to be distributed</span>
message Job {
  <span class="hljs-keyword">string</span> job_id = <span class="hljs-number">1</span>;            <span class="hljs-comment">// UUID</span>
  <span class="hljs-keyword">string</span> target_node_id = <span class="hljs-number">2</span>;    <span class="hljs-comment">// Which node should run this</span>
  <span class="hljs-keyword">string</span> command = <span class="hljs-number">3</span>;           <span class="hljs-comment">// Shell command to execute</span>
  <span class="hljs-keyword">map</span>&lt;<span class="hljs-keyword">string</span>, <span class="hljs-keyword">string</span>&gt; env = <span class="hljs-number">4</span>;  <span class="hljs-comment">// Environment variables</span>
  <span class="hljs-keyword">int32</span> timeout_seconds = <span class="hljs-number">5</span>;    <span class="hljs-comment">// Kill job after this</span>
  JobStatus status = <span class="hljs-number">6</span>;         <span class="hljs-comment">// PENDING, RUNNING, COMPLETED</span>
  <span class="hljs-keyword">string</span> created_by_node = <span class="hljs-number">7</span>;   <span class="hljs-comment">// Source node</span>
}

<span class="hljs-comment">// Results after job execution</span>
message JobResult {
  <span class="hljs-keyword">string</span> job_id = <span class="hljs-number">1</span>;
  <span class="hljs-keyword">string</span> executor_node_id = <span class="hljs-number">2</span>;
  <span class="hljs-keyword">int32</span> exit_code = <span class="hljs-number">3</span>;          <span class="hljs-comment">// 0 = success</span>
  <span class="hljs-keyword">string</span> stdout = <span class="hljs-number">4</span>;            <span class="hljs-comment">// Command output</span>
  <span class="hljs-keyword">string</span> stderr = <span class="hljs-number">5</span>;            <span class="hljs-comment">// Error output</span>
  google.protobuf.Timestamp started_at = <span class="hljs-number">6</span>;
  google.protobuf.Timestamp finished_at = <span class="hljs-number">7</span>;
}
</code></pre>
<p>These messages get wrapped in a <code>MeshMessage</code> envelope that identifies the message type and sender.</p>
<h2 id="heading-zero-config-discovery-how-nodes-find-each-other">Zero-Config Discovery: How Nodes Find Each Other</h2>
<p>This is where the magic happens. Instead of requiring configuration files or service registries, nodes use UDP broadcast discovery.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753087504201/b0209279-7c30-4f8a-a704-e8efc1777844.png" alt class="image--center mx-auto" /></p>
<p>Here's the discovery algorithm:</p>
<pre><code class="lang-plaintext">1. Node Startup:
   - Generate unique node ID (crypto/rand)
   - Bind UDP socket to :8080
   - Start heartbeat timer (5 second interval)
   - Start cleanup timer (remove stale peers)

2. Heartbeat Broadcast:
   - Create NodeInfo with current status
   - Serialize to Protobuf bytes
   - UDP broadcast to 255.255.255.255:8080
   - All nodes on LAN receive message

3. Message Reception:
   - Receive UDP packet
   - Deserialize Protobuf
   - Validate sender != self
   - Update peer table in memory + database
   - Log peer discovery

4. Peer Cleanup:
   - Every 10 seconds, check peer timestamps
   - Remove peers silent for &gt;30 seconds
   - Handle reconnections gracefully
</code></pre>
<p>Why UDP? It's perfect for this use case:</p>
<ul>
<li><p><strong>Connectionless</strong>: No TCP overhead or connection state</p>
</li>
<li><p><strong>Broadcast-friendly</strong>: Single message reaches all local nodes</p>
</li>
<li><p><strong>Simple</strong>: No complex error handling needed</p>
</li>
<li><p><strong>Fast</strong>: Immediate delivery without handshakes</p>
</li>
</ul>
<p>The trade-off is no delivery guarantee, but that's fine for heartbeats since the next one arrives in 5 seconds.</p>
<h2 id="heading-job-lifecycle-from-api-call-to-shell-execution">Job Lifecycle: From API Call to Shell Execution</h2>
<p>Let's trace a job through the entire system:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753085051203/33b9dd14-c2f1-4def-99c7-75692f5db012.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-phase-1-job-submission">Phase 1: Job Submission</h3>
<p>A client submits a job via REST API:</p>
<pre><code class="lang-bash">curl -X POST http://node1:3000/api/v1/<span class="hljs-built_in">jobs</span> \
  -H <span class="hljs-string">"Content-Type: application/json"</span> \
  -d <span class="hljs-string">'{
    "command": "python3 process_data.py --input /tmp/data.csv",
    "env": {"PYTHONPATH": "/app/libs", "DEBUG": "1"},
    "timeout_seconds": 300
  }'</span>
</code></pre>
<p>The handler converts this to a Protobuf Job message and generates a UUID.</p>
<h3 id="heading-phase-2-local-queuing">Phase 2: Local Queuing</h3>
<p>The job gets stored in SQLite and added to an in-memory queue (Go channel). This provides durability and allows the API to return immediately.</p>
<h3 id="heading-phase-3-execution-engine">Phase 3: Execution Engine</h3>
<p>A worker goroutine processes jobs from the queue:</p>
<p>Below is a simplified version for a better understanding,</p>
<pre><code class="lang-go"><span class="hljs-comment">// Simplified execution logic</span>
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-params">(n *Node)</span> <span class="hljs-title">executeJob</span><span class="hljs-params">(ctx context.Context, job *pb.Job)</span></span> {
    <span class="hljs-comment">// Set node status to BUSY</span>
    n.setStatus(pb.NodeStatus_BUSY)
    <span class="hljs-keyword">defer</span> n.setStatus(pb.NodeStatus_IDLE)

    <span class="hljs-comment">// Create timeout context</span>
    jobCtx, cancel := context.WithTimeout(ctx, 
        time.Duration(job.TimeoutSeconds)*time.Second)
    <span class="hljs-keyword">defer</span> cancel()

    <span class="hljs-comment">// Parse command and execute</span>
    parts := strings.Fields(job.Command)
    cmd := exec.CommandContext(jobCtx, parts[<span class="hljs-number">0</span>], parts[<span class="hljs-number">1</span>:]...)

    <span class="hljs-comment">// Set environment variables</span>
    <span class="hljs-keyword">if</span> job.Env != <span class="hljs-literal">nil</span> {
        cmd.Env = <span class="hljs-built_in">append</span>(os.Environ(), envMapToSlice(job.Env)...)
    }

    <span class="hljs-comment">// Capture output and timing</span>
    startTime := time.Now()
    stdout, err := cmd.Output()
    finishTime := time.Now()

    <span class="hljs-comment">// Create result</span>
    result := &amp;pb.JobResult{
        JobId:          job.JobId,
        ExecutorNodeId: n.ID,
        ExitCode:       getExitCode(err),
        Stdout:         <span class="hljs-keyword">string</span>(stdout),
        StartedAt:      timestamppb.New(startTime),
        FinishedAt:     timestamppb.New(finishTime),
    }

    <span class="hljs-comment">// Store result in database</span>
    n.storeJobResult(job, result)
}
</code></pre>
<h3 id="heading-phase-4-result-storage">Phase 4: Result Storage</h3>
<p>Job results get stored in SQLite with full execution details - exit codes, stdout/stderr, timing information, and any error messages.</p>
<h2 id="heading-state-management-with-ent-orm">State Management with Ent ORM</h2>
<p>Rather than writing raw SQL, I used <a target="_blank" href="https://entgo.io/">Ent</a> for type-safe database operations. The schemas are straightforward:</p>
<p><strong>Worker Node Schema</strong>:</p>
<pre><code class="lang-go"><span class="hljs-keyword">type</span> WorkerNode <span class="hljs-keyword">struct</span> {
    NodeID        <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Unique identifier</span>
    Address       <span class="hljs-keyword">string</span>    <span class="hljs-comment">// IP:port for communication  </span>
    Status        <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Current operational state</span>
    LastHeartbeat time.Time <span class="hljs-comment">// When we last heard from this node</span>
    Metadata      <span class="hljs-keyword">map</span>[<span class="hljs-keyword">string</span>]<span class="hljs-keyword">string</span> <span class="hljs-comment">// Hostname, PID, etc.</span>
    Version       <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Protocol compatibility</span>
}
</code></pre>
<p><strong>Job Schema</strong>:</p>
<pre><code class="lang-go"><span class="hljs-keyword">type</span> Job <span class="hljs-keyword">struct</span> {
    JobID         <span class="hljs-keyword">string</span>    <span class="hljs-comment">// UUID for tracking</span>
    TargetNodeID  <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Which node should execute</span>
    Command       <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Shell command to run</span>
    Status        <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Execution state</span>
    ExitCode      <span class="hljs-keyword">int32</span>     <span class="hljs-comment">// Command result (0 = success)</span>
    Stdout        <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Command output</span>
    Stderr        <span class="hljs-keyword">string</span>    <span class="hljs-comment">// Error output  </span>
    CreatedAt     time.Time <span class="hljs-comment">// When job was submitted</span>
    StartedAt     time.Time <span class="hljs-comment">// When execution began</span>
    FinishedAt    time.Time <span class="hljs-comment">// When execution completed</span>
}
</code></pre>
<p>Ent generates all the CRUD operations, migrations, and even provides a query builder. Much cleaner than hand-written SQL.</p>
<h2 id="heading-rest-api-external-control-interface">REST API: External Control Interface</h2>
<p>The Echo REST API provides external access to the mesh:</p>
<pre><code class="lang-plaintext">GET  /api/v1/health           # Node health check
GET  /api/v1/status           # Current node status + peer count
GET  /api/v1/peers            # List all known peer nodes
GET  /api/v1/jobs?limit=50    # Job execution history
POST /api/v1/jobs             # Submit new job for execution
</code></pre>
<p>Example API responses:</p>
<p><strong>Node Status</strong>:</p>
<pre><code class="lang-bash">{
  <span class="hljs-string">"node_id"</span>: <span class="hljs-string">"node-abc123"</span>,
  <span class="hljs-string">"address"</span>: <span class="hljs-string">"192.168.1.100:8080"</span>,
  <span class="hljs-string">"status"</span>: <span class="hljs-string">"IDLE"</span>, 
  <span class="hljs-string">"peer_count"</span>: 2,
  <span class="hljs-string">"metadata"</span>: {
    <span class="hljs-string">"hostname"</span>: <span class="hljs-string">"worker01"</span>,
    <span class="hljs-string">"pid"</span>: <span class="hljs-string">"1234"</span>
  }
}
</code></pre>
<p><strong>Known Peers</strong>:</p>
<pre><code class="lang-bash">{
  <span class="hljs-string">"peers"</span>: [
    {
      <span class="hljs-string">"node_id"</span>: <span class="hljs-string">"node-def456"</span>,
      <span class="hljs-string">"address"</span>: <span class="hljs-string">"192.168.1.101:8080"</span>, 
      <span class="hljs-string">"status"</span>: <span class="hljs-string">"BUSY"</span>,
      <span class="hljs-string">"last_heartbeat"</span>: <span class="hljs-string">"2025-07-21T10:30:05Z"</span>
    }
  ],
  <span class="hljs-string">"count"</span>: 1
}
</code></pre>
<p><strong>Job History</strong>:</p>
<pre><code class="lang-bash">{
  <span class="hljs-string">"jobs"</span>: [
    {
      <span class="hljs-string">"job_id"</span>: <span class="hljs-string">"550e8400-e29b-41d4-a716-446655440000"</span>,
      <span class="hljs-string">"command"</span>: <span class="hljs-string">"echo 'Hello World'"</span>,
      <span class="hljs-string">"status"</span>: <span class="hljs-string">"JOB_COMPLETED"</span>,
      <span class="hljs-string">"exit_code"</span>: 0,
      <span class="hljs-string">"stdout"</span>: <span class="hljs-string">"Hello World\n"</span>, 
      <span class="hljs-string">"created_at"</span>: <span class="hljs-string">"2025-07-21T10:30:10Z"</span>,
      <span class="hljs-string">"finished_at"</span>: <span class="hljs-string">"2025-07-21T10:30:11Z"</span>
    }
  ]
}
</code></pre>
<h2 id="heading-testing-the-mesh-in-action">Testing the Mesh in Action</h2>
<p>The best way to see this working is to spin up multiple nodes and watch them discover each other.</p>
<p><strong>Terminal 1 - Start first node</strong>:</p>
<pre><code class="lang-bash">make run-node1  <span class="hljs-comment"># API on :3001, UDP discovery on :8080</span>
</code></pre>
<p><strong>Terminal 2 - Start second node</strong>:</p>
<pre><code class="lang-bash">make run-node2  <span class="hljs-comment"># API on :3002, UDP discovery on :8080</span>
</code></pre>
<p><strong>Terminal 3 - Start third node</strong>:</p>
<pre><code class="lang-bash">make run-node3  <span class="hljs-comment"># API on :3003, UDP discovery on :8080</span>
</code></pre>
<p>Within seconds, you'll see logs like:</p>
<pre><code class="lang-bash">Updated peer: node-def456 at 192.168.1.101:8080 (status: IDLE)
Updated peer: node-ghi789 at 192.168.1.102:8080 (status: IDLE)
</code></pre>
<p><strong>Terminal 4 - Test the system</strong>:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Check peer discovery worked</span>
curl http://localhost:3001/api/v1/peers

<span class="hljs-comment"># Submit a job</span>
curl -X POST http://localhost:3001/api/v1/<span class="hljs-built_in">jobs</span> \
  -H <span class="hljs-string">"Content-Type: application/json"</span> \
  -d <span class="hljs-string">'{"command": "uptime"}'</span>

<span class="hljs-comment"># Check job results</span>
curl http://localhost:3001/api/v1/<span class="hljs-built_in">jobs</span>?<span class="hljs-built_in">limit</span>=5
</code></pre>
<p>What's satisfying is watching the mesh adapt to changes. Kill a node and others remove it from their peer tables after 30 seconds. Restart it and it rejoins automatically.</p>
<h2 id="heading-performance-and-resilience">Performance and Resilience</h2>
<p>A few things I learned while building this:</p>
<p><strong>UDP Reliability</strong>: Lost heartbeat packets are actually fine. Since nodes broadcast every 5 seconds, temporary packet loss doesn't matter. The mesh heals itself quickly.</p>
<p><strong>Resource Usage</strong>: SQLite handles hundreds of jobs without issues. The UDP overhead is minimal - heartbeat messages are ~100 bytes compressed.</p>
<p><strong>Graceful Degradation</strong>: If nodes can't communicate, they continue working independently. When network connectivity returns, they resync automatically.</p>
<p><strong>Job Timeouts</strong>: Using Go's context cancellation, jobs that exceed their timeout get killed cleanly without orphaned processes.</p>
<p><strong>Concurrent Safety</strong>: All peer table updates use mutexes. Job queues use channels for thread-safe communication between goroutines.</p>
<h2 id="heading-whats-missing-future-work">What's Missing (Future Work)</h2>
<p>This is just phase 1. Here's what I'm considering next:</p>
<p><strong>Cross-Node Job Distribution</strong>: Currently jobs run locally. Next phase will let you submit jobs to specific remote nodes.</p>
<p><strong>Job Result Broadcasting</strong>: When nodes complete jobs, broadcast results to the entire mesh for better visibility.</p>
<p><strong>Load Balancing</strong>: Distribute jobs automatically based on node capacity and current workload.</p>
<p><strong>Security</strong>: Add TLS encryption for production use. Authentication between nodes.</p>
<p><strong>Web UI</strong>: A simple dashboard showing mesh topology, job history, and real-time status.</p>
<p><strong>gRPC Integration</strong>: While UDP works great for discovery, gRPC might be better for larger job payloads.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753085992536/c569d529-51cd-46a3-8aff-b3fb02e5bba6.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-key-takeaways">Key Takeaways</h2>
<p><strong>Protocol Buffers are Worth It</strong>: The performance and versioning benefits are significant. Generated Go code is clean and type-safe.</p>
<p><strong>UDP for Discovery Works</strong>: Don't overcomplicate service discovery. UDP broadcast is simple and effective for local networks.</p>
<p><strong>SQLite is Underrated</strong>: For single-node storage, SQLite handles concurrent reads/writes beautifully. No need for external databases.</p>
<p><strong>Go's Concurrency Shines</strong>: Goroutines and channels make concurrent programming straightforward. The job queue pattern is elegant.</p>
<p><strong>Zero-Config is Achievable</strong>: With some thought, you can eliminate most configuration requirements. Nodes really can "just work."</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>Building this worker mesh taught me that distributed systems don't have to be complex. Sometimes the simplest approach - nodes talking directly to each other - works better than elaborate orchestration frameworks.</p>
<p>The combination of Go's concurrency, Protocol Buffers' efficiency, and UDP's simplicity creates a surprisingly powerful foundation for distributed computing.</p>
<p>Whether you're distributing CI/CD jobs, processing data across edge nodes, or running distributed tests, the patterns here provide a solid starting point.</p>
<p>The complete code is available on GitHub if you want to experiment with your own mesh. I'd love to hear about any interesting use cases or improvements you come up with.</p>
<p>Next time you're tempted to reach for a heavy orchestration framework, consider: do your nodes really need a central coordinator, or could they just talk to each other?</p>
<p><code>⚠️ This is not a perfect approach. I’m still actively learning, experimenting, and refining this system. If you’re a distributed systems engineer, protocol geek, or just curious — I’d love to hear your feedback, questions, or ideas. Let’s build and learn together.</code></p>
]]></content:encoded></item></channel></rss>