github.com/ergo-services/ergo@v1.999.224/ChangeLog.md (about)

     1  # Changelog
     2  All notable changes to this project will be documented in this file.
     3  
     4  This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
     5  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     6  
     7  #### [v2.2.4](https://github.com/ergo-services/ergo/releases/tag/v1.999.224) 2023-05-01 [tag version v1.999.224] ####
     8  
     9  This release includes fixes:
    10  - Fixed incorrect handling of `gen.SupervisorStrategyRestartTransient` restart strategy in `gen.Supervisor`
    11  - Fixed missing `ServerBehavior` in [`gen.Pool`, `gen.Raft`, `gen.Saga`, `gen.Stage`, `gen.TCP`, `gen.UDP`, `gen.Web`] behavior interfaces
    12  - Introduced the new tool for boilerplate code generation - `ergo` https://github.com/ergo-services/tools. You may read more information about this tool in our article with a great example https://blog.ergo.services/quick-start-1094d56d4e2
    13  
    14  #### [v2.2.3](https://github.com/ergo-services/ergo/releases/tag/v1.999.223) 2023-04-02 [tag version v1.999.223] ####
    15  
    16  This release includes fixes:
    17  - Improved `gen.TCP`. Issue #152
    18  - Fixed incorrect decoding registered map type using etf.RegisterType
    19  - Fixed race condition on process termination. Issue #153
    20  
    21  #### [v2.2.2](https://github.com/ergo-services/ergo/releases/tag/v1.999.222) 2023-03-01 [tag version v1.999.222] ####
    22  
    23  * 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)
    24  * 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`.
    25  * Fixed issue #130 (`StartType` option in `gen.ApplicationSpec` is ignored for the autostarting applications)
    26  * Fixed issue #143 (incorrect cleaning up the aliases belonging to the terminated process)
    27  
    28  #### [v2.2.1](https://github.com/ergo-services/ergo/releases/tag/v1.999.221) 2023-01-18 [tag version v1.999.221] ####
    29  
    30  * 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)
    31  * `examples` moved to https://github.com/ergo-services/examples
    32  * Added support Erlang OTP/25
    33  * Improved handling `nil` values for the registered types using `etf.RegisterType(...)`
    34  * Improved self-signed certificate generation
    35  * Introduced `ergo.debug` option that enables extended debug information for `lib.Log(...)`/`lib.Warning(...)`
    36  * Fixed `gen.TCP` and `gen.UDP` (missing callbacks)
    37  * Fixed ETF registering type with `etf.Pid`, `etf.Alias` or `etf.Ref` value types
    38  * Fixed Cloud client
    39  * Fixed #117 (incorrect hanshake process finalization)
    40  * Fixed #139 (panic of the gen.Stage partition dispatcher)
    41  
    42  #### [v2.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.220) 2022-10-18 [tag version v1.999.220] ####
    43  
    44  * 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)
    45  * 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)
    46  * 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)
    47  * 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.
    48  * 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
    49  * 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
    50  * Predefined set of errors has moved to the `lib` package
    51  * 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(...)`
    52  * 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
    53  * Fixed build on 32-bit arch
    54  * Fixed freezing on ARM arch #102
    55  * Fixed problem with encoding negative int8
    56  * Fixed #103 (there was an issue on interop with Elixir's GenStage)
    57  * Fixed node stuck on start if it uses the name which is already taken in EPMD
    58  * Fixed incorrect `gen.ProcessOptions.Context` handling
    59  
    60  
    61  #### [v2.1.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.210) 2022-04-19 [tag version v1.999.210] ####
    62  
    63  * Introduced **compression feature** support. Here are new methods and options to manage this feature:
    64    - `gen.Process`:
    65      - `SetCompression(enable bool)`, `Compression() bool`
    66      - `SetCompressionLevel(level int) bool`, `CompressionLevel() int`
    67      - `SetCompressionThreshold(threshold int) bool`, `CompressionThreshold() int` messages smaller than the threshold will be sent with no compression. The default compression threshold is 1024 bytes.
    68    - `node.Options`:
    69      - `Compression` these settings are used as defaults for the spawning processes
    70    - this feature will be ignored if the receiver is running on either the Erlang or Elixir node
    71  * Introduced **proxy feature** support **with end-to-end encryption**.
    72    - `node.Node` new methods:
    73      - `AddProxyRoute(...)`, `RemoveProxyRoute(...)`
    74      - `ProxyRoute(...)`, `ProxyRoutes()`
    75      - `NodesIndirect()` returns list of connected nodes via proxy connection
    76    - `node.Options`:
    77      - `Proxy` for configuring proxy settings
    78    - includes support (over the proxy connection): compression, fragmentation, link/monitor process, monitor node
    79    - example [examples/proxy](https://github.com/ergo-services/examples/tree/master/proxy).
    80    - this feature is not available for the Erlang/Elixir nodes
    81  * 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](https://github.com/ergo-services/examples/tree/master/genraft).
    82  * Introduced **interfaces to customize network layer**
    83    - `Resolver` to replace EPMD routines with your solution (e.g., ZooKeeper or any other service registrar)
    84    - `Handshake` allows customizing authorization/authentication process
    85    - `Proto` provides the way to implement proprietary protocols (e.g., IoT area)
    86  * Other new features:
    87    - `gen.Process` new methods:
    88      - `NodeUptime()`, `NodeName()`, `NodeStop()`
    89    - `gen.ServerProcess` new method:
    90      - `MessageCounter()` shows how many messages have been handled by the `gen.Server` callbacks
    91    - `gen.ProcessOptions` new option:
    92      - `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.
    93    - `gen.SupervisorChildSpec` and `gen.ApplicationChildSpec` got option `gen.ProcessOptions` to customize options for the spawning child processes.
    94  * 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`.
    95  * Introduced type `gen.EnvKey` for the environment variables
    96  * All spawned processes now have the `node.EnvKeyNode` variable to get access to the `node.Node` value.
    97  * **Improved performance** of local messaging (**up to 8 times** for some cases)
    98  * **Important** `node.Options` has changed. Make sure to adjust your code.
    99  * Fixed issue #89 (incorrect handling of Call requests)
   100  * Fixed issues #87, #88 and #93 (closing network socket)
   101  * Fixed issue #96 (silently drops message if process mailbox is full)
   102  * Updated minimal requirement of Golang version to 1.17 (go.mod)
   103  * We still keep the rule **Zero Dependencies**
   104  
   105  #### [v2.0.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.200) 2021-10-12 [tag version v1.999.200] ####
   106  
   107  * 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)
   108  * **Important**: This release includes refined API (without backward compatibility) for a more convenient way to create OTP-designed microservices. Make sure to update your code.
   109  * **Important**: Project repository has been moved to [https://github.com/ergo-services/ergo](https://github.com/ergo-services/ergo). It is still available on the old URL [https://github.com/halturin/ergo](https://github.com/halturin/ergo) and GitHub will redirect all requests to the new one (thanks to GitHub for this feature).
   110  * Introduced new behavior `gen.Saga`. 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).
   111  * Introduced new methods `Process.Direct` and `Process.DirectWithTimeout` to make direct request to the actor (`gen.Server` or inherited object). If an actor has no implementation of `HandleDirect` callback it returns `ErrUnsupportedRequest` as a error.
   112  * Introduced new callback `HandleDirect` in the `gen.Server` interface as a handler for requests made by `Process.Direct` or `Process.DirectWithTimeout`. It should be easy to interact with actors from outside.
   113  * Introduced new types intended to be used to interact with Erlang/Elixir
   114    * `etf.ListImproper` to support improper lists like `[a|b]` (a cons cell).
   115    * `etf.String` (an alias for the Golang string) encodes as a binary in order to support Elixir string type (which is `binary()` type)
   116    * `etf.Charlist` (an alias for the Golang string) encodes as a list of chars `[]rune` in order to support Erlang string type (which is `charlist()` type)
   117  * Introduced new methods `Node.ProvideRemoteSpawn`, `Node.RevokeRemoteSpawn`, `Process.RemoteSpawn`.
   118  * Introduced new interfaces `Marshaler` (method `MarshalETF`) and `Unmarshaler` (method `UnmarshalETF`) for the custom encoding/decoding data.
   119  * Improved performance for the local messaging (up to 3 times for some cases)
   120  * Added example [examples/http](https://github.com/ergo-services/examples/tree/master/http) to demonsrate how HTTP server can be integrated into the Ergo node.
   121  * Added example [examples/gendemo](https://github.com/ergo-services/examples/tree/master/gendemo) - how to create a custom behavior (design pattern) on top of the `gen.Server`. Take inspiration from the [gen/stage.go](gen/stage.go) or [gen/saga.go](gen/saga.go) design patterns.
   122  * Added support FreeBSD, OpenBSD, NetBSD, DragonFly.
   123  * Fixed RPC issue #45
   124  * Fixed internal timer issue #48
   125  * Fixed memory leaks #53
   126  * Fixed double panic issue #52
   127  * Fixed Atom Cache race conditioned issue #54
   128  * Fixed ETF encoder issues #64 #66
   129  
   130  #### [v1.2.0](https://github.com/ergo-services/ergo/releases/tag/v1.2.0) - 2021-04-07 [tag version v1.2.0] ####
   131  
   132  * Added TLS support. Introduced new option `TLSmode` in `ergo.NodeOptions` with the following values:
   133    - `ergo.TLSmodeDisabled` default value. encryption is disabled
   134    - `ergo.TLSmodeAuto` enables encryption with autogenerated and self-signed certificate
   135    - `ergo.TLSmodeStrict` enables encryption with specified server/client certificates and keys
   136    there is example of usage `examples/nodetls/tlsGenServer.go`
   137  * Introduced [GenStage](https://hexdocs.pm/gen_stage/GenStage.html) behavior implementation (originated from Elixir world).
   138    `GenStage` is an abstraction built on top of `GenServer` 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 here `examples/genstage` or just run it `go run ./examples/genstage` to see it in action
   139  * Introduced new methods `AddStaticRoute`/`RemoveStaticRoute` for `Node`. This feature allows you to keep EPMD service behind a firewall.
   140  * Introduced `SetTrapExit`/`TrapExit` methods for `Process` in order to control the trapping `gen.MessageExit` message (for the linked processes)
   141  * Introduced `TermMapIntoStruct` and `TermProplistIntoStruct` functions. It should be easy now to transform `etf.Map` or `[]eft.ProplistElement` into the given struct. See documentation for the details.
   142  * Improved DIST implementation in order to support KeepAlive messages and get rid of platform-dependent `syscall` usage
   143  * Fixed `TermIntoStruct` function. There was a problem with `Tuple` value transforming into the given struct
   144  * Fixed incorrect decoding atoms `true`, `false` into the booleans
   145  * Fixed race condition and freeze of connection serving in corner case [#21](https://github.com/ergo-services/ergo/issues/21)
   146  * Fixed problem with monitoring process by the registered name (local and remote)
   147  * Fixed issue with termination linked processes
   148  * Fixed platform-dependent issues. Now Ergo Framework has tested and confirmed support of Linux, MacOS, Windows.
   149  
   150  #### [v1.1.0](https://github.com/ergo-services/ergo/releases/tag/v1.1.0) - 2020-04-23 [tag version v1.1.0] ####
   151  
   152  * Fragmentation support (which was introduced in Erlang/OTP 22)
   153  * Completely rewritten network subsystem (DIST/ETF).
   154  * Improved performance in terms of network messaging (outperforms original Erlang/OTP up to x5 times. See [Benchmarks](#benchmarks))
   155  
   156  #### [v1.0.0](https://github.com/ergo-services/ergo/releases/tag/1.0.0) - 2020-03-03 [tag version 1.0.0] ####
   157  
   158  * We have changed the name - Ergo (or Ergo Framework). GitHub's repo has been
   159  renamed as well. We also created cloned repo `ergonode` to support users of
   160  the old version of this project. So, its still available at
   161  https://github.com/halturin/ergonode. But it's strongly recommend to use
   162  the new one.
   163  * Completely reworked (almost from scratch) architecture whole project
   164  * Implemented linking process feature (in order to support Application/Supervisor behaviors)
   165  * Reworked Monitor-feature. Now it has full-featured support with remote process/nodes
   166  * Added multinode support
   167  * Added experimental observer support
   168  * Fixed incorrect ETF string encoding
   169  * Improved ETF TermIntoStruct decoder
   170  * Improved code structure and readability
   171  
   172  #### [v0.2.0](https://github.com/ergo-services/ergo/releases/tag/0.2.0) - 2019-02-23 [tag version 0.2.0] ####
   173  * Now we make versioning releases
   174  * Improve node creation. Now you can specify the listening port range. See 'Usage' for details
   175  * Add embedded EPMD. Trying to start internal epmd service on starting ergonode.