My dotfiles
Find a file
Nikos Papadakis be7f584010
app: a nice poc background connection with the agent
Dynamically supervise a GRPC connection and keep it alive for a while,
using a timeout to kill the process on inactivity.

The Connection GenServer keeps the connection alive, while listening to
a health stream from the GRPC endpoint, notifying any subscribed
listeners about changes to health.

This health is then propagated to the main servers page.

Also create a looping get_sys_info which retrieves some basic system
information.
2023-08-26 00:51:04 +03:00
.woodpecker agent: dependency update, cleanup, and logging 2023-08-24 22:16:00 +03:00
agent agent: dependency update, cleanup, and logging 2023-08-24 22:16:00 +03:00
app app: a nice poc background connection with the agent 2023-08-26 00:51:04 +03:00
proto Add health checking system to agent 2023-08-12 09:37:01 +00:00
proto_compiler Add protobuf compiling to the elixir backend 2023-06-24 20:10:22 +03:00
.gitignore agent: dependency update, cleanup, and logging 2023-08-24 22:16:00 +03:00
.tool-versions bump tool-versions 2023-07-29 20:19:21 +03:00
Cargo.lock agent: dependency update, cleanup, and logging 2023-08-24 22:16:00 +03:00
Cargo.toml agent: dependency update, cleanup, and logging 2023-08-24 22:16:00 +03:00
docker-compose.yml Init! 2023-06-01 12:49:27 +03:00
get_prymn.sh setup CI and a more complete installation script 2023-07-19 23:01:18 +03:00
README.md rename backend -> app 2023-07-19 23:24:24 +03:00

Prymn

status-badge

Project dependencies

  • Elixir 1.15
  • Erlang 24 or later
  • Rust (recent version)
  • protoc for protobufs version 3

Setup

Some basic steps to setup the project and its dependencies.

  • Install asdf (curl is also required)
    • Using git: git clone https://github.com/asdf-vm/asdf.git ~/.asdf
    • or, using paru, paru -S asdf-vm
    • Add asdf to path: source /opt/asdf-vm/asdf.{bash,zsh,fish}, or ~/.asdf/asdf.{bash,zsh,fish}
  • Install erlang
    • asdf plugin add erlang
    • asdf install erlang 25
  • Install elixir
    • asdf plugin add elixir
    • asdf install elixir 1.15
  • Install rust
    • Optionally, set CARGO_HOME and RUSTUP_HOME to a XDG directory (e.g ~/.local/share/cargo and ~/.local/share/rustup)
    • Arch: pacman -S rustup
    • Other: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    • Make sure to add $HOME/.cargo/bin (or $CARGO_HOME) to PATH
    • rustup toolchain install stable
    • rustup default stable
    • rustup component add clippy
    • rustup component add rust-analyzer
    • rustup component add rustfmt
  • Install protoc version 3
    • Arch: pacman -S protobuf
    • Debian: apt install -y protobuf-compiler
  • (Optional) Install inotify-tools
    • Arch: pacman -S inotify-tools
    • Debian: apt install -y inotify-tools
  • Setup elixir
    • Install hex: mix local.hex
    • cd app && mix escript.install hex protobuf
    • asdf reshim

Preparing for development

Elixir app

  • cd app
  • Start the database: docker-compose up -d
  • mix setup
  • mix phx.server