After a year of development, the release of the Ergo 1.2 framework has been announced, implementing the full Erlang network stack and its OTP library in Go. The framework provides developers with flexible tools from the Erlang world to create distributed solutions in Go using ready-made design templates such as Application, Supervisor, and GenServer. Since there is no direct equivalent of Erlang processes in Go, goroutines are used for GenServer with a recover wrapper for handling exceptional situations. The project code is distributed under the MIT license.
In the new release:
- Support for TLS 1.3 has been implemented with the ability to auto-generate self-signed certificates (if connection encryption is needed but there is no requirement for authentication, since the connection uses cookies to grant access to the node).
- Static routing has been added to eliminate the need to call EPMD to determine the node's port. This addresses security concerns and, along with encryption, enables running the Erlang cluster in public networks.
- A new GenStage template (from the Elixir world) has been added, allowing the creation of Pub/Sub solutions without using a Message Bus. One of the key features of this template is 'backpressure control'. The 'Producer' will deliver exactly the amount of messages requested by the 'Consumer'. An implementation example can be viewed here.
The discussions section addresses the implementation of the SAGAS design pattern, which enables distributed transaction functionality.
Source: opennet.ru
