
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
This project aims 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.Serverbehavior support (with atomic state)gen.Supervisorbehavior support with all known restart strategies support- One For One
- One For All
- Rest For One
- Simple One For One
gen.Applicationbehavior support with all known starting types support- Permanent
- Temporary
- Transient
gen.Stagebehavior support (originated from Elixir’s GenStage). This is abstraction built on top ofgen.Serverto 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 rungo run ./examples/genstageto see it in actiongen.Sagabehavior 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.Sagaalso 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.gen.Raftbehavior support. It’s improved implementation of Raft consensus algorithm. The key improvement is using quorum under the hood to manage the leader election process and make the Raft cluster more reliable. This implementation supports quorums of 3, 5, 7, 9, or 11 quorum members. Here is an example of this feature examples/genraft.- Connect to (accept connection from) any Erlang/Elixir node within a cluster
- Making sync request
ServerProcess.Call, async –ServerProcess.CastorProcess.Sendin fashion ofgen_server:call,gen_server:cast,erlang:sendaccordingly - Monitor processes/nodes, local/remote
- Link processes local/remote
- RPC callbacks support
- embedded EPMD (in order to get rid of erlang’ dependencies)
- Unmarshalling terms into the struct using
etf.TermIntoStruct,etf.TermProplistIntoStructor to the string usingetf.TermToString - Custom marshaling/unmarshaling via
MarshalandUnmarshalinterfaces - Encryption (TLS 1.3) support (including autogenerating self-signed certificates)
- Compression support (with customization of compression level and threshold). It can be configured for the node or a particular process.
- Proxy support with end-to-end encryption, includeing compression/fragmentation/linking/monitoring features.
- Tested and confirmed support Windows, Darwin (MacOS), Linux, FreeBSD.
- Zero dependencies. All features are implemented using the standard Golang library.
There is no ads to display, Please add some
