An open API service indexing awesome lists of open source software.

https://github.com/ergo-services/examples

examples for demonstrating Ergo Framework features
https://github.com/ergo-services/examples

Last synced: about 2 months ago
JSON representation

examples for demonstrating Ergo Framework features

Awesome Lists containing this project

README

        

[![Gitbook Documentation](https://img.shields.io/badge/GitBook-Documentation-f37f40?style=plastic&logo=gitbook&logoColor=white&style=flat)](https://docs.ergo.services)
[![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)
[![Discord](https://img.shields.io/badge/Discord-ergo__services-7289da?style=plastic&logo=discord&logoColor=white&style=flat)](https://discord.gg/xHEa7KzX)

Here you can find examples demonstrating features of Ergo Framework 3.0 (and above).

## demo

This is an "umbrella"-example that demonstrates most of the Ergo Framework features. It was generated by `ergo` tool with just a single command. See `README.md` file in [demo](demo) for the details.

![image](https://github.com/ergo-services/examples/assets/118860/02a2ea94-1b22-42e3-81ee-22356b49096f)

## call

This example project shows how to make synchronous requests to the local and remote processes. It starts two nodes (`node1@localhost` and `node2@localhost`); `node1` spawns processes `a` and `b`; `node2` spawns process `b`. Process `a` is making `Call` requests sequentially to the process `b` on `node1@localhost` (locally) and to the process `b` on `node2@localhost` (remotely)

![image](https://github.com/ergo-services/examples/assets/118860/6bd21984-e57e-477d-8c59-5be5b6fcbbbe)

## events
Ergo Framework provides the "Events" feature that implements the distributed "Publisher/Subscriber" design pattern. This example demonstrates this feature in action. It starts node `node-pub@localhost` with a producer process and second node `node-sub@localhost` with two consumer processes.

![image](https://github.com/ergo-services/examples/assets/118860/878c882b-4863-4c82-b5f4-4789b863d78a)

## erlang

This example demonstrates how the node built with Ergo Framework and enabled Erlang network stack natively communicates with the Erlang node.

![image](https://github.com/ergo-services/examples/assets/118860/1d5e456e-dc72-47c7-b532-3768a863a02f)

## websocket
The following example starts Web server with websocket-handler at "/" and spawns 3 processes to handle websocket-connections.

![image](https://github.com/ergo-services/examples/assets/118860/4b5a55dd-b801-446b-ac58-bba01cc14515)