A sandboxed code execution engine for HackStack — built with Spring Boot.
- Consumes code execution requests from Kafka (
code-executortopic) - Loads test cases from Redis (populated from hackstack-problems at startup)
- Compiles and runs code in isolated sandboxes using
isolate - Measures runtime and memory per test case
- Publishes results to Kafka (
code-resultstopic)
- Java 17
- Spring Boot 3.5
- Apache Kafka (consumer + producer)
- Redis (test case caching)
isolate(sandbox execution)- Maven
- Java 17+
- Redis running on
localhost:6379 - Kafka running on
localhost:9092 isolateinstalled (for sandboxed execution)- hackstack-problems cloned as a sibling directory
# Build
./mvnw clean package
# Run
./mvnw spring-boot:run
# Run tests
./mvnw testThe service starts on port 8081.
All configuration is in src/main/resources/application.properties:
| Property | Default | Description |
|---|---|---|
server.port |
8081 | Server port |
spring.data.redis.host |
localhost | Redis host |
spring.data.redis.port |
6379 | Redis port |
spring.kafka.bootstrap-servers |
localhost:9092 | Kafka broker |
basePath |
../hackstack-problems | Path to problems directory |
- Java
- JavaScript
- HackStack — Parent repository
- HackStack-monorepo — Web frontend, backend API, webhook
- hackstack-problems — Problem definitions and test cases