explaingit

ergo-services/ergo

4,553GoAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

A Go framework that brings the Erlang actor model to Go, letting you build distributed, fault-tolerant services where isolated components communicate by messages and supervisors automatically restart anything that fails.

Mindmap

mindmap
  root((ergo))
    Core concepts
      Actor model
      Message passing
      Network transparency
      Supervision trees
    Features
      Distributed nodes
      Pub/sub messaging
      Meta processes
      Zero dependencies
    Use cases
      Fault-tolerant services
      Distributed backends
      Self-healing workers
    Performance
      21M messages per sec
      No external deps
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a distributed backend where individual nodes can crash and restart without taking down the whole system

USE CASE 2

Replace a message broker by routing work between Go services using the built-in actor and pub/sub system

USE CASE 3

Add automatic self-healing to a background worker pipeline so crashed workers restart under a supervisor

USE CASE 4

Write a TCP or HTTP server that feeds incoming connections into an actor-based processing loop

Tech stack

Go

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires Go 1.20 or newer, familiarity with concurrent programming concepts is strongly recommended.

MIT License, use freely in any personal or commercial project.

In plain English

Ergo is a Go programming framework that brings ideas from Erlang, a language known for building systems that stay running even when parts fail. The core concept is the actor model: instead of shared memory that many parts of a program touch at once, you build a system of isolated actors that each have their own state and communicate only by sending messages to each other. This makes concurrent systems easier to reason about and test. A key property Ergo calls network transparency means an actor does not need to know whether it is talking to another actor on the same machine or one running on a server across the world. The framework handles routing, serialization, and connection management in the background, so application code is the same either way. This makes it practical to distribute work across multiple nodes without rewriting business logic. When parts of the system fail, supervision trees handle recovery. Supervisors watch groups of child actors and apply configurable restart strategies when one crashes: restart only that one, restart the whole group, or restart everything that started after the failure. These patterns come from Erlang's OTP design and are intended to build self-healing services. The README also describes meta processes, which act as adapters for blocking network protocols like TCP, UDP, and HTTP, feeding their events into the actor system without blocking the message processing loop. Built-in service discovery, distributed publish/subscribe messaging, and remote process spawning are included for multi-node setups. On a 64-core machine, the README reports over 21 million messages per second for local messaging and close to 5 million per second over the network. The framework has zero external dependencies, requires Go 1.20 or higher, and is released under the MIT license. A command-line tool for generating project scaffolding and a visual observer tool for inspecting running nodes are available separately.

Copy-paste prompts

Prompt 1
Using the ergo Go framework, show me how to define an actor with its own state and how to send messages to it from another actor.
Prompt 2
How do I set up a supervision tree in ergo so that if one worker actor crashes only that actor restarts instead of the whole group?
Prompt 3
Walk me through creating a two-node ergo cluster where actors on one machine can call actors on the other transparently.
Prompt 4
Compare ergo with standard Go goroutines and channels. When would I choose ergo instead of the built-in concurrency primitives?
Prompt 5
Show me how to use ergo's meta-process concept to accept TCP connections and feed them into the actor system.
Open on GitHub → Explain another repo

← ergo-services on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.