some sorta server manager/orchestrator prototype
  • Java 98.4%
  • Shell 1.6%
Find a file
2026-07-04 19:04:25 +02:00
.bsp . 2026-07-04 19:04:25 +02:00
.idea . 2026-07-04 19:04:25 +02:00
gradle/wrapper . 2026-05-29 13:27:46 +02:00
src/main/java/de/kentoj/scrow/crown . 2026-07-04 19:04:25 +02:00
templates implement ./priority file 2026-06-02 03:03:21 +02:00
.gitignore . 2026-05-31 23:05:54 +02:00
build.gradle.kts . 2026-07-04 19:04:25 +02:00
gradlew . 2026-05-29 13:27:46 +02:00
gradlew.bat . 2026-05-29 13:27:46 +02:00
README.md . 2026-07-04 19:04:25 +02:00
settings.gradle.kts . 2026-05-29 13:27:46 +02:00

TODO

  • replications could use port 25566, causing the lobby server to fail

crown

receives commands from a nats channel, creates/destroys servers based on templates.

deploying a server

nats -s "$HOST_NATS" request crown.deploy-server '{"template":"<template name, e.g lobby>"}'

templates

templates are directories at ./templates

run script

  • executable file ./run
  • the SERVER_HANDLE environment variable is the handle given by crown. it can be used to send commands to crown.
  • argv[1] aka $1 aka the first argument passed to the run script, is the port assigned to the server. The run script MUST make the server run on that port.

replicas

if the file ./replicas exists and contains a base10 number > 0, crown will deploy as many replicas as specified and make sure they respawn after exiting.

priority

the optional file ./priority can overwrite the default priority(i.e 0) of the template. If the template has > 0 replicas, crown will start templates with a higher priority first.

env

  • HOST_NATS e.g nats://172.17.0.1:4222