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

rump13
Hi everyone, I’ve been following Elixir since around 2016 and tinkering with it on and off, but I haven’t had the opportunity to use it ...
New
James_E
I see that the current ExUnit source code has support for rich failure messages on a small whitelist of “recognized” assertion patterns, ...
New
derpycoder
So, anyone got a chance to look at this?!? I’m kind of glad this came along. We can just throw this into our Auth pages and won’t have t...
New
marciol
Thinking about how Contexts on Phoenix 1.3 are beautiful in the simplicity, elegance and minimalism, coalesced in the smallest unity of E...
New
puemos
I’m working on a platform that allows users to add apps and use them in a writing assistant browser extension (https://anycursor.com). C...
New
New
karlosmid
The |> operator appears in many languages, mostly in the functional world. F# has essentially the exact same operator, as does OCaml. ...
New
bartblast
I recently started a discussion about reactive patterns in Hologram, but I realized I need to step back and design the composability arch...
New
bartblast
It’s time to implement JavaScript interop for Hologram! Eventually, there will be Hologram wrappers for most APIs, but sometimes we’ll n...
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

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
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
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
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement