https://github.com/drobban/ume_demo
UmeDev demo - 2025 April 11 - 12:30pm
https://github.com/drobban/ume_demo
beam dynamic-supervisor elixir genserver phoenix-liveview phoenix-pubsub
Last synced: about 1 year ago
JSON representation
UmeDev demo - 2025 April 11 - 12:30pm
- Host: GitHub
- URL: https://github.com/drobban/ume_demo
- Owner: drobban
- Created: 2025-03-27T22:43:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-30T20:38:03.000Z (about 1 year ago)
- Last Synced: 2025-03-30T21:24:02.412Z (about 1 year ago)
- Topics: beam, dynamic-supervisor, elixir, genserver, phoenix-liveview, phoenix-pubsub
- Language: Elixir
- Homepage: https://umedev.se/program
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UmeDemo
## Repos related to this demo
```
UmeDemo
FlightTracker
FlightControl
SamSite
Aircraft
```
### UmeDemo
Just an application to spin up PubSub and get it connnected to other available PubSub's in the cluster
### FlightTracker
An application
Handling Web Service - Map and visuals of all the processes broadcasting their state to the Web client
Handling Dynamic supervisor used by all the Aircrafts
Handling the FlightController
### SamSite
A Module implementing the SamSite genserver
### FlightControl
A Module implementing the FlightControl genserver
### Aircraft
A Module implementing the Aircraft genserver
## Setup
Start node A
```bash
cd ~/flight_tracker
iex --name crash24@127.0.0.1 --cookie secretofmana -S mix phx.server
```
Start node B
```bash
cd ~/ume_demo
iex --name sam_site@127.0.0.1 --cookie secretofmana -S mix run
```
node B assumes node A is called crash24@127.0.0.1
### Init aircraft / sam site
```elixir
SamSite.round_trip(FlightControl, {Phoenix.PubSub, FlightTracker.PubSub})
Aircraft.spawn_kalinin_random(FlightControl, FlightTracker.Super, 5)
Aircraft.spawn_random(FlightControl, FlightTracker.Super, 2750)
```
## Final words
This is a product intended to give a visual demo of what BEAM & Elixir is capable of.
The duration of the talk is 50min including questions.
The code is the result of me experimenting / trying out ideas and getting shit done quickly.
Dont use this as a template for how to architect your cool application running in BEAM - To be viewed more as inspiration for something better.