Skip to content

Commit fdcc5da

Browse files
authored
V222 (#145)
1 parent 574e371 commit fdcc5da

16 files changed

+302
-838
lines changed

ChangeLog.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
#### [v2.2.2](https://github.com/ergo-services/ergo/releases/tag/v1.999.222) 2023-03-01 [tag version v1.999.222] ####
8+
9+
* Introduced `gen.Pool`. This behavior implements a basic design pattern with a pool of workers. All messages/requests received by the pool process are forwarded to the workers using the "Round Robin" algorithm. The worker process is automatically restarting on termination. See example here [examples/genpool](https://github.com/ergo-services/examples/tree/master/genpool)
10+
* Removed Erlang RPC support. A while ago Erlang has changed the way of handling this kind of request making this feature more similar to the regular `gen.Server`. So, there is no reason to keep supporting it. Use a regular way of messaging instead - `gen.Server`.
11+
* Fixed issue #130 (`StartType` option in `gen.ApplicationSpec` is ignored for the autostarting applications)
12+
* Fixed issue #143 (incorrect cleaning up the aliases belonging to the terminated process)
13+
714
#### [v2.2.1](https://github.com/ergo-services/ergo/releases/tag/v1.999.221) 2023-01-18 [tag version v1.999.221] ####
815

916
* Now you can join your services made with Ergo Framework into a single cluster with transparent networking using our **Cloud Overlay Network** where they can connect to each other smoothly, no matter where they run - AWS, Azure or GCP, or anywhere else. All these connections are secured with end-to-end encryption. Read more in this article [https://https://medium.com/@ergo-services/cloud-overlay-network](https://https://medium.com/@ergo-services/cloud-overlay-network). Here is an example of this feature in action [examples/cloud](https://github.com/ergo-services/examples/tree/master/cloud)
@@ -106,7 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106113
* Fixed Atom Cache race conditioned issue #54
107114
* Fixed ETF encoder issues #64 #66
108115

109-
#### [1.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.2.0) - 2021-04-07 ####
116+
#### [v1.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.2.0) - 2021-04-07 [tag version v1.2.0] ####
110117

111118
* Added TLS support. Introduced new option `TLSmode` in `ergo.NodeOptions` with the following values:
112119
- `ergo.TLSmodeDisabled` default value. encryption is disabled
@@ -126,14 +133,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
126133
* Fixed issue with termination linked processes
127134
* Fixed platform-dependent issues. Now Ergo Framework has tested and confirmed support of Linux, MacOS, Windows.
128135

129-
#### [1.1.0](https://github.com/ergo-services/ergo/releases/tag/1.1.0) - 2020-04-23 ####
136+
#### [v1.1.0](https://github.com/ergo-services/ergo/releases/tag/v1.1.0) - 2020-04-23 [tag version v1.1.0] ####
130137

131138
* Fragmentation support (which was introduced in Erlang/OTP 22)
132139
* Completely rewritten network subsystem (DIST/ETF).
133140
* Improved performance in terms of network messaging (outperforms original Erlang/OTP up to x5 times. See [Benchmarks](#benchmarks))
134141

135-
#### [1.0.0](https://github.com/ergo-services/ergo/releases/tag/1.0.0) - 2020-03-03 ####
136-
## There is a bunch of changes we deliver with this release
142+
#### [v1.0.0](https://github.com/ergo-services/ergo/releases/tag/1.0.0) - 2020-03-03 [tag version 1.0.0] ####
137143

138144
* We have changed the name - Ergo (or Ergo Framework). GitHub's repo has been
139145
renamed as well. We also created cloned repo `ergonode` to support users of
@@ -149,7 +155,7 @@ the new one.
149155
* Improved ETF TermIntoStruct decoder
150156
* Improved code structure and readability
151157

152-
#### [0.2.0](https://github.com/ergo-services/ergo/releases/tag/0.2.0) - 2019-02-23 ####
158+
#### [v0.2.0](https://github.com/ergo-services/ergo/releases/tag/0.2.0) - 2019-02-23 [tag version 0.2.0] ####
153159
* Now we make versioning releases
154160
* Improve node creation. Now you can specify the listening port range. See 'Usage' for details
155161
* Add embedded EPMD. Trying to start internal epmd service on starting ergonode.

README.md

+26-42
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,30 @@ The goal of this project is to leverage Erlang/OTP experience with Golang perfor
1919

2020
### Cloud ###
2121

22-
You can join your services made with Ergo Framework into a single cluster with transparent networking using our **Cloud Overlay Network** where they can connect to each other smoothly, no matter where they run - AWS, Azure or GCP, or anywhere else. All these connections are secured with end-to-end encryption. Read more in this article [https://blog.ergo.services/cloud-overlay-network-3a133d47efe5](https://blog.ergo.services/cloud-overlay-network-3a133d47efe5).
22+
Distributed Cloud is coming. With Ergo Framework you can join your services into a single cluster with transparent networking using our **Cloud Overlay Network** where they can connect to each other smoothly, no matter where they run - AWS, Azure or GCP, or anywhere else. All these connections are secured with end-to-end encryption. Read more in this article [https://blog.ergo.services/cloud-overlay-network-3a133d47efe5](https://blog.ergo.services/cloud-overlay-network-3a133d47efe5).
2323

2424
### Features ###
2525

2626
![image](https://user-images.githubusercontent.com/118860/113710255-c57d5500-96e3-11eb-9970-20f49008a990.png)
2727

28-
* Support Erlang 25 (including [Alias](https://blog.erlang.org/My-OTP-24-Highlights/#eep-53-process-aliases) and [Remote Spawn](https://blog.erlang.org/OTP-23-Highlights/#distributed-spawn-and-the-new-erpc-module) features)
28+
* Support Erlang 25 - allows you connect your node to (and accept connection from) any Erlang/Elixir node within a cluster
2929
* Spawn Erlang-like processes
3030
* Register/unregister processes with simple atom
31-
* `gen.Server` behavior support (with atomic state)
32-
* `gen.Supervisor` behavior support with all known [restart strategies](https://erlang.org/doc/design_principles/sup_princ.html#restart-strategy) support
33-
* One For One
34-
* One For All
35-
* Rest For One
36-
* Simple One For One
37-
* `gen.Application` behavior support with all known [starting types](https://erlang.org/doc/design_principles/applications.html#application-start-types) support
38-
* Permanent
39-
* Temporary
40-
* Transient
41-
* `gen.Stage` behavior support (originated from Elixir's [GenStage](https://hexdocs.pm/gen_stage/GenStage.html)). 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](https://github.com/ergo-services/examples/tree/master/genstage) or just run `go run ./examples/genstage` to see it in action
42-
* `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](https://github.com/ergo-services/examples/tree/master/gensaga).
43-
* `gen.Raft` behavior support. It's improved implementation of [Raft consensus algorithm](https://raft.github.io). 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](https://github.com/ergo-services/examples/tree/master/genraft).
44-
* Connect to (accept connection from) any Erlang/Elixir node within a cluster
45-
* Making sync request `ServerProcess.Call`, async - `ServerProcess.Cast` or `Process.Send` in fashion of `gen_server:call`, `gen_server:cast`, `erlang:send` accordingly
46-
* Monitor processes/nodes, local/remote
47-
* Link processes local/remote
48-
* RPC callbacks support
49-
* [embedded EPMD](#epmd) (in order to get rid of erlang' dependencies)
50-
* Unmarshalling terms into the struct using `etf.TermIntoStruct`, `etf.TermProplistIntoStruct` or to the string using `etf.TermToString`
51-
* Custom marshaling/unmarshaling via `Marshal` and `Unmarshal` interfaces
31+
* Set of ready-to-use disign patterns (behaviors)
32+
* `gen.Server` behavior with atomic state and Erlang's gen_server support to make sync request `ServerProcess.Call`, async - `ServerProcess.Cast` or `Process.Send` in fashion of `gen_server:call`, `gen_server:cast`, `erlang:send` accordingly
33+
* `gen.Supervisor` behavior with all known [restart strategies](https://erlang.org/doc/design_principles/sup_princ.html#restart-strategy) (One For One, One For All, Rest For One, Simple One For One)
34+
* `gen.Application` behavior with all known [starting types](https://erlang.org/doc/design_principles/applications.html#application-start-types) (Permanent, Temporary, Transient)
35+
* `gen.Pool` a basic design pattern with a pool of workers. All messages/requests received by the pool process are forwarded to the workers using the "Round Robin" algorithm. The worker process is automatically restarting on termination
36+
* `gen.TCP` - socket acceptor pool for TCP protocols. This behavior aims to provide everything you need to accept TCP connections and process packets with a small code base and low latency while being easy to use.
37+
* `gen.UDP` - acceptor pool for UDP protocols. This behavior provides the same feature set as TCP but for handling UDP packets using pool of handlers
38+
* `gen.Web` - Web API Gateway behavior. This behavior allows you to listen HTTP port and handle HTTP-request using pool of workers.
39+
* `gen.Stage` behavior support (originated from Elixir's [GenStage](https://hexdocs.pm/gen_stage/GenStage.html)). 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](https://github.com/ergo-services/examples/tree/master/genstage) or just run `go run ./examples/genstage` to see it in action
40+
* `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](https://github.com/ergo-services/examples/tree/master/gensaga).
41+
* `gen.Raft` behavior support. It's improved implementation of [Raft consensus algorithm](https://raft.github.io). 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](https://github.com/ergo-services/examples/tree/master/genraft)
42+
* Monitor processes/nodes, local/remote with Erlang support
43+
* Link processes local/remote with Erlang support
44+
* [embedded EPMD](#epmd) (in order to get rid of erlang' dependencies) with Erlang support
45+
* Unmarshalling terms into the struct using `etf.TermIntoStruct`, `etf.TermProplistIntoStruct` or to the string using `etf.TermToString` including custom marshaling/unmarshaling via `Marshal` and `Unmarshal` interfaces. But it's highly recommended to use `etf.RegisterType` so you will be receiving messages in a native Golang-type
5246
* Encryption (TLS 1.3) support (including autogenerating self-signed certificates)
5347
* Compression support (with customization of compression level and threshold). It can be configured for the node or a particular process.
5448
* Proxy support with end-to-end encryption, includeing compression/fragmentation/linking/monitoring features.
@@ -67,6 +61,13 @@ Golang introduced [v2 rule](https://go.dev/blog/v2-go-modules) a while ago to so
6761

6862
Here are the changes of latest release. For more details see the [ChangeLog](ChangeLog.md)
6963

64+
#### [v2.2.2](https://github.com/ergo-services/ergo/releases/tag/v1.999.222) 2023-03-01 [tag version v1.999.222] ####
65+
66+
* Introduced `gen.Pool`. This behavior implements a basic design pattern with a pool of workers. All messages/requests received by the pool process are forwarded to the workers using the "Round Robin" algorithm. The worker process is automatically restarting on termination. See example here [examples/genpool](https://github.com/ergo-services/examples/tree/master/genpool)
67+
* Removed Erlang RPC support. A while ago Erlang has changed the way of handling this kind of request making this feature more similar to the regular `gen.Server`. So, there is no reason to keep supporting it. Use a regular way of messaging instead - `gen.Server`.
68+
* Fixed issue #130 (`StartType` option in `gen.ApplicationSpec` is ignored for the autostarting applications)
69+
* Fixed issue #143 (incorrect cleaning up the aliases belonging to the terminated process)
70+
7071
#### [v2.2.1](https://github.com/ergo-services/ergo/releases/tag/v1.999.221) 2023-02-01 [tag version v1.999.221] ####
7172

7273
* Now you can join your services made with Ergo Framework into a single cluster with transparent networking using our **Cloud Overlay Network** where they can connect to each other smoothly, no matter where they run - AWS, Azure or GCP, or anywhere else. All these connections are secured with end-to-end encryption. Read more in this article [https://blog.ergo.services/cloud-overlay-network-3a133d47efe5](https://blog.ergo.services/cloud-overlay-network-3a133d47efe5). Here is an example of this feature in action [examples/cloud](https://github.com/ergo-services/examples/tree/master/cloud)
@@ -81,24 +82,6 @@ Here are the changes of latest release. For more details see the [ChangeLog](Cha
8182
* Fixed #117 (incorrect hanshake process finalization)
8283
* Fixed #139 (panic of the gen.Stage partition dispatcher)
8384

84-
#### [v2.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.220) 2022-10-18 [tag version v1.999.220] ####
85-
86-
* Introduced `gen.Web` behavior. It implements **Web API Gateway pattern** is also sometimes known as the "Backend For Frontend" (BFF). See example [examples/genweb](https://github.com/ergo-services/examples/tree/master/genweb)
87-
* Introduced `gen.TCP` behavior - **socket acceptor pool for TCP protocols**. It provides everything you need to accept TCP connections and process packets with a small code base and low latency. Here is simple example [examples/gentcp](https://github.com/ergo-services/examples/tree/master/gentcp)
88-
* Introduced `gen.UDP` - the same as `gen.TCP`, but for UDP protocols. Example is here [examples/genudp](https://github.com/ergo-services/examples/tree/master/genudp)
89-
* Introduced **Events**. This is a simple pub/sub feature within a node - any `gen.Process` can become a producer by registering a new event `gen.Event` using method `gen.Process.RegisterEvent`, while the others can subscribe to these events using `gen.Process.MonitorEvent`. Subscriber process will also receive `gen.MessageEventDown` if a producer process went down (terminated). This feature behaves in a monitor manner but only works within a node. You may also want to subscribe to a system event - `node.EventNetwork` to receive event notification on connect/disconnect any peers. Here is simple example of this feature [examples/events](https://github.com/ergo-services/examples/tree/master/events)
90-
* Introduced **Cloud Client** - allows connecting to the cloud platform [https://ergo.sevices](https://ergo.services). You may want to register your email there, and we will inform you about the platform launch day
91-
* Introduced **type registration** for the ETF encoding/decoding. This feature allows you to get rid of manually decoding with `etf.TermIntoStruct` for the receiving messages. Register your type using `etf.RegisterType(...)`, and you will be receiving messages in a native type
92-
* Predefined set of errors has moved to the `lib` package
93-
* Updated `gen.ServerBehavior.HandleDirect` method (got extra argument `etf.Ref` to distinguish the requests). This change allows you to handle these requests asynchronously using method `gen.ServerProcess.Reply(...)`
94-
* Updated `node.Options`. Now it has field `Listeners` (type `node.Listener`). It allows you to start any number of listeners with custom options - `Port`, `TLS` settings, or custom `Handshake`/`Proto` interfaces
95-
* Fixed build on 32-bit arch
96-
* Fixed freezing on ARM arch #102
97-
* Fixed problem with encoding negative int8
98-
* Fixed #103 (there was an issue on interop with Elixir's GenStage)
99-
* Fixed node stuck on start if it uses the name which is already taken in EPMD
100-
* Fixed incorrect `gen.ProcessOptions.Context` handling
101-
10285
### Benchmarks ###
10386

10487
Here is simple EndToEnd test demonstrates performance of messaging subsystem
@@ -224,6 +207,7 @@ See [https://github.com/ergo-services/examples](https://github.com/ergo-services
224207
* [gen.Application](https://github.com/ergo-services/examples/tree/master/application)
225208
* [gen.Supervisor](https://github.com/ergo-services/examples/tree/master/supervisor)
226209
* [gen.Server](https://github.com/ergo-services/examples/tree/master/genserver)
210+
* [gen.Pool](https://github.com/ergo-services/examples/tree/master/genpool)
227211
* [gen.Stage](https://github.com/ergo-services/examples/tree/master/genstage)
228212
* [gen.Saga](https://github.com/ergo-services/examples/tree/master/gensaga)
229213
* [gen.Raft](https://github.com/ergo-services/examples/tree/master/genraft)
@@ -307,4 +291,4 @@ is your company using Ergo? add your company logo/name here
307291

308292
### Commercial support
309293

310-
please, visit https://ergo.services for more information
294+
please, contact ceo@ergo.services for more information

0 commit comments

Comments
 (0)