Skip to content

v2.0.0

Compare
Choose a tag to compare
@halturin halturin released this 14 Oct 09:27
· 30 commits to master since this release

We have to make another release of v2.0.0 due to https://go.dev/blog/v2-go-modules. More details here https://github.com/ergo-services/ergo#versioning

  • Added support of Erlang/OTP 24 (including Alias feature and Remote Spawn introduced in Erlang/OTP 23)
  • 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.
  • Important: Project repository has been moved to https://github.com/ergo-services/ergo. It is still available on the old URL https://github.com/halturin/ergo and GitHub will redirect all requests to the new one (thanks to GitHub for this feature).
  • 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.
  • 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.
  • 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.
  • Introduced new types intended to be used to interact with Erlang/Elixir
    • etf.ListImproper to support improper lists like [a|b] (a cons cell).
    • etf.String (an alias for the Golang string) encodes as a binary in order to support Elixir string type (which is binary() type)
    • 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)
  • Introduced new methods Node.ProvideRemoteSpawn, Node.RevokeRemoteSpawn, Process.RemoteSpawn.
  • Introduced new interfaces Marshaler (method MarshalETF) and Unmarshaler (method UnmarshalETF) for the custom encoding/decoding data.
  • Improved performance for the local messaging (up to 3 times for some cases)
  • Added example examples/http to demonsrate how HTTP server can be integrated into the Ergo node.
  • Added example examples/gendemo - how to create a custom behavior (design pattern) on top of the gen.Server. Take inspiration from the gen/stage.go or gen/saga.go design patterns.
  • Added support FreeBSD, OpenBSD, NetBSD, DragonFly.
  • Fixed RPC issue #45
  • Fixed internal timer issue #48
  • Fixed memory leaks #53
  • Fixed double panic issue #52
  • Fixed Atom Cache race conditioned issue #54
  • Fixed ETF encoder issues #64 #66