Skip to content

jasonwc/distributed_elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Workspace

A distributed Elixir application consisting of a central server and multiple workspace nodes.

Overview

This project demonstrates a distributed Elixir application with:

  • A central Phoenix server that collects and displays events
  • Multiple workspace nodes that can connect to the server
  • Event logging system for tracking activities across nodes
  • PostgreSQL database for persistent storage

Requirements

  • Elixir 1.14+
  • Erlang/OTP 25+
  • PostgreSQL (via Docker)
  • just command runner
  • tmux (optional, for running server and workspace in split windows)

Setup

  1. Install dependencies:
just setup
  1. Set up the database:
just db-setup

Or run the full setup:

just full-setup

Running the Application

Start the Server

just server

Start a Workspace Node

just workspace

Or specify a custom workspace name:

just workspace workspace2

Start Both Server and Workspace (using tmux)

just start

Database Management

  • Start the database: just db-start
  • Stop the database: just db-stop
  • Check database status: just db-status
  • Reset the database: just db-reset

Testing

Send test events from a workspace node:

just test-events

Or specify a custom workspace node:

just test-events [email protected]

Available Commands

Run just --list to see all available commands:

Available recipes:
    db-reset                                # Reset the database
    db-setup                                # Set up the database
    db-start                                # Start the database
    db-status                               # Check database status
    db-stop                                 # Stop the database
    default                                 # List available commands
    full-setup                              # Full system setup
    full-start                              # Full system start
    server                                  # Start the server node
    setup                                   # Install dependencies
    start                                   # Start both server and workspace
    test-events node="[email protected]" # Run test events
    workspace node="workspace1"             # Start a workspace node

Web Interface

Once the server is running, you can access the web interface at:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published