How hrishabh6/codeexecutionengine works
CXE is a code-execution microservice with two major workflows: queued Java/Python submissions, which generate harness files and run code with test-case results, and complexity-profile requests, which measure solution behavior in an isolated sandbox. It also exposes a separate playground execution path. The graph reflects the documented workflow and sampled call sites; unsampled subsystem links are omitted or marked unverified rather than inferred from names alone.
Main entry points: ComplexityProfileKubernetesJobService.java Profile Job Runner · PlaygroundKubernetesJobService.java Playground Job Service · ComplexityProfileQueueService.java Profile Queue · ExecutionWorkerService.java Execution Workers
Components 24
Submission API
- Execution API
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/controller/ExecutionController.java - Profile API
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/internal/InternalComplexityProfileExecutionController.java - Playground API
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/controller/ExecutionController.java
Queued Execution
- Execution Queue
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/helperservice/ExecutionQueueService.java - Execution Workers
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/helperservice/ExecutionWorkerService.java - Execution Manager
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/CodeExecutionManager.java - Harness Generators
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/filehandlingservice - Executor Router
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/codeexecutionservice/RoutingCodeExecutor.java - Compilation
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/compilation/CompilationService.java - Language Runners
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/ExecutionService.java - Process Runner
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/utils/ManagedProcessRunner.java - Execution Results
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/helperservice/ExecutionJobResultStore.java
Complexity Profiling
- Profile Orchestrator
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileOrchestrationService.java - Profile Queue
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileQueueService.java - Profile Job Runner
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileKubernetesJobService.java - Measurement Harness
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/harness/ComplexityProfileMeasurementEngine.java - Profile Results
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileTrustedResultAssembler.java - Sandbox State
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileSandboxRedisStore.java
Playground Sandbox
- Playground Job Service
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/PlaygroundKubernetesJobService.java - Sandbox Job Builder
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/SandboxedKubernetesJobBuilder.java - Playground Results
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/helperservice/PlaygroundJobResultStore.java
Other components
- Platform Consumer
- Redis
- Kubernetes
Connections 27
- Platform Consumer → Execution API: submits code
README.md - Execution API → Execution Queue: enqueues
README.md - Execution Queue → Redis: stores jobs
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/helperservice/ExecutionQueueService.java - Execution Workers → Execution Queue: polls jobs
README.md - Execution Workers → Execution Manager: runs submission
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/helperservice/ExecutionWorkerService.java - Execution Manager → Harness Generators: generates files
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/CodeExecutionManager.java - Execution Manager → Executor Router: executes code
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/CodeExecutionManager.java - Executor Router → Compilation: compiles
- Executor Router → Language Runners: runs language
- Compilation → Process Runner: runs compiler
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/compilation/JavaCompilationService.java - Language Runners → Process Runner: runs process
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/PythonExecutionService.java - Execution Workers → Execution Results: stores results
- Platform Consumer → Profile API: requests profile
- Profile API → Profile Orchestrator: submits request
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/internal/InternalComplexityProfileExecutionController.java - Profile Orchestrator → Profile Queue: enqueues payload
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileOrchestrationService.java - Profile Orchestrator → Profile Queue: reads status
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileOrchestrationService.java - Profile Queue → Redis: stores queue state
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileQueueService.java - Profile Queue → Profile Job Runner: dispatches jobs
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileKubernetesJobService.java - Profile Job Runner → Kubernetes: creates job
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileKubernetesJobService.java - Profile Job Runner → Sandbox State: stages payload
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileKubernetesJobService.java - Measurement Harness → Sandbox State: reads sandbox data
- Profile Job Runner → Profile Results: assembles result
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/complexityprofile/service/ComplexityProfileKubernetesJobService.java - Platform Consumer → Playground API: runs playground
- Playground API → Playground Job Service: starts execution
- Playground Job Service → Sandbox Job Builder: builds job
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/PlaygroundKubernetesJobService.java - Playground Job Service → Kubernetes: creates job
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/PlaygroundKubernetesJobService.java - Playground Job Service → Playground Results: reads result
src/main/java/xyz/hrishabhjoshi/codeexecutionengine/service/execution/PlaygroundKubernetesJobService.java