https://github.com/ergo-services/ergo Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus 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 {{ message }} ergo-services / ergo Public * * Notifications You must be signed in to change notification settings * Fork 133 * Star 3.2k An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. ergo.services License MIT license 3.2k stars 133 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 2 * Pull requests 1 * Discussions * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights ergo-services/ergo This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 198 Commits .github .github act act app/system app/system gen gen lib lib meta meta net net node node tests tests .gitignore .gitignore CHANGELOG.md CHANGELOG.md CONTRIBUTING.md CONTRIBUTING.md LICENSE LICENSE README.md README.md debug.go debug.go ergo.go ergo.go go.mod go.mod go.sum go.sum version.go version.go View all files Repository files navigation * README * MIT license Ergo Framework Gitbook Documentation GoDoc MIT license Telegram Community Twitter Reddit 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 implementation of the network stack, which simplifies the creation of distributed systems. 3. Observability: framework includes built-in observability features, including service discovery and 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 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 (publish/subscribe mechanism), remote actor spawning, and remote application startup. 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 structure to manage and restart failed actors, which is crucial for mission-critical applications. 7. Flexibility: This framework offers convenient interfaces for customizing network stack components, creating and integrating custom loggers, managing SSL certificates, 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 tool [357791972-1cb83305-6c56-4eb7-b567-76f3c551c176] To 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 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 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 file. v3.0.0 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 details Alongside 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/proto Finally, 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 support@ergo.services for more information About An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies. ergo.services Topics go golang distributed-systems framework erlang elixir otp actors microservice worker actor-model supervisor distributed event-driven-microservices event-driven microservices-architecture otp-applications erlang-node network-transparency ergo-framework Resources Readme License MIT license Activity Custom properties Stars 3.2k stars Watchers 58 watching Forks 133 forks Report repository Releases 21 v3.0.0 Latest Sep 4, 2024 + 20 releases Sponsor this project Sponsor Learn more about GitHub Sponsors Contributors 10 * * * * * * * * * * Languages * Go 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.