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 patternsgen.Server, gen.Supervisor, gen.Application which makes you able to create distributed, high performance and reliable microservice solutions having native integration with Erlang infrastructure.
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)
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.
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.
Yes, from what I understood it does, I’m also quite excited about it.
From my own perspective I don’t think this project is able totally replace Beam VM, at least before golang gets immutability and total process (goroutines) isolation (it doesn’t do both, right? not quite sure about the last part, but it shouldn’t). But it would help to add “computation” nodes which can handle heavy calculations and the main part would do the rest.
https://docs.ergo.services/ is basically the GitHub readme and then nothing but a skeleton of topic headings with no content.
Is the assumption that someone hoping to use this would be expert enough in both Elixir and Golang to just translate Elixir and OTP docs into Ergo?
The name “Ergo”, while being both catchy and semantically accurate, is unfortunately eclipsed in Google searches by the Ergo platform for blockchain.
Does Ergo implement (or inherit from Go) any kind of work-stealing scheduling or reductions like the Beam or lunatic, or do functions run to completion without interruption?
I’ve been meaning to try Ergo for months and things are finally starting to come to the point where I’ll have the time – and I have the perfect project for it.