heathen

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.Server behavior support (with atomic state)
  • gen.Supervisor behavior support with all known restart strategies support
    • One For One
    • One For All
    • Rest For One
    • Simple One For One
  • gen.Application behavior support with all known starting types support
    • Permanent
    • Temporary
    • Transient
  • gen.Stage behavior support (originated from Elixir’s GenStage). This is abstraction built on top of gen.Server to 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 run go run ./examples/genstage to see it in action
  • gen.Saga behavior 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.Saga also 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.Cast or Process.Send in fashion of gen_server:call, gen_server:cast, erlang:send accordingly
  • 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.TermProplistIntoStruct or to the string using etf.TermToString
  • Custom marshaling/unmarshaling via Marshal and Unmarshal interfaces
  • Encryption (TLS 1.3) support (including autogenerating self-signed certificates)
  • Tested and confirmed support Windows, Darwin (MacOS), Linux, FreeBSD.

2025 Update:

Most Liked

halturin

halturin

Thanks for the mention my project here :+1:

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 for creating microservices using technologies and design patterns of Erlang/OTP in Golang

Happy coding :v:

10
Post #5
marcin

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

halturin

I’m proudly announce the next release - Ergo Framework 2.2 with key features:

:white_check_mark: New behaviors: gen.Web, gen.TCP, gen.UDP
:white_check_mark: Type registration
:white_check_mark: Events (a simple pub/sub feature for the local processes)

Full changelog: GitHub - ergo-services/ergo: an actor based Framework for creating microservices using technologies and design patterns of Erlang/OTP in Golang

halturin

halturin

In case you wondered how it is going …

Ergo Framework 3.0 has been released. A bunch of new stuff there… see changelog GitHub - ergo-services/ergo: An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.

halturin

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

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. This makes it easier than ever to build hybrid systems combining the best of Go’s performance with Erlang/Elixir’s proven concurrency model!

Where Next?

Popular in Discussions Top

cjbottaro
I’ve been primarily doing Elixir development for the past 6 years or so, and during that time whole heartedly committed to functional par...
New
jeramyRR
Is it really necessary for the compiler to spit out a warning about using @doc with private functions? I don’t want to have to document ...
New
AstonJ
Inspired by @dogweather’s thread about Active Record Doctor, have you seen any impressive or cool things in other non-BEAM languages or f...
New
stefannovak
Hi all, I’m going to be giving a little 20 minute tech talk at my company which uses .NET C# across all of our 100ish size IT team. I’m ...
New
New
bartblast
Hey there! :slight_smile: I’m working on updating the Hologram website home page and would love to get your input. Current situation: ...
New
bartblast
Added by a user on X: https://x.com/aldicodes/status/1952095492139299036
New
matreyes
I haven’t seen this paper being discussed by the community, but I think this makes Elixir more relevant than ever. TLDR; The paper...
New
karlosmid
The |> operator appears in many languages, mostly in the functional world. F# has essentially the exact same operator, as does OCaml. ...
New
AstonJ
Inspired by Andrew’s post in another thread about types: If the main benefit of static typing is to catch errors, and most people think...
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New

We're in Beta

About us Mission Statement