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 with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. · GitHub

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 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. · 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!

Where Next?

Popular in Discussions Top

WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
laiboonh
Hi all, I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider us...
New
thojanssens1
It would be nice to be able to define a redirect from one route to another from the router.ex file. E.g.: redirect "/", UserController, ...
New
pillaiindu
In django there is a cache framework backed by memcached. Rails also puts a lot of emphasis on caching, and even the idea of russian-doll...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
100phlecs
Are there any downsides, like perf issues, to putting all functional components in CoreComponents as long as you prefix it with the conte...
New
sashaafm
Piggy backing a bit on @dvcrn topic BEAM optimization for functions with static return type?, I’ve been trying to understand in a deeper ...
New

Other popular topics Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31194 112
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

We're in Beta

About us Mission Statement