Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ergo-services/ergo
An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.
https://github.com/ergo-services/ergo
actor-model actors distributed distributed-systems elixir ergo-framework erlang erlang-node event-driven event-driven-microservices framework go golang microservice microservices-architecture network-transparency otp otp-applications supervisor worker
Last synced: 25 days ago
JSON representation
An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.
- Host: GitHub
- URL: https://github.com/ergo-services/ergo
- Owner: ergo-services
- License: mit
- Created: 2017-09-21T06:00:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T06:31:17.000Z (7 months ago)
- Last Synced: 2024-05-01T09:43:41.716Z (6 months ago)
- Topics: actor-model, actors, distributed, distributed-systems, elixir, ergo-framework, erlang, erlang-node, event-driven, event-driven-microservices, framework, go, golang, microservice, microservices-architecture, network-transparency, otp, otp-applications, supervisor, worker
- Language: Go
- Homepage: https://ergo.services
- Size: 1.98 MB
- Stars: 2,663
- Watchers: 53
- Forks: 127
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-go-cn - Ergo - based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. [![近一周有更新][G]](https://github.com/ergo-services/ergo) [![godoc][D]](https://godoc.org/github.com/ergo-services/ergo) (Actor Model)
- awesome-repositories - ergo-services/ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. (Go)
- awesome-ccamel - ergo-services/ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. (Go)
- StarryDivineSky - ergo-services/ergo
- awesome-go-with-stars - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. (Actor Model)
- awesome-go - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. (Actor Model)
- awesome-go - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Stars:`3.6K`. (Actor Model)
- awesome-go - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. (Actor Model)
- my-awesome - ergo-services/ergo - model,actors,distributed,distributed-systems,elixir,ergo-framework,erlang,event-driven,event-driven-microservices,framework,go,golang,microservice,microservices-architecture,network-transparency,otp,otp-applications,supervisor,workflow,workflow-engine pushed_at:2024-10 star:3.7k fork:0.1k An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. (Go)
- fucking-awesome-go - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. (Actor Model)
- awesome-go-plus - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. (Actor Model)
- awesome-go-plus - Ergo - An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. ![stars](https://img.shields.io/badge/stars-3669-blue) ![forks](https://img.shields.io/badge/forks-143-blue) (Actor Model)
README
[![Gitbook Documentation](https://img.shields.io/badge/GitBook-Documentation-f37f40?style=plastic&logo=gitbook&logoColor=white&style=flat)](https://docs.ergo.services)
[![GoDoc](https://pkg.go.dev/badge/ergo-services/ergo)](https://pkg.go.dev/ergo.services/ergo)
[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
[![Telegram Community](https://img.shields.io/badge/Telegram-ergo__services-229ed9?style=flat&logo=telegram&logoColor=white)](https://t.me/ergo_services)
[![Twitter](https://img.shields.io/badge/twitter-ergo__services-00acee?style=flat&logo=x&logoColor=white)](https://x.com/ergo_services)
[![Reddit](https://img.shields.io/badge/Reddit-r/ergo__services-ff4500?style=plastic&logo=reddit&logoColor=white&style=flat)](https://reddit.com/r/ergo_services)The Ergo Framework is an implementation of ideas, technologies, and design patterns from the Erlang world in the Go programming language. It is based on the actor model, network transparency, and a set of ready-to-use components for development. This significantly simplifies the creation of complex and distributed solutions while maintaining a high level of reliability and performance.
### Features ###
1. **Actor Model**: enables the creation of scalable and fault-tolerant systems using isolated actors that interact through message passing. Actors can exchange asynchronous messages as well as perform synchronous requests, offering flexibility in communication patterns.
2. **Network Transparency**: actors can interact regardless of their physical location, supported by a [high-performance](https://github.com/ergo-services/benchmarks) implementation of the [network stack](https://docs.ergo.services/networking/network-stack), which simplifies the creation of distributed systems.
3. **Observability**: framework includes built-in observability features, including [service discovery](https://docs.ergo.services/networking/service-discovering) and [static routes](https://docs.ergo.services/networking/static-routes), allowing nodes to automatically register themselves and find routes to remote nodes. This mechanism simplifies managing distributed systems by enabling seamless communication and interaction between nodes across the network.
4. **Ready-to-use Components**: A set of [ready-to-use actors](https://docs.ergo.services/actors) simplifying development, including state management and error handling.
5. **Support for Distributed Systems**: framework includes built-in mechanisms for creating and managing clustered systems, [distributed events](https://docs.ergo.services/basics/events) (publish/subscribe mechanism), [remote actor spawning](https://docs.ergo.services/networking/remote-spawn-process), and [remote application startup](https://docs.ergo.services/networking/remote-start-application). These features enable easy scaling, efficient message broadcasting across your cluster, and the ability to manage distributed components seamlessly.
6. **Reliability and Fault Tolerance**: the framework is designed to minimize failures and ensure automatic recovery, featuring a [supervisor tree](https://docs.ergo.services/basics/supervision-tree) structure to manage and [restart failed actors](https://docs.ergo.services/actors/supervisor#restart-strategy), which is crucial for mission-critical applications.
7. **Flexibility**: This framework offers convenient interfaces for customizing [network stack components](https://docs.ergo.services/networking/network-stack#network-stack-interfaces), creating and integrating custom [loggers](https://docs.ergo.services/basics/logging), [managing SSL certificates](https://docs.ergo.services/basics/certmanager), and more.In the https://github.com/ergo-services/examples repository, you will find examples that demonstrate a range of the framework's capabilities.
### Observer ###
To inspect the node, network stack, running applications, and processes, you can use the [`observer`](https://github.com/ergo-services/tools/) toolTo install the Observer tool, you need to have the Go compiler version 1.20 or higher. Run the following command:
```
$ go install ergo.services/tools/observer@latest
```You can also embed the [Observer application](https://docs.ergo.services/extra-library/applications/observer) into your node. To see it in action, see example `demo` at https://github.com/ergo-services/examples. For more information https://docs.ergo.services/tools/observer
### Quick start ###
For a quick start, use the [`ergo`](https://docs.ergo.services/tools/ergo) tool — a command-line utility designed to simplify the process of generating boilerplate code for your project based on the Ergo Framework. With this tool, you can rapidly create a complete project structure, including applications, actors, supervisors, network components, and more. It offers a set of arguments that allow you to customize the project according to specific requirements, ensuring it is ready for immediate development.
To install use the following command:
```
$ go install ergo.services/tools/ergo@latest
```Now, you can create your project with just one command. Here is example:
Supervision tree
```
mynode
├─ myapp
│ │
│ └─ mysup
│ │
│ └─ myactor
├─ myweb
└─ myactor2
```To generate project for this design use the following command:
```
$ ergo -init MyNode \
-with-app MyApp \
-with-sup MyApp:MySup \
-with-actor MySup:MyActor \
-with-web MyWeb \
-with-actor MyActor2 \
-with-observer
```as a result you will get generated project:
```
mynode
├── apps
│ └── myapp
│ ├── myactor.go
│ ├── myapp.go
│ └── mysup.go
├── cmd
│ ├── myactor2.go
│ ├── mynode.go
│ ├── myweb.go
│ └── myweb_worker.go
├── go.mod
├── go.sum
└── README.md
```to try it:
```
$ cd mynode
$ go run ./cmd
```Since we included Observer application, open http://localhost:9911 to inspect your node and running processes.
### Erlang support ###
Starting from version 3.0.0, support for the Erlang network stack has been moved to a separate module and is distributed under the BSL 1.1 license - https://github.com/ergo-services/proto. You can find detailed information on using this module in the documentation at https://docs.ergo.services/extra-library/network-protocols/erlang.
### Requirements ###
* Go 1.20.x and above
### Changelog ###
Fully detailed changelog see in the [ChangeLog](CHANGELOG.md) file.
#### [v3.0.0](https://github.com/ergo-services/ergo/releases/tag/v1.999.300) 2024-09-04 [tag version v1.999.300] ####
This version marks a significant milestone in the evolution of the Ergo Framework. The framework's design has been completely overhauled, and this version was built from the ground up. It includes:
- Significant API Improvements: The `gen.Process`, `gen.Node`, and `gen.Network` interfaces have been enhanced with numerous convenient methods.
- A New Network Stack: This version introduces a completely new network stack for improved performance and flexibility. See https://github.com/ergo-services/benchmarks for the detailsAlongside the release of Ergo Framework 3.0.0, new tools and an additional components library are also introduced:
- Tools (observer, saturn) https://github.com/ergo-services/tools
- Loggers (rotate, colored) - https://github.com/ergo-services/logger
- Meta (websocket) - https://github.com/ergo-services/meta
- Application (observer) - https://github.com/ergo-services/application
- Registrar (client Saturn) - https://github.com/ergo-services/registrar
- Proto (erlang23) - https://github.com/ergo-services/protoFinally, we've published comprehensive documentation for the framework, providing detailed guides to assist you in leveraging all the capabilities of Ergo Framework effectively. Its available at https://docs.ergo.services.
### Benchmarks ###
You can find available benchmarks in the following repository https://github.com/ergo-services/benchmarks.
* Messaging performance (local, network)
* Memory consumption per process (demonstrates framework memory footprint).
### Development and debugging ###
To enable Golang profiler just add `--tags debug` in your `go run` or `go build` (profiler runs at
`http://localhost:9009/debug/pprof`)To disable panic recovery use `--tags norecover`.
To enable trace logging level for the internals (node, network,...) use `--tags trace` and set the log level `gen.LogLevelTrace` for your node.
To run tests with cleaned test cache:
```
go vet
go clean -testcache
go test -v ./tests/...
```### Commercial support
please, contact [email protected] for more information