$ show ergo-services/ergo
Ergo Framework is a Go implementation of the Erlang/OTP actor model for building concurrent, distributed, and fault-tolerant systems. It provides a complete actor runtime with processes, supervision trees, message passing (local and remote), service discovery, and network transparency. The architecture is library-based: applications import the framework and define actors, supervisors, and applications. Key entry points include `ergo.StartNode()` and the `gen`, `act`, `meta`, and `net` packages. The framework has zero core dependencies and uses a custom binary serialization (EDF) for inter-node communication. It is production-grade, with extensive testing, documentation, and a growing ecosystem of extra libraries (registrars, loggers, meta-processes). The codebase demonstrates high craftsmanship with lock-free data structures, efficient buffer pooling, and well-abstracted patterns. The last commit date appears anomalous (2026-09-04), but the repository is actively maintained with many stars and forks.
The LLM identified 4 files worth highlighting for reuse:
Implements a lock-free multi-producer single-consumer queue using atomic operations. Used as the core mailbox for actor processes. The implementation is self-contained, with no external dependencies beyond the standard library, and can be extracted and reused in any Go project requiring a high-performance, bounded MPSC queue.
Provides a dynamic byte buffer with a sync.Pool-based allocator to reduce garbage collection pressure. Supports reading/writing primitives, strings, and byte slices. The buffer is used extensively throughout the framework for serialization and network I/O. It is a standalone utility that can be extracted for any Go project needing efficient byte buffer management.
Implements a bidirectional map (BiMap) that allows lookup by either key or value. Used for caching atoms, types, and errors in the EDF serialization layer. The implementation is generic (using Go interfaces) and thread-safe via sync.RWMutex. It is a reusable data structure suitable for any project requiring inverse lookups.
The EDF (Erlang Data Format) package provides a complete binary serialization framework with support for all Go primitives, slices, maps, structs, and custom marshaling. It includes type registration, atom/type/error caching, and compression (GZIP, ZLIB, LZW). The encoder and decoder are self-contained (depending only on lib/buffer and lib/bimap) and can be extracted as a standalone serialization library for Go.