You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ChangeLog.md
+63
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,69 @@ All notable changes to this project will be documented in this file.
4
4
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
#### [v2.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.220) 2022-10-18 [tag version v1.999.220] ####
8
+
9
+
* Introduced `gen.Web` behavior. It implements **Web API Gateway pattern** is also sometimes known as the "Backend For Frontend" (BFF). See example [examples/genweb](examples/genweb)
10
+
* 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](examples/gentcp)
11
+
* Introduced `gen.UDP` - the same as `gen.TCP`, but for UDP protocols. Example is here [examples/genudp](examples/genudp)
12
+
* 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.
13
+
* 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
14
+
* 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
15
+
* Predefined set of errors has moved to the `lib` package
16
+
* 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(...)`
17
+
* 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
18
+
* Fixed build on 32-bit arch
19
+
* Fixed freezing on ARM arch #102
20
+
* Fixed problem with encoding negative int8
21
+
* Fixed #103 (there was an issue on interop with Elixir's GenStage)
22
+
* Fixed node stuck on start if it uses the name which is already taken in EPMD
-`SetCompressionThreshold(threshold int) bool`, `CompressionThreshold() int` messages smaller than the threshold will be sent with no compression. The default compression threshold is 1024 bytes.
33
+
-`node.Options`:
34
+
-`Compression` these settings are used as defaults for the spawning processes
35
+
- this feature will be ignored if the receiver is running on either the Erlang or Elixir node
36
+
* Introduced **proxy feature** support **with end-to-end encryption**.
37
+
-`node.Node` new methods:
38
+
-`AddProxyRoute(...)`, `RemoveProxyRoute(...)`
39
+
-`ProxyRoute(...)`, `ProxyRoutes()`
40
+
-`NodesIndirect()` returns list of connected nodes via proxy connection
41
+
-`node.Options`:
42
+
-`Proxy` for configuring proxy settings
43
+
- includes support (over the proxy connection): compression, fragmentation, link/monitor process, monitor node
44
+
- example [examples/proxy](examples/proxy).
45
+
- this feature is not available for the Erlang/Elixir nodes
46
+
* Introduced **behavior `gen.Raft`**. 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](examples/genraft).
47
+
* Introduced **interfaces to customize network layer**
48
+
-`Resolver` to replace EPMD routines with your solution (e.g., ZooKeeper or any other service registrar)
49
+
-`Handshake` allows customizing authorization/authentication process
50
+
-`Proto` provides the way to implement proprietary protocols (e.g., IoT area)
51
+
* Other new features:
52
+
-`gen.Process` new methods:
53
+
-`NodeUptime()`, `NodeName()`, `NodeStop()`
54
+
-`gen.ServerProcess` new method:
55
+
-`MessageCounter()` shows how many messages have been handled by the `gen.Server` callbacks
56
+
-`gen.ProcessOptions` new option:
57
+
-`ProcessFallback` allows forward messages to the fallback process if the process mailbox is full. Forwarded messages are wrapped into `gen.MessageFallback` struct. Related to issue #96.
58
+
-`gen.SupervisorChildSpec` and `gen.ApplicationChildSpec` got option `gen.ProcessOptions` to customize options for the spawning child processes.
59
+
* Improved sending messages by etf.Pid or etf.Alias: methods `gen.Process.Send`, `gen.ServerProcess.Cast`, `gen.ServerProcess.Call` now return `node.ErrProcessIncarnation` if a message is sending to the remote process of the previous incarnation (remote node has been restarted). Making monitor on a remote process of the previous incarnation triggers sending `gen.MessageDown` with reason `incarnation`.
60
+
* Introduced type `gen.EnvKey` for the environment variables
61
+
* All spawned processes now have the `node.EnvKeyNode` variable to get access to the `node.Node` value.
62
+
***Improved performance** of local messaging (**up to 8 times** for some cases)
63
+
***Important**`node.Options` has changed. Make sure to adjust your code.
64
+
* Fixed issue #89 (incorrect handling of Call requests)
65
+
* Fixed issues #87, #88 and #93 (closing network socket)
66
+
* Fixed issue #96 (silently drops message if process mailbox is full)
67
+
* Updated minimal requirement of Golang version to 1.17 (go.mod)
68
+
* We still keep the rule **Zero Dependencies**
69
+
7
70
#### [v2.0.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.200) 2021-10-12 [tag version v1.999.200] ####
8
71
9
72
* Added support of Erlang/OTP 24 (including [Alias](https://blog.erlang.org/My-OTP-24-Highlights/#eep-53-process-aliases) feature and [Remote Spawn](https://blog.erlang.org/OTP-23-Highlights/#distributed-spawn-and-the-new-erpc-module) introduced in Erlang/OTP 23)
Technologies and design patterns of Erlang/OTP have been proven over the years. Now in Golang.
12
11
Up to x5 times faster than original Erlang/OTP in terms of network messaging.
@@ -37,7 +36,7 @@ The goal of this project is to leverage Erlang/OTP experience with Golang perfor
37
36
* Transient
38
37
*`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](examples/genstage) or just run `go run ./examples/genstage` to see it in action
39
38
*`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](examples/gensaga).
40
-
*`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/raft](examples/raft).
39
+
*`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](examples/genraft).
41
40
* Connect to (accept connection from) any Erlang/Elixir node within a cluster
42
41
* Making sync request `ServerProcess.Call`, async - `ServerProcess.Cast` or `Process.Send` in fashion of `gen_server:call`, `gen_server:cast`, `erlang:send` accordingly
43
42
* Monitor processes/nodes, local/remote
@@ -64,50 +63,23 @@ Golang introduced [v2 rule](https://go.dev/blog/v2-go-modules) a while ago to so
64
63
65
64
Here are the changes of latest release. For more details see the [ChangeLog](ChangeLog.md)
66
65
67
-
#### [v2.1.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.210) 2022-04-19 [tag version v1.999.210] ####
68
-
69
-
* Introduced **compression feature** support. Here are new methods and options to manage this feature:
-`SetCompressionThreshold(threshold int) bool`, `CompressionThreshold() int` messages smaller than the threshold will be sent with no compression. The default compression threshold is 1024 bytes.
74
-
-`node.Options`:
75
-
-`Compression` these settings are used as defaults for the spawning processes
76
-
- this feature will be ignored if the receiver is running on either the Erlang or Elixir node
77
-
* Introduced **proxy feature** support **with end-to-end encryption**.
78
-
-`node.Node` new methods:
79
-
-`AddProxyRoute(...)`, `RemoveProxyRoute(...)`
80
-
-`ProxyRoute(...)`, `ProxyRoutes()`
81
-
-`NodesIndirect()` returns list of connected nodes via proxy connection
82
-
-`node.Options`:
83
-
-`Proxy` for configuring proxy settings
84
-
- includes support (over the proxy connection): compression, fragmentation, link/monitor process, monitor node
85
-
- example [examples/proxy](examples/proxy).
86
-
- this feature is not available for the Erlang/Elixir nodes
87
-
* Introduced **behavior `gen.Raft`**. 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/raft](examples/raft).
88
-
* Introduced **interfaces to customize network layer**
89
-
-`Resolver` to replace EPMD routines with your solution (e.g., ZooKeeper or any other service registrar)
90
-
-`Handshake` allows customizing authorization/authentication process
91
-
-`Proto` provides the way to implement proprietary protocols (e.g., IoT area)
92
-
* Other new features:
93
-
-`gen.Process` new methods:
94
-
-`NodeUptime()`, `NodeName()`, `NodeStop()`
95
-
-`gen.ServerProcess` new method:
96
-
-`MessageCounter()` shows how many messages have been handled by the `gen.Server` callbacks
97
-
-`gen.ProcessOptions` new option:
98
-
-`ProcessFallback` allows forward messages to the fallback process if the process mailbox is full. Forwarded messages are wrapped into `gen.MessageFallback` struct. Related to issue #96.
99
-
-`gen.SupervisorChildSpec` and `gen.ApplicationChildSpec` got option `gen.ProcessOptions` to customize options for the spawning child processes.
100
-
* Improved sending messages by etf.Pid or etf.Alias: methods `gen.Process.Send`, `gen.ServerProcess.Cast`, `gen.ServerProcess.Call` now return `node.ErrProcessIncarnation` if a message is sending to the remote process of the previous incarnation (remote node has been restarted). Making monitor on a remote process of the previous incarnation triggers sending `gen.MessageDown` with reason `incarnation`.
101
-
* Introduced type `gen.EnvKey` for the environment variables
102
-
* All spawned processes now have the `node.EnvKeyNode` variable to get access to the `node.Node` value.
103
-
***Improved performance** of local messaging (**up to 8 times** for some cases)
104
-
***Important**`node.Options` has changed. Make sure to adjust your code.
105
-
* Fixed issue #89 (incorrect handling of Call requests)
106
-
* Fixed issues #87, #88 and #93 (closing network socket)
107
-
* Fixed issue #96 (silently drops message if process mailbox is full)
108
-
* Updated minimal requirement of Golang version to 1.17 (go.mod)
109
-
* We still keep the rule **Zero Dependencies**
110
-
66
+
#### [v2.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.220) 2022-10-18 [tag version v1.999.220] ####
67
+
68
+
* Introduced `gen.Web` behavior. It implements **Web API Gateway pattern** is also sometimes known as the "Backend For Frontend" (BFF). See example [examples/genweb](examples/genweb)
69
+
* 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](examples/gentcp)
70
+
* Introduced `gen.UDP` - the same as `gen.TCP`, but for UDP protocols. Example is here [examples/genudp](examples/genudp)
71
+
* 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](examples/events)
72
+
* 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
73
+
* 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
74
+
* Predefined set of errors has moved to the `lib` package
75
+
* 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(...)`
76
+
* 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
77
+
* Fixed build on 32-bit arch
78
+
* Fixed freezing on ARM arch #102
79
+
* Fixed problem with encoding negative int8
80
+
* Fixed #103 (there was an issue on interop with Elixir's GenStage)
81
+
* Fixed node stuck on start if it uses the name which is already taken in EPMD
@@ -183,17 +155,9 @@ sources of these benchmarks are [here](https://github.com/halturin/ergobenchmark
183
155
184
156
The one thing that makes embedded EPMD different is the behavior of handling connection hangs - if ergo' node is running as an EPMD client and lost connection, it tries either to run its own embedded EPMD service or to restore the lost connection.
185
157
186
-
### Observer ###
187
-
188
-
It's a standard Erlang tool. Observer is a graphical tool for observing the characteristics of Erlang systems. The tool Observer displays system information, application supervisor trees, process information.
189
-
190
-
Here you can see this feature in action using one of the [examples](examples/):
191
-
192
-

193
-
194
158
### Examples ###
195
159
196
-
Code below is a simple implementation of gen.Server pattern [examples/simple](examples/simple)
160
+
Code below is a simple implementation of gen.Server pattern [examples/genserver](examples/genserver)
0 commit comments