smsadat1/alpinejudge

A lightweight, stateless code execution engine with secure sandboxing and horizontal scalability.

Go

2

294 commits

updated Sep 19, 2026

See the code
backend-service
code-execution-engine
distributed-systems
go
golang
judge-system
python-sdk
rabbitmq
rest-api
s3-storage
sse-streaming

See what people are saying (1)

SourceMessageScoreDate

Developing an open-source code judging engine with Go and I want someone to break it (r/golang)

I have been developing a code judge engine mainly with Go and containerd, named **AlpineJudge** for months. Recently it's getting to the point where I need people outside my own setup to actually deploy it, use it, and try to break it. Looking for people interested in: \- deploying it in different…

1

Sep 20, 2026

README

AlpineJudge

banner

A stateless, secure, multi-language code execution engine built for high performance and easy deployment.

Status Architecture Security

Table of Contents

About

Running untrusted code is not just execution — it is a security problem.

Most systems struggle with:

  • unsafe container escape risks
  • inconsistent runtime environments
  • resource abuse (CPU/memory/time)
  • lack of controlled and reliable execution orchestration

AlpineJudge solves this by treating code execution as a hardened infrastructure layer rather than a simple runtime task.

Getting Started

AlpineJudge has two stage deployment

Stage 1 - Install the AlpineJudge system

git clone git@github.com:smsadat1/AlpineJudge.git
cd AlpineJudge
cp .env.example .env
docker compose up --build

Stage 2 — Python SDK and language image

Install the SDK:

pip install alpinejudge-sdk
ctr -n ajnamespace images pull ghcr.io/smsadat1/alpinejudge/master:v0.1.0

Submit a job:

import asyncio
from alpinejudge import AlpineJudge

async def main():

    client = AlpineJudge() 
    await client.upload_testset(testset_path='path/to/testset', testset_id='testset_id')

    with open("program.cpp", "r", encoding="utf-8") as file:
        file_string = file.read()

    async for event in client.submit_and_watch(
        submission_id="submission_id",
        language="cpp",
        source= file_string,
        testset_id="ts001",
        memory_limit_mb=1024,
        timeout_sec=20,
        log_limit_kb=1024,
    ):
        print(f"{event.type} {event.status} {event.details}")


if __name__ == "__main__":
    asyncio.run(main())

Architecture & Design Philosophy

Architecture

AlpineJudge is designed around statelessness, isolation, predictability and reproducibility when executing untrusted code.

The system prioritizes:

  • strong runtime isolation
  • deterministic execution environments
  • clear separation of concerns across services

System overview

AlpineJudge is composed of two subsystems:

  • Dispatcher -> request handling and orchestration
  • Runner -> isolated code execution engine

Execution flow:

Client -> Dispatcher -> RunnerService -> Ajagent inside container

Key Capabilities

  • Multi-language execution (Python, C/C++, Go, Java, JS)
  • Secure sandboxed execution using containerd containers
  • SSE based execution status streaming via Rabbitmq

Non-Goal

AlpineJudge is not a contest management platform. It intentionally remains stateless and does not manage users, contests, submissions, or persistent application data. Those responsibilities belong to the integrating application. AlpineJudge focuses solely on validating, scheduling, executing, and evaluating code submissions.

Documentation

Detailed technical documentation is available in /docs:

  • Architecture -> docs/ARCHITECTURE.md
  • API references -> docs/API.md
  • Design decisions -> docs/ADRs
  • Subsystem documentation (dispatcher) -> docs/subsystems/dispatcher.md
  • Subsystem documentation (runner) -> docs/subsystems/runner

Contributors

smsadat1

294 commits

smsadat1/alpinejudge

A lightweight, stateless code execution engine with secure sandboxing and horizontal scalability.

Go

2

294 commits

updated Sep 19, 2026

See the code
backend-service
code-execution-engine
distributed-systems
go
golang
judge-system
python-sdk
rabbitmq
rest-api
s3-storage
sse-streaming

See what people are saying (1)

SourceMessageScoreDate

Developing an open-source code judging engine with Go and I want someone to break it (r/golang)

I have been developing a code judge engine mainly with Go and containerd, named **AlpineJudge** for months. Recently it's getting to the point where I need people outside my own setup to actually deploy it, use it, and try to break it. Looking for people interested in: \- deploying it in different…

1

Sep 20, 2026

README

AlpineJudge

banner

A stateless, secure, multi-language code execution engine built for high performance and easy deployment.

Status Architecture Security

Table of Contents

About

Running untrusted code is not just execution — it is a security problem.

Most systems struggle with:

  • unsafe container escape risks
  • inconsistent runtime environments
  • resource abuse (CPU/memory/time)
  • lack of controlled and reliable execution orchestration

AlpineJudge solves this by treating code execution as a hardened infrastructure layer rather than a simple runtime task.

Getting Started

AlpineJudge has two stage deployment

Stage 1 - Install the AlpineJudge system

git clone git@github.com:smsadat1/AlpineJudge.git
cd AlpineJudge
cp .env.example .env
docker compose up --build

Stage 2 — Python SDK and language image

Install the SDK:

pip install alpinejudge-sdk
ctr -n ajnamespace images pull ghcr.io/smsadat1/alpinejudge/master:v0.1.0

Submit a job:

import asyncio
from alpinejudge import AlpineJudge

async def main():

    client = AlpineJudge() 
    await client.upload_testset(testset_path='path/to/testset', testset_id='testset_id')

    with open("program.cpp", "r", encoding="utf-8") as file:
        file_string = file.read()

    async for event in client.submit_and_watch(
        submission_id="submission_id",
        language="cpp",
        source= file_string,
        testset_id="ts001",
        memory_limit_mb=1024,
        timeout_sec=20,
        log_limit_kb=1024,
    ):
        print(f"{event.type} {event.status} {event.details}")


if __name__ == "__main__":
    asyncio.run(main())

Architecture & Design Philosophy

Architecture

AlpineJudge is designed around statelessness, isolation, predictability and reproducibility when executing untrusted code.

The system prioritizes:

  • strong runtime isolation
  • deterministic execution environments
  • clear separation of concerns across services

System overview

AlpineJudge is composed of two subsystems:

  • Dispatcher -> request handling and orchestration
  • Runner -> isolated code execution engine

Execution flow:

Client -> Dispatcher -> RunnerService -> Ajagent inside container

Key Capabilities

  • Multi-language execution (Python, C/C++, Go, Java, JS)
  • Secure sandboxed execution using containerd containers
  • SSE based execution status streaming via Rabbitmq

Non-Goal

AlpineJudge is not a contest management platform. It intentionally remains stateless and does not manage users, contests, submissions, or persistent application data. Those responsibilities belong to the integrating application. AlpineJudge focuses solely on validating, scheduling, executing, and evaluating code submissions.

Documentation

Detailed technical documentation is available in /docs:

  • Architecture -> docs/ARCHITECTURE.md
  • API references -> docs/API.md
  • Design decisions -> docs/ADRs
  • Subsystem documentation (dispatcher) -> docs/subsystems/dispatcher.md
  • Subsystem documentation (runner) -> docs/subsystems/runner

Contributors

smsadat1

294 commits

Languages

Go

87.8%

Python

7.8%

C++

2.5%

Dockerfile

1.8%