heathen
Ergo: a framework for creating microservices using technologies and design patterns of Erlang/OTP in Golang
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use together with Elixir or even migrate to more performant language if it would offer similar to OTP features and reliability?
P.S. I don’t have any connection to this project or its authors, I saw it in yesterday’s article selection in Google app on my phone.
Ergo
Technologies and design patterns of Erlang/OTP have been proven over the years. Now in Golang. Up to x5 times faster than original Erlang/OTP in terms of network messaging. The easiest way to create an OTP-designed application in Golang.
Purpose
The goal of this project is to leverage Erlang/OTP experience with Golang performance. Ergo Framework implements DIST protocol, ETF data format and OTP design patterns gen.Server, gen.Supervisor, gen.Application which makes you able to create distributed, high performance and reliable microservice solutions having native integration with Erlang infrastructure.
Features
- Support Erlang 24 (including Alias and Remote Spawn features)
- Spawn Erlang-like processes
- Register/unregister processes with simple atom
gen.Serverbehavior support (with atomic state)gen.Supervisorbehavior support with all known restart strategies support- One For One
- One For All
- Rest For One
- Simple One For One
gen.Applicationbehavior support with all known starting types support- Permanent
- Temporary
- Transient
gen.Stagebehavior support (originated from Elixir’s GenStage). This is abstraction built on top ofgen.Serverto provide a simple way to create a distributed Producer/Consumer architecture, while automatically managing the concept of backpressure. This implementation is fully compatible with Elixir’s GenStage. Example is here examples/genstage or just rungo run ./examples/genstageto see it in actiongen.Sagabehavior support. It implements Saga design pattern - a sequence of transactions that updates each service state and publishes the result (or cancels the transaction or triggers the next transaction step).gen.Sagaalso provides a feature of interim results (can be used as transaction progress or as a part of pipeline processing), time deadline (to limit transaction lifespan), two-phase commit (to make distributed transaction atomic). Here is example examples/gensaga.- Connect to (accept connection from) any Erlang node within a cluster
- Making sync request
ServerProcess.Call, async -ServerProcess.CastorProcess.Sendin fashion ofgen_server:call,gen_server:cast,erlang:sendaccordingly - Monitor processes/nodes
- local → local
- local → remote
- remote → local
- Link processes
- local ↔ local
- local ↔ remote
- remote ↔ local
- RPC callbacks support
- embedded EPMD (in order to get rid of erlang’ dependencies)
- Experimental observer support
- Unmarshalling terms into the struct using
etf.TermIntoStruct,etf.TermProplistIntoStructor to the string usingetf.TermToString - Custom marshaling/unmarshaling via
MarshalandUnmarshalinterfaces - Encryption (TLS 1.3) support (including autogenerating self-signed certificates)
- Tested and confirmed support Windows, Darwin (MacOS), Linux, FreeBSD.
2025 Update:
Most Liked
halturin
Thanks for the mention my project here ![]()
I’ve released the next version of Ergo Framework 2.1.0 with cool features (compression, proxy, etc..) . Full changelog is here GitHub - ergo-services/ergo: An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. · GitHub
Happy coding ![]()
marcin
Amazing that OTP paradigm is winning new hearts and minds!
I think it also depends on the taste in programming language - which one lets you express your idea with more ease.
Elixir is also a functional language with features and design like patter matching, tail recursion and focus on simple data types (lists/tuples/maps). I personally would be missing these features if I switched to Golang.
Do I understand that ergo provides some sort of binary compatibility so you could have a cluster of elixir and golang nodes? That’s very cool.
halturin
I’m excited to announce Ergo Framework v3.1.0, bringing significant enhancements to Go’s actor model implementation with great news for the Erlang/Elixir community.
Major Highlight for Erlang/Elixir Developers
Erlang Network Stack License Change: The Erlang protocol implementation has been moved back from BSL 1.1 to MIT license, making it freely available for all commercial and open-source projects. This means seamless interoperability between your Go services built with Ergo and existing Erlang/Elixir systems without licensing concerns.
Key Features in this release
Core Enhancements:
- Cron Scheduler for time-based task execution with standard cron expressions
- Port Meta Process for managing external OS processes with bidirectional communication
- Unit Testing Framework for isolated actor testing with event validation
- Enhanced Logging with JSON output and structured fields
External Library Ecosystem:
- All external libraries are now independent Go modules with separate dependency management
- New etcd Registrar for distributed service discovery with real-time cluster events
- Enhanced Observer with Applications page and Cron job monitoring
- EDF serialization performance now competitive with Protobuf while maintaining runtime reflection flexibility
- All tools consolidated under ergo.tools domain
Performance
Over 21M messages/sec locally and 5M messages/sec over network on 64-core systems. EDF serialization performs competitively with Protobuf across most data types.
Resources
- GitHub: GitHub - ergo-services/ergo: An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. · GitHub
- Documentation: https://docs.ergo.services
- Examples: GitHub - ergo-services/examples: examples for demonstrating Ergo Framework features · GitHub
- Benchmarks: GitHub - ergo-services/benchmarks: Benchmarks of the Ergo Framework 3.0 (and above) · GitHub
For detailed changelog see the README.md at GitHub - ergo-services/ergo: An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. · GitHub This makes it easier than ever to build hybrid systems combining the best of Go’s performance with Erlang/Elixir’s proven concurrency model!
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










